Talky home

Number Lookup API

Check phone numbers before you send: whether a number is valid, which carrier it belongs to, and whether it is mobile, landline or VoIP. One number at a time, up to 100 per request, or up to 10,000 per CSV batch.

On this page

What a lookup tells you

Lookups query carrier and numbering databases. They do not contact the phone or its network (this is not a live HLR query).

InformationProvidedNotes
Valid / invalid numberYesInvalid numbers are free and never sent to our provider.
Carrier nameYesFor Canadian numbers this may be the original carrier if the number was ported.
Line typeYesmobile, landline, voip, toll_free, premium or unknown.
Country, MCC / MNCYesMCC is sometimes a country code (e.g. US) rather than numeric.
PortedUS onlyAlways false for Canadian numbers (no portability data).
Phone switched on / reachableNoNeeds a live network query, which this service does not make. Every result has "lookup_type": "database".
RoamingNo
Still in serviceNo

Authentication

Base URL: https://api.talky.ca/api/v1/hlr/

Create an API key on the API Keys page of your dashboard, ticking the hlr:lookup scope (add messages:read if the key should only read results), and send it in the Authorization header. The secret is shown only once, when you create the key.

Authorization: ApiKey tk_AbCd1234.your-secret

The key needs one of these scopes:

ToAny one of these scopes
Run lookups (charged)hlr:lookup, send or messages:send
Read history, batches, stats, balanceany of the above, or read / messages:read

A key without the right scope gets 403. Requests from a logged-in dashboard session work too.

Pricing and billing

Look up one number

POST/lookup/ with {"phone": "..."} (any common format; Canadian/US numbers without a country code are accepted).

curl -X POST https://api.talky.ca/api/v1/hlr/lookup/ \
  -H "Authorization: ApiKey tk_AbCd1234.your-secret" \
  -H "Content-Type: application/json" \
  -d '{"phone": "+14165550100"}'
{
  "id": "6f1c…",
  "phone": "+14165550100",
  "is_valid": true,
  "is_ported": false,
  "network_type": "mobile",
  "carrier": "Rogers Wireless",
  "mcc": "302",
  "mnc": "720",
  "country": "Canada",
  "country_code": "CA",
  "error_message": null,
  "lookup_type": "database",
  "charged": 0.01,
  "created_at": "2026-10-27T03:38:56.573200+00:00"
}

GET /lookup/?phone_number=+14165550100 works the same way.

Bulk: up to 100 numbers

POST/lookup/bulk/ with {"phone_numbers": [...]}. Repeated numbers are looked up (and charged) once. Results are keyed by number.

curl -X POST https://api.talky.ca/api/v1/hlr/lookup/bulk/ \
  -H "Authorization: ApiKey tk_AbCd1234.your-secret" \
  -H "Content-Type: application/json" \
  -d '{"phone_numbers": ["+14165550100", "+16045550123"]}'
{
  "success": true,
  "total": 2,
  "completed": 2,
  "stopped": null,
  "not_processed": [],
  "results": { "+14165550100": { … }, "+16045550123": { … } }
}

A bulk request stops early rather than time out: stopped is "time", "balance" or "daily_limit", and the numbers it didn't reach are listed in not_processed (not charged). Send those again, or use a batch.

CSV batches: up to 10,000 numbers

POST/batch/ as multipart/form-data with a file field: a .csv (max 2 MB) whose first column is the phone number. Header rows, blank lines and duplicates are skipped. The batch is refused up front (402) if your balance can't cover its valid numbers.

curl -X POST https://api.talky.ca/api/v1/hlr/batch/ \
  -H "Authorization: ApiKey tk_AbCd1234.your-secret" \
  -F "file=@numbers.csv"

The batch runs in the background (usually a few hundred numbers a minute). Poll its status:

RequestReturns
GET/batches/Your batches, 20 per page (?page=2, ?status=completed)
GET/batches/{id}/status (pending, processing, completed, failed), processed, valid, invalid, total_cost, error_message
GET/batches/{id}/results/Results in upload order (?limit=100&offset=0, max 1,000 per page)
GET/batches/{id}/export/?format=csvAll results as CSV (or format=json)

A batch that runs out of balance or hits the daily limit stops with status: "failed" and an error_message; the numbers already done are kept and can be exported.

History, stats and balance

RequestReturns
GET/history/?limit=50Your most recent lookups (max 500; &carrier=rogers to filter)
GET/stats/?days=30Totals: lookups, valid, invalid, ported, amount spent
GET/carriers/?days=30Your valid lookups by carrier
GET/balance/{"balance": 12.34, "enabled": true, "price": 0.01}

You only ever see your own lookups.

Limits

LimitValue
Requests60 per minute per account (429 beyond that)
Bulk request100 numbers
Batch file10,000 numbers, 2 MB
Lookups per day10,000 per account (batches waiting to run count toward it)
If platform-wide demand is unusually high, lookups may be paused until midnight (Toronto time); requests then get 429 with a message saying so.

Errors

Errors are JSON with a detail message.

StatusMeaning
400Missing or malformed input (e.g. no phone, more than 100 numbers, not a CSV)
401Missing, invalid or revoked API key
402Your balance doesn't cover the request; nothing was charged
403The key lacks a required scope, or the account is suspended
404Batch not found (or not yours)
429Rate limit, your daily limit, or the platform pause; the message says which
503Number Lookup isn't available at the moment

A result with error_message set (e.g. "Invalid phone number" or "Lookup failed; not charged") is a completed request that wasn't charged.

Questions: contact support from your dashboard.