Phone-Validator - Made in Germany and 100% EU-GDPR compliant

Phone Number Validation API

Integrate our Phone Number Validation & Verification API directly into your website and your customers will be able to fix errors in their contact data instantly - only valid, reachable phone numbers will be accepted. To ensure full compliance with the FCC Telephone Consumer Protection Act (TCPA), the API also detects the correct line type (landline vs. mobile).

Try Our API For Free

How the Phone Verification API Works

Integrating our Real-Time Phone Validation API into your website, eCommerce solution, CRM system or content management system (CMS) is very easy - ready-made plugins and code examples in Javascript, PHP, Java, C#, VB.NET are available below.

Phone-Validator validates any mobile or landline phone number in 240 countries world-wide and provides detailed information like the status (VALID/CONFIRMED, VALID/UNCONFIRMED or INVALID) as well as the line type and geolocation.

During the entire validation process, phone numbers are not contacted in any way, nor will any phones connected to a line ring.

More than 500,000 users worldwide rely on our products & services every day.

Phone Validation API Code Examples

  • API Specification
  • jQuery
  • PHP
  • Java
  • C#
  • VB.NET

Phone Validation API

API URLhttp[s]://
MethodGET or POST
Example API request (GET) API key
Input Parameters
PhoneNumberphone number to validate (string, URL encoded) - either in national format or in international format with a leading + (please use URL encoding: + → %2B).
CountryCodetwo letter ISO 3166-1 country code (string) [optional, if phone number is in international format]
LocaleIETF language tag for Geocoding (string) [optional; default 'en-US']
Mode'extensive' | 'express' (string) [optional; default 'extensive']
APIKeyyour API key (string)
Timeouttimeout in seconds (int) [optional; default 10s, min 5s, max 300s]
API Result (JSON)
location (string)geographical location (city, county, state)
countrycode (string)two letter ISO 3166-1 country code
formatnational (string)phone number in national format
formatinternational (string)phone number in international format
mcc (string)mobile country code to identify a mobile network operator (carrier) using the GSM (including GSM-R), UMTS, and LTE networks
mnc (string)mobile network code to identify a mobile network operator (carrier) using the GSM (including GSM-R), UMTS, and LTE networks
ratelimit_remain (int)number of API requests remaining before the API rate limit is reached (the default API rate limit allows 100 API requests in 300s)
ratelimit_seconds (int)number of seconds remaining in the current rate limit interval

Phone Number Validation with jQuery

<script type="text/javascript" src="path/to/jquery"></script>
<script type="text/javascript">
$(document).ready(function() {
    // send API request
    PhoneNumber = 'phone number';
    CountryCode = 'us';
    Locale = 'en-US';
        url: '',
        type: 'POST',
        data: { PhoneNumber: PhoneNumber, CountryCode: CountryCode,
                Locale: Locale, APIKey: 'your API key'},
        dataType: 'json',
        success: function (json) {
            // check API result
            if (typeof(json.status) != "undefined") {
                statuscode = json.status;
                switch (statuscode) {
                    case "VALID_CONFIRMED":
                    case "VALID_UNCONFIRMED":
                        linetype = json.linetype;
                        location = json.location;
                        countrycode = json.countrycode;
                        formatnational = json.formatnational;
                        formatinternational = json.formatinternational;
                        mcc = json.mcc;
                        mnc = json.mnc;
                    case "INVALID": break;

Phone Number Validation with PHP

// build API request
$APIUrl = '';
$PhoneNumber = "phone number";
$CountryCode = "us";
$Locale = "en-US";
$Params = array('PhoneNumber' => $PhoneNumber,
                'CountryCode' => $CountryCode,
                'Locale' => $Locale,
                'APIKey' => 'your API key');
$Request = http_build_query($Params, '', '&');
$ctxData = array(
    'header'=>"Connection: close\r\n".
    "Content-Type: application/x-www-form-urlencoded\r\n".
    "Content-Length: ".strlen($Request)."\r\n",
$ctx = stream_context_create(array('http' => $ctxData));

// send API request
$result = json_decode(file_get_contents(
    $APIUrl, false, $ctx));

// check API result
switch($result->{'status'}) {
        $linetype = $result->{'linetype'};
        $location = $result->{'location'};
        $countrycode = $result->{'countrycode'};
        $formatnational = $result->{'formatnational'};
        $formatinternational = $result->{'formatinternational'};
        $mcc = $result->{'mcc'};
        $mnc = $result->{'mnc'};
    case "INVALID": 
        echo $PhoneNumber." is ".$result->{'status'};
        echo $result->{'info'};

Phone Number Validation with Java

import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;

import org.apache.http.util.EntityUtils;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
HttpClient client = new DefaultHttpClient();
String PhoneNumber = "phone number";
String CountryCode = "us";
String Locale = "en";
String ApiKey = "your API key";
String APIURL = "";
try {
    HttpPost request = new HttpPost(APIURL);
    List <NameValuePair> Input = new ArrayList<NameValuePair>();
    Input.add(new BasicNameValuePair("PhoneNumber", PhoneNumber));
    Input.add(new BasicNameValuePair("CountryCode", CountryCode));
    Input.add(new BasicNameValuePair("Locale", Locale));
    Input.add(new BasicNameValuePair("APIKey", ApiKey));
    request.setEntity(new UrlEncodedFormEntity(Input));
    HttpResponse response = client.execute(request);
    HttpEntity entity = response.getEntity();
    String Output = EntityUtils.toString(entity, "UTF-8");
    JSONParser parser = new JSONParser();
    Object obj = parser.parse(Output);
    JSONObject jsonObject = (JSONObject) obj;
    String status = (String) jsonObject.get("status");
    switch (status) {
        case "VALID_CONFIRMED":
        case "VALID_UNCONFIRMED":
            String LineType = (String) jsonObject.get("linetype");
            String Location = (String) jsonObject.get("location");
            String CountryCode = (String) jsonObject.get("countrycode");
            String FormatNational = (String) jsonObject.get("formatnational");
            String FormatIntl = (String) jsonObject.get("formatinternational");
            String MCC = (String) jsonObject.get("mcc");
            String MNC = (String) jsonObject.get("mnc");
        case "INVALID": break;
} catch (IOException e) {
} catch (ParseException e) {
} finally {

Phone Number Validation with C#

using System;
using System.Collections.Generic;
using System.Net.Http;

private class APIResult
    public String status { get; set; }
    public String linetype { get; set; }
    public String location { get; set; }
    public String countrycode { get; set; }
    public String formatnational { get; set; }
    public String formatinternational { get; set; }
    public String mcc { get; set; }
    public String mnc { get; set; }

const String APIURL = "";
HttpClient client = new HttpClient();
String PhoneNumber = "phone number";
String CountryCode = "us";
String Locale = "en-US";
String ApiKey = "your API key";

var postData = new List<KeyValuePair<string, string>>();
postData.Add(new KeyValuePair<string, string>("PhoneNumber", PhoneNumber));
postData.Add(new KeyValuePair<string, string>("CountryCode", CountryCode));
postData.Add(new KeyValuePair<string, string>("Locale", Locale));
postData.Add(new KeyValuePair<string, string>("APIKey", APIKey));

HttpContent content = new FormUrlEncodedContent(postData);

HttpResponseMessage result = client.PostAsync(APIURL, content).Result;
string resultContent = result.Content.ReadAsStringAsync().Result;

APIResult res = new System.Web.Script.Serialization.JavaScriptSerializer().

switch (res.status) {
        String LineType = res.linetype;
        String Location = res.location;
        String CountryCode = res.countrycode;
        String FormatNational = res.formatnational;
        String FormatInternational = res.formatinternational;
        String MCC = res.mcc;
        String MNC = res.mnc;
    case "INVALID": break;

Phone Number Validation with VB.NET

Private Sub checkPhoneNumber(ByVal PhoneNumber As String,
                       ByVal CountryCode As String,
                       ByVal Locale As String,
                       ByVal APIKey As String)
    Const APIURL As String = ""
    Using client As New Net.WebClient
      Dim postData As New Specialized.NameValueCollection
      postData.Add("PhoneNumber", PhoneNumber)
      postData.Add("CountryCode", CountryCode)
      postData.Add("Locale", Locale)
      postData.Add("APIKey", APIKey)
      Dim reply = client.UploadValues(APIURL, "POST", postData)
      Dim data As String = (New System.Text.UTF8Encoding).GetString(reply)
      Dim res = New System.Web.Script.Serialization.JavaScriptSerializer().
        Deserialize(Of APIResult)(data)        
      Select Case res.status
        Case "VALID_CONFIRMED"
            Dim LineType As String = res.linetype
            Dim Location As String = res.location
            Dim CountryCode As String = res.countrycode
            Dim FormatNational As String = res.formatnational
            Dim FormatInternational As String = res.formatinternational
            Dim MCC As String = res.mcc
            Dim MNC As String = res.mnc
        Case "INVALID"
        Case Else
      End Select
    End Using
End Sub

Private Class APIResult
    Public status As String
    Public linetype As String
    Public location As String
    Public countrycode As String
    Public formatnational As String
    Public formatinternational As String
    Public mcc As String
    Public mnc As String
End Class

WordPress, jQuery & Node.js Plugins

Easy to install & use - these Phone Validator API plugins are available already:

You can use our Phone Validation API to check up to 100 phone numbers for free -
just register for your free account and we send you an email with the details!