# Phone Number Validator API

> Phone Number Validator checks a phone number and returns whether it is valid, its line type, country, area and time zone, and the carrier its mobile range was allocated to. It flags disposable and VoIP numbers and outputs E.164, international, national and RFC3966 formats.

**Endpoint:** `GET https://api.apiverve.com/v1/phonenumbervalidator`  
**Category:** Data Validation  
**Cost:** 10 credits per call  
**Canonical page:** https://apiverve.com/marketplace/phonenumbervalidator

## Overview

It also works as a phone number lookup API and phone number checker API, with VoIP detection and the phone line type in the same response, so you can validate a phone number at signup in one call. A phone validation and phone number validator API that answers in JSON from one REST call, with a Free plan to test it before you pay. Send a number in +E.164 form on its own, or a national number with its two-letter country code. Validation runs on Google's libphonenumber numbering-plan data, so each number is checked against the real number ranges of its country rather than a generic pattern. Location, carrier and time zones come from libphonenumber's offline geocoding and carrier maps. The carrier is the operator the number range was first allocated to, so a ported number still shows its original network, and US and Canadian numbers carry no carrier data. The disposable flag checks the number against numbers published on temporary SMS-receiving sites.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/phonenumbervalidator?number=816-555-1017&country=us" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `number` | string | Yes | The phone number to validate |
| `country` | string | No | The two-letter country code of the phone number (e.g., us, uk). Optional when the number is in international format starting with + or 00. length 2-2 |

## Response fields

- `country` — string · The country code that was supplied with the request, or null when none was sent
- `detectedCountry` — string · The ISO country code detected from the number
- `countryName` — string · Full name of the detected country
- `countrycode` — number · The international dialing/country calling code
- `numberNational` — number · The national number as an integer, without the country code. Leading zeros that belong to the number (Italian fixed lines such as 06..., and similar numbering in CI, GA and CG) are lost in numeric form, so for storing or dialling use nationalSignificantNumber (a string that keeps them) or formatted.national
- `extension` — object · The phone extension if present, otherwise null
- `isValid` — boolean · Whether the number is valid for the given country/region
- `isMobile` — boolean · Whether the number can be a mobile phone: true for type mobile and for fixed_line_or_mobile (the US, Canada and other ranges where landline and mobile numbers share one range and cannot be told apart offline). Check type === 'mobile' for a confirmed mobile line.
- `isVoip` — boolean · Whether the number is a VOIP line (common in fraud)
- `isDisposable` — boolean · Whether the number is a known disposable/virtual number
- `type` — string · Line type: fixed_line, mobile, fixed_line_or_mobile, toll_free, premium_rate, shared_cost, voip, personal_number, pager, uan, or unknown
- `isValidNumber` — boolean · Whether the number is valid in its own detected country, regardless of the country supplied (a valid UK number sent with country=us is true here and false in isValid)
- `nationalSignificantNumber` — string · The national significant number as a digit string, keeping any leading zero (e.g. Italian 06 numbers)
- `location` — string · City or region the number range is assigned to, from libphonenumber's geocoding data; null for mobile, toll-free and other non-geographic numbers, or where no area data exists
- `carrier` — object · Carrier the mobile number range was originally allocated to, from libphonenumber's carrier data. A ported number still shows the original carrier. Null for fixed lines and where no data exists, including US and Canadian numbers
- `timezones` — array · IANA time zones the number may be in (one for most geographic numbers, the country's full list for mobile and toll-free numbers); null for invalid numbers
- `formatted` — object · The number formatted as international, national, RFC3966 and E.164
  - `formatted.international` — string · The number in international format
  - `formatted.national` — string · The number in national format
  - `formatted.rfc` — string · The number in RFC3966 format
  - `formatted.e164` — string · The number in E.164 format
- `riskScore` — number · Composite 0-100 risk score combining validity, disposable, VOIP and line-type signals (higher is riskier) · (premium)
- `riskLevel` — string · Risk band derived from the score: low, medium or high · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "country": "US",
    "detectedCountry": "US",
    "countryName": "United States",
    "countrycode": 1,
    "numberNational": 8165551017,
    "extension": null,
    "isValid": true,
    "isMobile": true,
    "isVoip": false,
    "isDisposable": false,
    "type": "fixed_line_or_mobile",
    "isValidNumber": true,
    "nationalSignificantNumber": "8165551017",
    "location": "Missouri",
    "carrier": null,
    "timezones": [
      "America/Chicago"
    ],
    "formatted": {
      "international": "+1 816-555-1017",
      "national": "(816) 555-1017",
      "rfc": "tel:+1-816-555-1017",
      "e164": "+18165551017"
    },
    "riskScore": 0,
    "riskLevel": "low"
  }
}
```

## Use cases

- **Account Signup Verification** — When users register, check validity and flag disposable or VoIP lines before sending one-time verification SMS codes.
- **CRM Lead Scrubbing** — Sales platforms inspect incoming prospect numbers and standardize them into E.164 format to keep contact records clean and dialable.
- **Outbound SMS Routing** — To prevent wasted spend on unroutable text messages, delivery systems screen out numbers typed as landlines, toll-free or premium-rate before sending; US and Canadian numbers return fixed_line_or_mobile because their landline and mobile ranges are shared.
- **Checkout Risk Screening** — Payment gateways identify virtual and disposable phone numbers during checkout to detect suspicious buyer profiles before processing charges.
- **Contact Time Windows** — Contact centers read the returned time zone and area so calls and texts go out during the recipient's local business hours.

## SDKs

- **npm** — `npm install @apiverve/phonenumbervalidator` (https://www.npmjs.com/package/@apiverve/phonenumbervalidator)
- **PyPI** — `pip install apiverve-phonenumbervalidator` (https://pypi.org/project/apiverve-phonenumbervalidator/)
- **NuGet** — `dotnet add package APIVerve.API.PhoneNumberValidator` (https://www.nuget.org/packages/APIVerve.API.PhoneNumberValidator)
- **Source** — https://github.com/apiverve/phonenumbervalidator-api

## More

- Full reference: https://docs.apiverve.com/ref/phonenumbervalidator
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
