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
area_match
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.
The area_match parameter allows you to get both "match":"exact" and "match":"related" results. By default, the results will include only exact matching results for the requested search.
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
"match":"exact"
18
},
19
{
20
"id": 333,
21
"npa": 555,
22
"nxx": 555,
23
"xxxx": 5554,
24
"number": 5555555554,
25
"ratecenter": "BLARG",
26
"state": "CO",
27
"setup_rate":"0.000000",
28
"monthly_rate":"0.790000",
29
"per_minute_rate":"0.006000",
30
"match":"related"
31
}
32
]}
33
"count": 2
34
}
Copied!

Sample Error

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