Skip to main content
ContactLintGet a free API key

Home / Phone number validation API

Phone number validation API

Published ยท Updated

Email this to yourself

ContactLint checks phone numbers over a simple HTTP API. You send a number and a country. You get back whether the number is valid, whether it is possible, its line type and region where the metadata supports them, and the number in E.164, national, and international formats.

We built it for signup forms, CRM cleanup, and AI agents that need to confirm contact data before they use it.

This page also covers what a check like this cannot do. Better you hear that from us before you build on it.

Get a free phone validation API key. 250 checks per month, no card required. Only need to check one number? Use the free phone number validator.

What the phone check returns

Every number is parsed with libphonenumber metadata. Here is what comes back:

Store the E.164 version and you get one consistent format for every number, however the user typed it.

Carrier lookups are not offered today. If they are added, the terms of service will describe them first.

Send a request

The endpoint is POST /v1/phone/validate. Send your key as Authorization: Bearer YOUR_KEY or in an x-api-key header.

Example request

curl -X POST https://contactlint.com/v1/phone/validate \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{"phone":"YOUR_NUMBER","country":"US"}'

The body takes phone and a country, such as US.

The response

You get the valid and possible flags, the line type and region where the metadata supports them, and the three formats. Build against the OpenAPI 3.1 spec at /openapi.json.

What libphonenumber metadata can and cannot tell you

libphonenumber is an open source library for parsing and formatting phone numbers. ContactLint uses libphonenumber-js, released under the MIT license. It works from metadata: the rules for how numbers are built in each region.

That gets you a lot. It also has a hard limit. Metadata knows what a number should look like. It knows nothing about what is happening on the phone network right now.

Can metadata tell you this?

Question ContactLint answers it What it returns If not, what you need
Is the number formatted correctly for its country? Yes Valid flag
Could a number this length exist in that region? Yes Possible flag
What region is it from? Yes Region, where the metadata supports it
What line type does the metadata assign? Yes Line type, where the metadata supports it
What is the clean E.164 version? Yes E.164, national, and international formats
Is the number in service right now? No A live network lookup
Which carrier holds it today, or was it ported? No A live network lookup
Does it belong to the person who typed it? No SMS or call verification

A format check catches typos, missing digits, and wrong country codes. It will not catch a disconnected line. If any phone API calls a number "real" without a network lookup, ask how it knows.

When a metadata check is enough, and when it is not

A metadata check is enough when you want to:

You need more when you:

You can also stack them. Run the format check first, then spend money on a live check or an SMS code only for the numbers that pass.

One key for phone and email

ContactLint is an email and phone validation API, so the same key checks both fields. The email endpoint is POST /v1/email/validate. It looks at:

It never opens an SMTP connection to the mailbox.

Most signup forms ask for an email and a phone number. One key handles both. GET /v1/usage shows the free checks you have used this month and your credit balance. One check is one email address or phone number checked through the API or MCP.

Use it from an AI agent (MCP)

ContactLint runs an MCP server at https://contactlint.com/mcp. Point any MCP client that supports streamable HTTP at that URL and send the header Authorization: Bearer YOUR_KEY.

There are three tools: validate_phone, validate_email and validate_emails (up to 50 addresses per call). Each address or number checked uses one check.

That gives your agent a plain rule: confirm the number before you save it, text it, or hand it to a person.

Pricing and limits

Plans

All prices are in USD.

Plan Checks Price
Free 250 per month $0
Credit pack 5,000 $9
Credit pack 25,000 $35
Credit pack 100,000 $99

Free checks do not roll over. Credits kick in after the monthly free checks run out, and they do not expire. Unused credits are refundable within 14 days of purchase.

Errors and rate limits

Data sources and privacy

We do not store the emails or phone numbers you check. They are processed only to return a result. For each check, we record which key made it, whether it was a phone or email check, whether it used a free check or a credit, and the time.

See the privacy policy for how request data is handled. Use of the API is covered by our terms of service.

Questions: support@contactlint.com

Phone validation, phone verification and phone lookup: which one do you need?

These three terms get used as if they were one product. They are not, and the price difference between them is large. Knowing which one you need saves money and avoids building on a promise the API never made.

Term Question it answers How it works ContactLint
Phone number validation Is this a well formed number for its country, and what is its clean E.164 form? Parses the digits against numbering plan metadata. No network traffic. Yes: POST /v1/phone/validate
Phone number lookup Which carrier holds the number, and is it active today? A live query to carrier or HLR data, usually priced per lookup. No. The line type comes from metadata, not from the network.
Phone number verification Does the person on the form control this number? Sends a one-time code by SMS or voice and checks the reply. No. Use an SMS provider after the number passes validation.

Run them in that order. Validation is cheap and catches typos, missing digits and wrong country codes, so only numbers that pass go on to a paid lookup or an SMS code. Most signup forms stop after validation and only verify numbers they are about to text.

Validate UK, US and international numbers

The country field is a two-letter ISO 3166-1 code such as US, GB or AU. It is the default region for numbers typed without a plus prefix, which is how most people type a number on a local form. A number that starts with a plus and a country code carries its own region, so it parses the same with or without the country field. One integration covers every region in the libphonenumber metadata.

A UK request looks like this:

curl -X POST https://contactlint.com/v1/phone/validate \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{"phone":"020 7946 0958","country":"GB"}'

The trimmed response:

{
  "valid": true,
  "possible": true,
  "type": "FIXED_LINE",
  "region": "GB",
  "country_calling_code": "+44",
  "e164": "+442079460958",
  "national": "020 7946 0958",
  "international": "+44 20 7946 0958",
  "suggested_action": "accept"
}

Store e164. Show national back to the user on a local form and international on anything that crosses borders. If you send a number without a plus prefix and without a country, the API cannot know which numbering plan to use, so always send one or the other.

Test phone numbers you can use safely

Do not test with a real customer's number, and do not invent one: a made-up number can belong to someone. Regulators reserve ranges for fiction that are never assigned to a subscriber. In the US, 555-0100 to 555-0199 with any area code is reserved. In the UK, Ofcom reserves 07700 900000 to 900999 for mobiles, 020 7946 0000 to 0999 for London and 01632 960000 to 960999 as a generic geographic range. Here is what the API returns for each, from the current metadata:

phone country valid possible type e164 suggested_action
202-555-0143 US true true FIXED_LINE_OR_MOBILE +12025550143 accept
+1 202 555 0143 (none) true true FIXED_LINE_OR_MOBILE +12025550143 accept
020 7946 0958 GB true true FIXED_LINE +442079460958 accept
07700 900123 GB false true null +447700900123 review
01632 960123 GB false true null +441632960123 review
555-0143 US false false null +15550143 reject

The US fictional numbers come back valid, so they exercise the accept path. The two UK drama ranges come back possible but not valid, because the metadata knows those ranges are reserved, which makes them a handy way to exercise the review path. A number with too few digits exercises reject. Together that covers every value of suggested_action without touching a real line.

Free phone number validation API: what you get without paying

FAQ

Does ContactLint check if a phone number is active?

No. ContactLint parses the number against libphonenumber metadata. It tells you whether the number is valid or possible, its line type and region where the metadata supports them, and its formatted versions. It does not run a live network lookup, so it cannot confirm the number is in service or who holds it today.

What is the difference between valid and possible?

A possible number has a length that could work for its region. A valid number also matches the known number patterns in libphonenumber metadata for that region. Use possible as a loose check on a form, and valid as the stronger check before you store or dial a number.

How much does the phone validation API cost?

You get 250 free checks per month with no card required. After that you buy credit packs in USD: 5,000 checks for $9, 25,000 for $35, or 100,000 for $99. Each phone validation uses one check, from the API or the MCP tool. Credits do not expire, and unused credits are refundable within 14 days of purchase.

Can I use the same key for email validation?

Yes. One ContactLint key works for both endpoints: POST /v1/phone/validate and POST /v1/email/validate. Free checks and credits are tracked per key, and GET /v1/usage shows both. That means one signup and one balance for checking both fields on a signup form or CRM record.

Can an AI agent validate phone numbers with ContactLint?

Yes. Point any MCP client that supports streamable HTTP at https://contactlint.com/mcp and send your key in the Authorization header as a Bearer token. The server exposes three tools: validate_phone, validate_email and validate_emails (a list of up to 50). Each address or number checked uses one check from your free allowance or credits.

What happens if I send too many requests?

ContactLint allows 60 requests per minute per key. Past that, the API returns 429. Other errors are plain too: 401 for a missing or invalid key, 402 when free checks are used up and you have no credits, and 400 for bad input. Back off and retry on 429.

Is there a free phone number validation API?

Yes. A ContactLint key includes 250 free checks per month with no card, and phone and email checks share that allowance. After the free checks you buy a one-time credit pack, starting at $9 for 5,000 checks, with no subscription and no expiry. For a single number, the free phone number validator on this site needs no key at all.

What is the difference between phone validation, phone verification and phone lookup?

Validation checks that a number is well formed for its country and returns the clean E.164 form. It is a metadata check with no network traffic. Lookup asks carrier or HLR data who holds the number and whether it is active. Verification sends a one-time code by SMS or voice to prove the person controls the number. ContactLint does validation only, which is why it costs a fraction of the other two.

Does the API validate UK phone numbers?

Yes. Send the number with country GB, or with the +44 prefix, and the API returns the valid and possible flags, the line type and region where the metadata supports them, and the E.164 form such as +442079460958. The same call handles every region in the libphonenumber metadata, so one integration covers UK, US and international numbers.

Which test phone numbers can I use?

Use numbers that regulators reserve for fiction, so they never belong to a real person. In the US that is 555-0100 to 555-0199 with any area code, for example 202-555-0143. In the UK it is 07700 900000 to 900999, 020 7946 0000 to 0999 and 01632 960000 to 960999. 202-555-0143 comes back valid, and the UK mobile and 01632 ranges come back possible but not valid, so you can test both the accept and the review paths.

Can I validate mobile numbers only?

Yes. Read the type field. MOBILE means the metadata assigns the number to a mobile range, FIXED_LINE to a landline range, and FIXED_LINE_OR_MOBILE where a country, such as the US, does not separate the two. Review or reject numbers whose type does not fit your use, for example a landline where you plan to send SMS.

Is ContactLint a phone number lookup API?

No. A lookup API queries carrier data and charges per query. ContactLint validates the format from numbering plan metadata, which is why 5,000 checks cost $9. Run validation first and send only the numbers that pass to a lookup provider, if you need one at all.

Start checking numbers

Signup is one short form. No email is sent, and your key is shown once on the next page, so save it.

Get a free phone validation API key

250 checks per month, no card required. Already have a key? Send your first number to POST /v1/phone/validate. Just need to check one number right now? Use the free phone number validator.

Get a free API key. 250 checks per month, no card required.