Carrier lookup
Find out whether a phone number belongs to a wireless carrier, a probable landline or no valid number, with the legacy HTTP API.
http://carrierlookup.wire2air.com/carrierlookup/default.aspxA lookup costs one third of a text credit.
Parameters
Send them in the query string (GET is the only documented method).
| Parameter | In | Description |
|---|---|---|
| APPKEY stringrequired in query | query | Your app key, from Manage Account → API Information in the dashboard. See authentication. |
| MOBILE stringrequired in query | query | The number to look up. |
Examples
curl -G "http://carrierlookup.wire2air.com/carrierlookup/default.aspx" \
--data-urlencode "APPKEY=YOUR_APPKEY" \
--data-urlencode "MOBILE=12121234567"
import urllib.error
import urllib.parse
import urllib.request
params = urllib.parse.urlencode({
"APPKEY": "YOUR_APPKEY",
"MOBILE": "12121234567",
})
request = urllib.request.Request(
"http://carrierlookup.wire2air.com/carrierlookup/default.aspx?" + params,
method="GET",
)
try:
with urllib.request.urlopen(request, timeout=30) as response:
print(response.status, response.read().decode("utf-8"))
except urllib.error.HTTPError as error:
print(error.code, error.read().decode("utf-8"))
const params = new URLSearchParams({
APPKEY: "YOUR_APPKEY",
MOBILE: "12121234567",
});
const response = await fetch(`http://carrierlookup.wire2air.com/carrierlookup/default.aspx?${params}`, {
method: "GET",
});
console.log(response.status, await response.text());
<?php
$params = http_build_query([
'APPKEY' => 'YOUR_APPKEY',
'MOBILE' => '12121234567',
]);
$ch = curl_init('http://carrierlookup.wire2air.com/carrierlookup/default.aspx?' . $params);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
$body = curl_exec($ch);
if ($body === false) {
echo 'Request failed: ' . curl_error($ch) . PHP_EOL;
} else {
echo curl_getinfo($ch, CURLINFO_HTTP_CODE) . ' ' . $body . PHP_EOL;
}
curl_close($ch);
using System;
using System.Collections.Generic;
using System.Net.Http;
var parameters = new Dictionary<string, string>
{
["APPKEY"] = "YOUR_APPKEY",
["MOBILE"] = "12121234567",
};
using var client = new HttpClient();
var query = await new FormUrlEncodedContent(parameters).ReadAsStringAsync();
using var request = new HttpRequestMessage(HttpMethod.Get, "http://carrierlookup.wire2air.com/carrierlookup/default.aspx?" + query);
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
Response
The response is a number:
| Response | Meaning |
|---|---|
greater than 1 | A valid wireless number. The value identifies the carrier. |
-1 | Possibly a landline. |
-2 | Not a valid number. |
-3 | Authentication failed. |
-500 | System error; report it to support. |

