API Documentation

Version 2
Please note this version is out of date. For the current version, please click the API link in the nav header above.

This document details the RESTful API method for integrating Phone Validator, which facilitates native access to calling phone lookups. The Phone Validator API can also be connected via RapidAPI or Zapier.

Quickstart

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/v2/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.062,
	"SearchDate":"2020-04-02T22:04:01.2579252-07:00",
	"StatusCode":"200",
	"StatusMessage":"OK",
	"PhoneBasic":
	{
		"PhoneNumber":"15551234567",
		"ReportDate":"2020-04-02T22:04:01.2579252-07:00",
		"LineType":"CELL PHONE",
		"PhoneCompany":"AT&T",
		"PhoneLocation":"LOS ANGELES, CA",
		"ErrorCode":"",
		"ErrorDescription":""	
    },
	"PhoneDetail":
	{
		"PhoneNumber":"15551234567",
		"ReportDate":"2020-04-02T22:04:01.2579252-07:00",
		"LineType":"CELL PHONE",
		"PhoneCompany":"VERIZON",
		"PhoneLocation":"LOS ANGELES, CA",
		"Ported":"YES",
		"ErrorCode":"",
		"ErrorDescription":""
    },
	"PhoneDeactivation":
	{
		"PhoneNumber":"15551234567",
		"ReportDate":"2020-04-02T22:04:01.2579252-07:00",
		"LastDeactivation":true,
		"LastDeactivationDate":"2017-11-13T09:34:17.2579252-07:00",
		"LastDeactivationCompany":"VERIZON",
		"ErrorCode":"",
		"ErrorDescription":""
	}
}



Basics

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.)



Rate Limits

The Phone Validator API has a rate limit of 25 requests per second.



Authentication

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.



Passing Arguments

There are a few configuration options that you can specify via query-string when making a request to Phone Validator Api.

Query String: apikey

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/v2/phonesearch?apikey={APIKEY}

Query String: phone

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/v2/phonesearch?apikey={APIKEY}&phone={PHONE}

Query String: type

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/v2/phonesearch?apikey={APIKEY}&phone={PHONE}&type={TYPE}



Response Formats

All responses are returned in JSON format. Following are examples of each response and corresponding fields returned.

Header Results:

The header result will contain phone number searched, cost for search, search date, status code, and status message.

"PhoneNumber":"15551234567",
"Cost":0.062,
"SearchDate":"2020-04-02T22:04:01.2579252-07:00",
"StatusCode":"200",
"StatusMessage":"OK"

Basic Results:

The basic search will return phone number searched, line type, phone company, phone location, 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":"2020-04-02T22:04:01.2579252-07:00",
"LineType":"CELL PHONE",
"PhoneCompany":"AT&T",
"PhoneLocation":"LOS ANGELES, CA",
"ErrorCode":"",
"ErrorDescription":""

Detail Results:

The detail search will return phone number searched, line type, phone company, phone location, ported, error code, and error description. Any error that occurs for detail lookup will be indicated in the detail results.

"PhoneNumber":"15551234567",
"ReportDate":"2020-04-02T22:04:01.2579252-07:00",
"LineType":"CELL PHONE",
"PhoneCompany":"VERIZON",
"PhoneLocation":"LOS ANGELES, CA",
"Ported":"YES",
"ErrorCode":"",
"ErrorDescription":""

Deactivation Results:

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":"2020-04-02T22:04:01.2579252-07:00",
"LastDeactivation":true,
"LastDeactivationDate":"2017-11-13",
"LastDeactivationCompany":"VERIZON",
"ErrorCode":"",
"ErrorDescription":""



Status Codes

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.

429 TOO MANY REQUEST

Too many request! We can only allow 25 calls per second.

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.


RapidAPI

Our Basic Linetype API is also available on RapidAPI under Phone Validator:

Connect on RapidAPI


Support

Our team can be reached by submitting a contact request here.


API Documentation V1

Please note on July 10, 2020 V1 of our API was replaced by V2. API documentation for V1 can be found here. Please note new users may no longer consume our V1 API, however it will remain online indefinitely for those customers already using it. Please see the documentation above for the latest API version.