Number Metadata
Retrieve telecom information about Indian phone numbers, including the telecom circle, operator, number type, and DND (Do Not Disturb) status.
Append .json for JSON response format.
Path Parameters
| Parameter | Required | Description |
|---|---|---|
phone_number | Yes | The Indian phone number to look up |
Code Examples
- cURL
- Python
- Node.js
- PHP
- Go
curl -u '<api_key>:<api_token>' "https://api.exotel.com/v1/Accounts/<your_sid>/Numbers/09876543210.json"
import requests
response = requests.get(
'https://api.exotel.com/v1/Accounts/<your_sid>/Numbers/09876543210.json',
auth=('<api_key>', '<api_token>')
)
print(response.json())
const apiKey = '<your_api_key>';
const apiToken = '<your_api_token>';
const accountSid = '<your_sid>';
const url = `https://api.exotel.com/v1/Accounts/${accountSid}/Numbers/09876543210.json`;
const response = await fetch(url, {
headers: {
'Authorization': 'Basic ' + Buffer.from(`${apiKey}:${apiToken}`).toString('base64'),
},
});
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_USERPWD => "<api_key>:<api_token>",
CURLOPT_URL => "https://api.exotel.com/v1/Accounts/<your_sid>/Numbers/09876543210.json",
CURLOPT_RETURNTRANSFER => true,
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.exotel.com/v1/Accounts/<your_sid>/Numbers/09876543210.json"
req, _ := http.NewRequest("GET", url, nil)
req.SetBasicAuth("<api_key>", "<api_token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
{
"Numbers": {
"PhoneNumber": "0XXXXX30240",
"Circle": "GJ",
"CircleName": "Gujarat Telecom Circle",
"Type": "Mobile",
"Operator": "R",
"OperatorName": "Reliance",
"DND": "Yes"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
PhoneNumber | String | Reformatted phone number |
Circle | String | Two-character telecom circle code |
CircleName | String | Human-readable circle name |
Type | String | Mobile or Landline |
Operator | String | Telecom operator code |
OperatorName | String | Full operator name |
DND | String | Yes, No, or Unavailable |
Telecom Circles (India)
| Code | Circle Name |
|---|---|
| AP | Andhra Pradesh |
| AS | Assam |
| BR | Bihar |
| CH | Chennai |
| DL | Delhi |
| GJ | Gujarat |
| HP | Himachal Pradesh |
| HR | Haryana |
| JK | Jammu & Kashmir |
| KA | Karnataka |
| KL | Kerala |
| KO | Kolkata |
| MH | Maharashtra |
| MP | Madhya Pradesh |
| MU | Mumbai |
| NE | North East |
| OR | Orissa |
| PB | Punjab |
| RJ | Rajasthan |
| TN | Tamil Nadu |
| UE | UP (East) |
| UW | UP (West) |
| WB | West Bengal |
Telecom Operators (India)
| Code | Operator Name |
|---|---|
| AC | Aircel |
| A | Airtel |
| AL | Allianz |
| B | BSNL |
| D | Dishnet |
| E | Etisalat |
| H | HFCL |
| I | Idea |
| LO | Loop |
| MT | MTNL |
| P | Ping |
| R | Reliance |
| S | Sistema |
| ST | S Tel |
| T | Tata |
| U | Unitech |
| VI | Videocon |
| V | Vodafone |
note
This API is currently available for Indian phone numbers only.