Overview
Telecom Lookup Tools
List Local Numbers
This function will allow you to list all phone numbers in a specific ratecenter and state.

Post/ Get Information

URL:
Argument
Required
Type
Default
state
no
string
---
ratecenter
no
string
---
npa
no
int
---
nxx
no
int
---
search
no
int
---
limit
no
int
5000
offset
no
int
0
Simply send us a GET/POST to the above URL to get an API response with the list of numbers. Response codes are in the menu to the left. You can also search by area code (npa) instead of ratecenter and state.
shell
PHP+CURL
PHP+PLAIN
RESPONSE
Shell/CURL
1
curl -v -X GET "https://apiv1.teleapi.net/dids/list?token=XXXX&state=CA&ratecenter=LSAN%20DA01"
Copied!
Using PHP+CURL
1
<?php
2
​
3
$data = array("state" => "CA",
4
"ratecenter" => "LSAN DA01"
5
);
6
​
7
$data = http_build_query($data);
8
​
9
$baseurl = "https://apiv1.teleapi.net/dids/states?token=XXXX&state=CA";
10
curl_setopt($ch, CURLOPT_POST, 1);
11
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
12
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
13
$retval = curl_exec($ch);
14
curl_close($ch);
15
​
16
$object = json_decode($retval);
17
print_r($object);
Copied!
PHP - file_get_contents
1
<?php
2
$data = array("state" => "CA",
3
"ratecenter" => "LSAN DA01"
4
);
5
​
6
$data = http_build_query($data);
7
​
8
$url = "https://apiv1.teleapi.net/dids/states?token=XXXX&".$data;
9
$x = file_get_contents($url);
10
$object = json_decode($x);
11
print_r($object);
Copied!

Possible System Responses from List Numbers

Successful Number Listing

1
{
2
"code": 200,
3
"status": "success",
4
"data": {
5
"dids": [
6
{
7
"id": 222,
8
"npa": 555,
9
"nxx": 555,
10
"xxxx": 5555,
11
"number": 5555555555,
12
"ratecenter": "BLARG",
13
"state": "CO",
14
"setup_rate":"0.000000",
15
"monthly_rate":"0.790000",
16
"per_minute_rate":"0.006000"
17
},
18
{
19
"id": 333,
20
"npa": 555,
21
"nxx": 555,
22
"xxxx": 5554,
23
"number": 5555555554,
24
"ratecenter": "BLARG",
25
"state": "CO",
26
"setup_rate":"0.000000",
27
"monthly_rate":"0.790000",
28
"per_minute_rate":"0.006000"
29
}
30
]}
31
"count": 2
32
}
Copied!

Sample Error

1
{
2
"code": 400,
3
"status": "error",
4
"data": "Missing variable: token"
5
}
Copied!
Last modified 1yr ago
Copy link