Manual verification doesn't scale. If your app handles user sign-ups, customer onboarding, or marketing outreach, you need automated phone number validation. An API integration lets you:
This guide covers the common patterns, code examples in four languages, and production best practices.
Verify a single number. Send a phone number, receive status and metadata.
Verify up to 100,000 numbers in one request. Returns a batch ID for polling or webhook delivery.
Check the status of a bulk verification job. Returns progress percentage and result download URL when complete.
Check account balance, usage stats, and rate limit information.
import requests
import time
API_KEY = "your_api_key_here"
BASE_URL = "https://api.numbercheck.live/v1"
# Single number verification
def verify_single(number):
resp = requests.post(
f"{BASE_URL}/verify",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"number": number}
)
return resp.json()
# Example usage
result = verify_single("+12125550123")
print(f"Status: {result['status']}, Confidence: {result['confidence']}")
# Bulk verification
def verify_bulk(numbers):
resp = requests.post(
f"{BASE_URL}/verify/bulk",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"numbers": numbers}
)
batch_id = resp.json()["batch_id"]
# Poll until complete
while True:
status = requests.get(
f"{BASE_URL}/batch/{batch_id}",
headers={"Authorization": f"Bearer {API_KEY}"}
).json()
if status["status"] == "completed":
return status["result_url"]
time.sleep(5)
# Process 100K numbers in one call
with open("numbers.txt") as f:
all_numbers = [line.strip() for line in f]
result_url = verify_bulk(all_numbers)
print(f"Results ready at: {result_url}")
const axios = require('axios');
const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://api.numbercheck.live/v1';
const client = axios.create({
baseURL: BASE_URL,
headers: { Authorization: `Bearer ${API_KEY}` }
});
// Single verification
async function verifySingle(number) {
const { data } = await client.post('/verify', { number });
return data; // { status: 'active', confidence: 0.9999 }
}
// Bulk verification with webhook
async function verifyBulk(numbers, webhookUrl) {
const { data } = await client.post('/verify/bulk', {
numbers,
webhook: webhookUrl
});
return data.batch_id; // Poll or wait for webhook
}
// Usage
(async () => {
const result = await verifySingle('+66812345678');
console.log(result);
})();
When processing millions of numbers, follow these patterns:
Split lists over 100K into smaller batches. Most APIs enforce a per-request limit. Process chunks in parallel for maximum throughput.
Polling wastes API calls and adds latency. Register a webhook URL and let the service notify you when processing completes.
Numbers don't change status frequently. Cache validation results for 24-48 hours to avoid redundant API calls and reduce costs.
Network failures happen. Wrap API calls in exponential backoff retry logic with a max of 3 attempts.
Instead of polling, register a webhook endpoint on your server:
# Your webhook endpoint (Flask example)
@app.route('/webhook/numbercheck', methods=['POST'])
def handle_batch_complete():
payload = request.json
# payload = {
# "batch_id": "abc123",
# "status": "completed",
# "total": 100000,
# "active": 78234,
# "inactive": 15210,
# "invalid": 6556,
# "result_url": "https://api.numbercheck.live/v1/batch/abc123/download"
# }
download_results(payload['result_url'])
return {"received": True}, 200
401 鈥?Invalid or expired API key. Check your authorization header.429 鈥?Rate limit exceeded. Slow down and implement exponential backoff.422 鈥?Invalid input. The number format is malformed or missing required fields.500 鈥?Server error. Retry with backoff; alert if it persists.Enterprise plans typically allow 10,000+ requests per minute. For bulk processing, batch your requests (100K numbers per call) rather than making thousands of individual verification calls. It's faster, cheaper, and stays within rate limits.
See our data cleaning guide for the full pre-validation workflow, and the country format reference for number formatting rules.
Get your API key and start validating numbers in minutes. SDKs available for Python, Node.js, PHP, and Go.
Get API Access