├── code-examples ├── jquery.ajax.md └── php.md └── README.md /code-examples/jquery.ajax.md: -------------------------------------------------------------------------------- 1 | # jQuery.ajax 2 | 3 | Find below a simple way of using jQuery.ajax to validate any phone number: 4 | 5 | ```javascript 6 | // set endpoint and your access key 7 | var access_key = 'YOUR_ACCESS_KEY'; 8 | var phone_number = '14158586273'; 9 | 10 | // verify email address via AJAX call 11 | $.ajax({ 12 | url: 'http://apilayer.net/api/validate?access_key=' + access_key + '&number=' + phone_number, 13 | dataType: 'jsonp', 14 | success: function(json) { 15 | 16 | // Access and use your preferred validation result objects 17 | console.log(json.valid); 18 | console.log(json.country_code); 19 | console.log(json.carrier); 20 | 21 | } 22 | }); 23 | ``` 24 | 25 | -------------------------------------------------------------------------------- /code-examples/php.md: -------------------------------------------------------------------------------- 1 | # PHP cURL 2 | 3 | Find below a simple way of using PHP (cURL) to verify an email address: 4 | 5 | ```php 6 | // set API Access Key 7 | $access_key = 'YOUR_ACCESS_KEY'; 8 | 9 | // set email address 10 | $phone_number = '14158586273'; 11 | 12 | // Initialize CURL: 13 | $ch = curl_init('http://apilayer.net/api/validate?access_key='.$access_key.'&number='.$phone_number.''); 14 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 15 | 16 | // Store the data: 17 | $json = curl_exec($ch); 18 | curl_close($ch); 19 | 20 | // Decode JSON response: 21 | $validationResult = json_decode($json, true); 22 | 23 | // Access and use your preferred validation result objects 24 | $validationResult['valid']; 25 | $validationResult['country_code']; 26 | $validationResult['carrier']; 27 | ``` 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Stay up to date by following [@apilayernet](https://twitter.com/apilayernet) on Twitter. 2 | _________ 3 | 4 | # numverify API 5 | 6 | NumVerify is a free, powerful REST API offering both national and international phone number validation based on the most recent international numbering plan databases. After passing a phone number into the simple request URL structure, the API returns a universally usable JSON response set containing the validation result, the requested number in its local and international format, and useful country, carrier and line type information. 7 | 8 | ## Data Sources 9 | 10 | Our phone number format validation system is based on the most up-to-date international numbering plans containing complex syntax rules, carrier data, line type data and location information for all mobile and landline numbers in both national and international formats, for a total of 232 countries around the world. Only this way we are able to ensure the highest level of quality, reliability and accuracy for each validation result returned by the API. 11 | 12 | We believe that every online business that in any way utilizes it's customers phone numbers should be validating them in order to ensure frictionless communication and reduce undelivered messages, that is why we decided to offer 250 monthly validation requests for free - no credit card required. 13 | 14 | [Sign up for for free](https://numverify.com/product) to get instant API Access. 15 | 16 | ## Features & Integration 17 | 18 | Fight fraudulent profiles and focus on real users - Thorough phone number validation has numerous benefits for your business and is incredibly easy to implement. The best way to capture good leads is to verify contact information right at the point of entry into your database. 19 | 20 | The main API Functionalities are: 21 | 22 | * **International Number Validation**: 23 | Validate international phone numbers for 232 countries using their unique international dial codes. 24 | 25 | * **National Number Validation**: 26 | Validate national (local) phone numbers by providing an additional 2-digit country code parameter. 27 | 28 | * **Location Data**: 29 | Retrieve valuable geographical identifiers, including country and location, with each API request. 30 | 31 | * **Carrier Detection**: 32 | Legitimize customers by retrieving details about the carrier their phone number is registered with. 33 | 34 | * **Line Type Detection**: 35 | Reduce undelivered messages and ensure right ways of communication by knowing the line type. 36 | 37 | * **and more ...**: 38 | Prettyprint your JSON response, make use of JSONP Callbacks, Access-Control headers, and much more. 39 | 40 | [Sign up for the Free Plan](https://numverify.com/product) to get your API Access Key. 41 | 42 | ## In-depth Documentation 43 | 44 | Interactive example queries, code examples (including PHP/CURL and jQuery.ajax) and integration guides are available at [numverify.com/documentation](https://numverify.com/documentation). 45 | 46 | ## Customer Support 47 | Need any assistance? [Get in touch with Customer Support](mailto:support@apilayer.com?subject=[numverify]). 48 | 49 | ## Legal 50 | 51 | All usage of the numverify website, API, and services is subject to the [numverify Terms & Conditions](https://numverify.com/terms) and all annexed legal documents and agreements. 52 | --------------------------------------------------------------------------------