API Documentation

Version 3
Release date: 11/24/2021

This document details the RESTful API method for integrating Phone Validator, which facilitates native access to calling phone lookups. WHAT'S NEW: Now includes our new Fake Number Check as part of our existing Line Type Basic search and as a new stand-alone search.

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/v3/phonesearch?apikey={APIKEY}&phone={PHONE}&type=fake,basic

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: 7029270000

Sending a query using this number will return the following JSON response:

{
	"PhoneNumber":"7029270000",
	"Cost":0.014,
	"SearchDate":"2020-04-02T22:04:01.2579252-07:00",
	"StatusCode":"200",
	"StatusMessage":"OK",
	"PhoneFake":
	{
		"PhoneNumber":"7029270000",
		"ReportDate":"2020-11-24T22:04:01.2579252-07:00",
        "FakeNumber": "NO",
        "FakeNumberReason": "",
        "ErrorCode":"",
		"ErrorDescription":""	
    },
	"PhoneBasic":
	{
		"PhoneNumber":"7029270000",
		"ReportDate":"2020-11-24T22:04:01.2579252-07:00",
		"LineType":"CELL PHONE",
		"PhoneCompany":"T-MOBILE",
		"PhoneLocation":"NORTH LAS VEGAS, NV",
        "FakeNumber": "NO",
        "FakeNumberReason": "",
		"ErrorCode":"",
		"ErrorDescription":""	
    }
}



Basics

Here's some basics to know:

  • 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 17029270000 or 7029270000, 1-702-927-0000 or 702-927-0000.)



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/v3/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 17029270000 or 7029270000, 1-702-927-0000 or 702-927-0000.)

https://api.phonevalidator.com/api/v3/phonesearch?apikey={APIKEY}&phone={PHONE}

Query String: type

The type parameter indicates the phone lookup request. There are two types of lookups - fake and basic. Any search combination can be used for the type parameter, and each one should be separated by a comma. Example would be fake,basic.

https://api.phonevalidator.com/api/v3/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":"7029270000",
"Cost":0.006,
"SearchDate":"2020-11-24T22:04:01.2579252-07:00",
"StatusCode":"200",
"StatusMessage":"OK"

Fake Results:

The fake search will return phone number searched, fake number, fake reason, error code, and error description. Possible values for fake number are YES or NO. Fake reason will include details if number is determined to be fake. Any error that occurs for fake lookup will be indicated in the fake results.

"PhoneNumber":"7029270000",
"ReportDate":"2020-11-24T22:04:01.2579252-07:00",
"FakeNumber":"NO",
"FakeReason":"",
"ErrorCode":"",
"ErrorDescription":""

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, UNKNOWN OR FAKE. Any error that occurs for basic lookup will be indicated in the basic results.

"PhoneNumber":"7029270000",
"ReportDate":"2020-11-24T22:04:01.2579252-07:00",
"LineType":"CELL PHONE",
"PhoneCompany":"T-MOBILE",
"PhoneLocation":"NORTH LAS VEGAS, NV",
"FakeNumber":"NO",
"FakeReason":"",
"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.


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.


API Documentation V2

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