Glossary

What is E.164?

E.164 is the ITU-T standard for international phone number formatting: a leading plus sign, then the country calling code, then the national subscriber number, with a maximum of fifteen digits in total and no spaces, dashes or parentheses. It is the format nearly every phone number API, Telebase included, expects as input, because it removes ambiguity about which country a number belongs to.

The structure of an E.164 number

A UK mobile number in national format might be written 07700 900000. In E.164, the same number is +447700900000: the leading zero is dropped, the country code 44 replaces it, and the whole thing is written as one continuous digit string with a leading plus. There are no internal spaces or separators in the canonical form, though some systems display them for readability while storing the raw digits.

Why phone APIs insist on E.164

A national-format number is ambiguous outside its own country: 07700 900000 could belong to several different national numbering plans depending on context. E.164 removes that ambiguity entirely, which is why it has become the de facto input format for carrier lookup, messaging and voice APIs. Telebase's lookup endpoint requires E.164 for exactly this reason: the numberType and country fields it returns depend on unambiguous parsing of the number's origin.

The URL encoding trap

The plus sign in E.164 is a reserved character in a URL query string, where it conventionally means a space. Passed unencoded, +447700900000 in a query parameter can be silently interpreted as a space followed by the digits, breaking the lookup. The fix is to percent-encode the plus sign as %2B before building the request URL, so +447700900000 becomes %2B447700900000.

sh
curl -s 'https://telebase.fatcatremote.com/api/lookup?phone=%2B447700900000' \
  -H 'Authorization: Bearer tb_live_xxxxxxxxxxxxxxxxxxxxxxxx'

Most HTTP client libraries offer a URL-encoding helper that handles this automatically; the mistake usually happens when a phone number is concatenated directly into a query string by hand. See E.164 formatting and URL encoding for phone APIs for the full walkthrough with common libraries.

$0.03 per query. No contract. No minimum spend. Billed via Paddle.
Request early access