Data validation API Phone Number Validation API
Send a phone number and get whether it is valid, its country and type, and the number in standard formats.
POSThttps://api.pathclue.com/v1/validate/phoneBetaCall it from your code
Set your key in the TAPCUB_API_KEY environment variable. Base URL: https://api.pathclue.com/v1.
curl -X POST https://api.pathclue.com/v1/validate/phone \
-H "Authorization: Bearer $TAPCUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"number":"(415) 555-2671","country":"US"}'const res = await fetch('https://api.pathclue.com/v1/validate/phone', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TAPCUB_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"number": "(415) 555-2671",
"country": "US"
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());import os
import requests
res = requests.post(
"https://api.pathclue.com/v1/validate/phone",
headers={"Authorization": f"Bearer {os.environ['TAPCUB_API_KEY']}"},
json={
"number": "(415) 555-2671",
"country": "US",
},
timeout=120,
)
res.raise_for_status()
print(res.json())<?php
$ch = curl_init('https://api.pathclue.com/v1/validate/phone');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('TAPCUB_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'number' => '(415) 555-2671',
'country' => 'US',
]),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status >= 300) {
throw new RuntimeException("HTTP $status: $body");
}
print_r(json_decode($body, true));package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
body := []byte(`{"number":"(415) 555-2671","country":"US"}`)
req, err := http.NewRequest("POST", "https://api.pathclue.com/v1/validate/phone", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("TAPCUB_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if res.StatusCode >= 300 {
panic(fmt.Sprintf("HTTP %d: %s", res.StatusCode, out))
}
fmt.Println(string(out))
}Request parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
number | string | Yes | — | Phone number in any common format, e.g. +44 20 7946 0958, (415) 555-2671. Extensions like ext. 12 are recognised. |
country | string | No | — | Two-letter country code (ISO 3166-1, e.g. US) for numbers written without +country code. |
Example response
Successful responses carry the X-Credits-Charged and X-Credits-Balance headers. Errors return {"error":{"code","message"}} and are never charged.
{
"number": "(415) 555-2671",
"valid": true,
"possible": true,
"status": "valid",
"reason": null,
"country": "US",
"callingCode": "+1",
"type": "fixed_line_or_mobile",
"e164": "+14155552671",
"international": "+1 415 555 2671",
"national": "(415) 555-2671",
"uri": "tel:+14155552671",
"extension": null
}What it costs
| Price | 0.2 credits per call |
|---|---|
| In US dollars | about $0.0002 · $0.20 / 1,000 |
| Credits | Free or paid credits |
| Rate limit | Free 10 / min · Plus 60 / min · Pro 300 / min |
| Free daily cap | 1,000 calls a day per key on free accounts |
| Charged | Only on success — errors and timeouts are free |
What people build with it
Sign-up and checkout
Catch wrong numbers before you need to reach the customer.
SMS lists
Keep only mobile numbers in SMS campaigns.
Data imports
Normalize numbers from spreadsheets into one format.
Frequently asked questions
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
Does it tell me if the number is active?
No. It checks numbering plans, not carrier networks, so it can’t tell whether a line is switched on.
Which number types are detected?
Mobile, fixed line, toll-free, premium rate, VoIP and the other types defined in each country’s numbering plan.
How much does the Phone Number Validation API cost?
Each successful call costs 0.2 credits per call (about $0.0002). 1 credit is about $0.001. Failed calls — invalid input, unreachable sites, timeouts or errors on our side — are not charged.
Can I try it for free?
Yes. New accounts get 300 credits and every account gets 30 free credits a day, and they work on this endpoint. You can also try the matching free tool on tapcub.com without a key.
What are the rate limits?
Free accounts can make 10 calls a minute and 1,000 a day per key; Plus allows 60 a minute and Pro 300. Over the limit you get HTTP 429 with a Retry-After header, and nothing is charged.
How do I get an API key?
Sign in to the TapCub console, verify your email and create a key on the Tools → API page. Keys start with tck_ and are shown once; send them in the Authorization: Bearer header.
Get your API key
Create a key in the console and make your first call in a minute. Light endpoints run on free daily credits.