Ready to get started? Once you have signed up and created an account try out a quick url search or curl command to query the Phone Validator RESTful API:
https://api.phonevalidator.com/api/phonesearch?apikey={APIKEY}&phone={PHONE}&type=basic,detail,deactivation
Note for security reasons that only secure HTTPS requests are supported.
In order to test the API without incurring charges, please use the following demonstration number: 5551234567
Sending a query using this number will return the following JSON response:
{
"PhoneNumber":"15551234567",
"Cost":0.30,
"SearchDate":"2019-04-02T22:04:01.2579252-07:00",
"StatusCode":"200",
"StatusMessage":"OK",
"PhoneBasic":
{
"PhoneNumber":"15551234567",
"ReportDate":"2019-04-02T22:04:01.2579252-07:00",
"LineType":"CELL PHONE",
"PhoneCompany":"AT&T",
"PhoneLocation":"LOS ANGELES, CA",
"ErrorCode":"",
"ErrorDescription":""
},
"PhoneDetail":
{
"PhoneNumber":"15551234567",
"ReportDate":"2019-04-02T22:04:01.2579252-07:00",
"AreaCodePrefix":"VALID",
"PhoneCompany":"VERIZON WIRELESS",
"IsWireLess":"YES",
"ErrorCode":"",
"ErrorDescription":""
},
"PhoneDeactivation":
{
"PhoneNumber":"15551234567",
"ReportDate":"2019-04-02T22:04:01.2579252-07:00",
"LastDeactivation":true,
"LastDeactivationDate":"2017-11-13T09:34:17.2579252-07:00",
"LastDeactivationCompany":"VERIZON WIRELESS",
"ErrorCode":"",
"ErrorDescription":""
}
}
This documentation uses a couple notes and documentation conventions that will be explained in this section.
- Authentication is always required. To simplify the examples, however, the documentation will frequently omit showing the query-string api key parameter.
- Your Api key should not, in any circumstances, be shared with anyone else. Should your key be compromised, you will need to immediately request a new key, or cancel your account. You are responsible for any costs incurred while accessing the Api with your key.
- The phone number can be in several formats and can include the leading 1 but is not required. (For example for you can use 15551234567 or 5551234567, 1-555-123-4567 or 555-123-4567.)
All Phone Validator Api requests require authentication, by passing your api key as part of the query string parameters. You can verify you have API access and obtain your key by visiting your account information.
There are a few configuration options that you can specify via query-string when making a request to Phone Validator Api.
You must authenticate by passing the apikey in the query string. Below you will find an example of authentication using the the apikey parameter within the query string.
https://api.phonevalidator.com/api/phonesearch?apikey={APIKEY}
The phone parameter can be in several formats and can include the leading 1 but is not required. (For example for you can use 15551234567 or 5551234567, 1-555-123-4567 or 555-123-4567.)
https://api.phonevalidator.com/api/phonesearch?apikey={APIKEY}&phone={PHONE}
The type parameter indicates the phone lookup request. There are three types of lookups - basic, detail, and deactivation. Any search combination can be used for the type parameter, and each one should be separated by a comma. Example for all three would be basic,detail,deactivation.
https://api.phonevalidator.com/api/phonesearch?apikey={APIKEY}&phone={PHONE}&type={TYPE}
All responses are returned in JSON format. Following are examples of each response and corresponding fields returned.
The header result will contain phone number searched, cost for search, search date, status code, and status message.
"PhoneNumber":"15551234567",
"Cost":0.30,
"SearchDate":"2019-04-02T22:04:01.2579252-07:00",
"StatusCode":"200",
"StatusMessage":"OK"
The basic search will return phone number searched, line type, error code, and error description. Possible values for line type are CELL PHONE, LANDLINE, VOIP, TOLL-FREE OR UNKNOWN. Any error that occurs for basic lookup will be indicated in the basic results.
"PhoneNumber":"15551234567",
"ReportDate":"2019-04-02T22:04:01.2579252-07:00",
"LineType":"CELL PHONE",
"PhoneCompany":"AT&T",
"PhoneLocation":"LOS ANGELES, CA",
"ErrorCode":"",
"ErrorDescription":""
The detail search will return phone number searched, phone status, carrier name, if wireless, error code, and error description. Any error that occurs for detail lookup will be indicated in the detail results.
"PhoneNumber":"15551234567",
"ReportDate":"2019-04-02T22:04:01.2579252-07:00",
"AreaCodePrefix":"VALID",
"PhoneCompany":"VERIZON WIRELESS",
"IsWireLess":"YES",
"ErrorCode":"",
"ErrorDescription":""
The deactivation search will return phone number searched, if deactivated, deactivated carrier name, deactivate date, error code, and error description. Any error that occurs for deactivation lookup will be indicated in the detail results.
"PhoneNumber":"15551234567",
"ReportDate":"2019-04-02T22:04:01.2579252-07:00",
"LastDeactivation":true,
"LastDeactivationDate":"2017-11-13",
"LastDeactivationCompany":"VERIZON WIRELESS",
"ErrorCode":"",
"ErrorDescription":""
When making Phone Validator API requests, there are several different HTTP status codes you may receive. If the status code is 200, everything is great. All other status codes indicate an error in processing the request.
200 OK
The request was successful.
500 UNEXPECTED ERROR
An unexpected error has occurred processing phone lookup.
501 BAD REQUEST
The phone number (e.g. format) isn't valid or is missing.
502 ACCOUNT NOT ACTIVE
The account is no longer active.
503 UNAUTHORIZED
The request was missing authentication or the credentials are not valid.
504 INSUFFICENT FUNDS
Authentication succeeded, but the account does not have enough funds available to complete the request.
505 NOT FOUND
The phone number does not have any phone information available.
This API is also available on RapidAPI under Phone Validator:
Our team can be reached by submitting a contact request here.