Postio Phone API

Validates and enriches international phone numbers. Numbers are parsed with libphonenumber inside the Worker (so invalid input is rejected in around a millisecond, before any external lookup), then valid numbers are sent to the operator's (Home Location Register) HLR for live carrier, ported status, and reachability. Any country libphonenumber supports works; UK numbers come back with the most complete carrier metadata.

GitHub OpenAPI

Operations 1

GET /phone/{number} Validate number #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/postio-co-uk:postio-co-uk-phone-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

postio-co-uk-phone-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Postio Phone API
  description: 'Postio is the UK validation API for **addresses**, **emails** and **phone numbers**, running on Cloudflare''s edge so requests are answered close to wherever your users are.


    > **First time?** Sign up free — first 100 lookups on us, no card needed.


    Every endpoint is a `GET` returning JSON, served over HTTPS at `https://api.postio.co.uk/v1`. If you can speak HTTP and parse JSON, you can integrate in under five minutes — copy your `pk_*` key from the dashboard and you''re away.


    ## Authentication


    Send your key in the `x-api-key` header on every request:


    ```bash

    curl https://api.postio.co.uk/v1/address/search?q=57+wimpole+street \

    -H "x-api-key: YOUR_API_KEY"

    ```


    Keys are scoped per service (address / email / phone) and can be locked to specific origins or IP ranges in the dashboard. Treat them as secrets — don''t ship them in client-side code unless the key is locked to your domains.


    Missing or invalid key → `401`. Key out of credit → `402`.


    ## Rate limiting


    Each key is limited to **30 requests per second**. Bursts past that return `429` — back off and retry. Sustained abuse can result in the key being suspended. If you legitimately expect higher throughput, get in touch and we''ll raise the limit.


    ## Versioning


    The API is versioned by URL prefix — currently `/v1/`. Backwards-compatible changes (new endpoints, new optional parameters, new response fields) ship under the same version. Anything breaking gets a new prefix.


    ## Response shape


    Every response follows the same envelope:


    ```json

    {

    "success": true,

    "results": [ /* one or more result objects */ ],

    "meta": {

    "countResults": 1,

    "requestId": "dd273343-4597-4fa4-bcb6-c74a608c10dc",

    "performance": { "workerMs": 15, "lookupMs": 12 }

    }

    }

    ```


    On error, `success` is `false`, `results` is empty, and a top-level `error` field carries a stable machine-readable code (`details` adds context for humans).


    `requestId` is worth logging — it''s how we trace any request you raise with us.


    ### Performance


    Two numbers, both in milliseconds, both measured by the Worker itself:


    - **`workerMs`** — wall-clock at the edge, from the moment the

    request arrives at our Cloudflare Worker to the moment we hand the

    response back. This is the latency *we* control end-to-end.

    - **`lookupMs`** — the slice of `workerMs` spent in the upstream

    lookup (PAF index for address, MX resolution for email, HLR query

    for phone). Subtract `lookupMs` from `workerMs` and you''ve got the

    Worker''s own compute — auth, rate-limiting, parsing, shaping the

    response.


    The API runs on Cloudflare Workers from every edge location; the

    address index is replicated next to the Worker. Most lookups settle

    in the low tens of milliseconds end-to-end, before your own network

    hop home.


    ## Free vs billable


    `/connect` and `/address/search` are free, but monitored for abuse patterns. Everything else is billable **on a hit with results only** — a query that returns no match (e.g. a valid postcode with no delivery points) is `200` with an empty `results` array and is not charged.


    ## Errors


    HTTP status conveys the outcome class:


    | Status | Meaning |

    | --- | --- |

    | `200` | Success — including "no match", which is still 200 |

    | `400` | Validation failed |

    | `401` | Missing or invalid API key |

    | `402` | Out of credit — top up to resume billable requests |

    | `403` | Service disabled, or origin/IP not allowed for this key |

    | `429` | Rate limit exceeded |

    | `5xx` | Server-side problem — safe to retry |


    Endpoint-specific errors are documented per endpoint below.


    ## Contact


    Anything missing or broken? reach out to technical support.'
  version: 1.2.0
servers:
- url: https://api.postio.co.uk/v1
security:
- apiKey: []
tags:
- name: Phone
  description: 'Validates and enriches international phone numbers.


    Numbers are parsed with libphonenumber inside the Worker (so invalid input is rejected in around a millisecond, before any external lookup), then valid numbers are sent to the operator''s (Home Location Register) HLR for live carrier, ported status, and reachability.


    Any country libphonenumber supports works; UK numbers come back with the most complete carrier metadata.'
  x-scalar-icon: phone-telephone
paths:
  /phone/{number}:
    get:
      operationId: getV1PhoneByNumber
      tags:
      - Phone
      summary: Validate number
      description: 'Parses the supplied number with libphonenumber (E.164, international, or national — all accepted). On a valid parse, runs a live HLR (Home Location Register) lookup against the carrier network and returns:


        - **Current carrier** — the network the number is on right now, even after porting.

        - **Original carrier** — the network it was issued on.

        - **Ported flag** — whether the number has moved network.

        - **Reachable flag** — whether the number is currently powered on and attached to a network.

        - **MCC / MNC** — the standard mobile country and network codes.


        Pass numbers in E.164 (`+447700900123`) for unambiguous results — URL-encode the leading `+` as `%2B`. Other formats work but rely on libphonenumber''s heuristics for country detection. Invalid numbers return `200` with `isValid: false` and the parsed fields it could derive still populated.'
      parameters:
      - name: x-api-key
        in: header
        required: true
        description: Your Postio API key. Get one in the dashboard.
        schema:
          type: string
          example: YOUR_API_KEY
      - name: number
        in: path
        required: true
        description: Phone number in E.164 (`+447700900123`) or any format libphonenumber can parse. URL-encode the leading `+` as `%2B`.
        schema:
          type: string
          example: '+447700900123'
      responses:
        '200':
          description: Validation + lookup verdict.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneEnvelope'
              example:
                success: true
                results:
                - number: '+447700900123'
                  isValid: true
                  isPossible: true
                  type: mobile
                  countryCode: '44'
                  countryName: United Kingdom
                  nationalFormat: 07700 900123
                  internationalFormat: +44 7700 900123
                  e164Format: '+447700900123'
                  originalCarrier: null
                  currentCarrier: Vodafone Limited
                  isPorted: true
                  isReachable: true
                  mcc: '234'
                  mnc: '15'
                  level: live
                meta:
                  countResults: 1
                  requestId: dd273343-4597-4fa4-bcb6-c74a608c10dc
                  performance:
                    workerMs: 116
                    lookupMs: 113
        '400':
          description: Bad request — validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                success: false
                error: validation_failed
                results: []
                meta:
                  countResults: 0
                  requestId: dd273343-4597-4fa4-bcb6-c74a608c10dc
                  performance:
                    workerMs: 4
                    lookupMs: 0
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                success: false
                error: invalid_api_key
                results: []
                meta:
                  countResults: 0
                  requestId: dd273343-4597-4fa4-bcb6-c74a608c10dc
                  performance:
                    workerMs: 4
                    lookupMs: 0
        '402':
          description: Out of credit. Top up to resume billable requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                success: false
                error: out_of_credit
                results: []
                meta:
                  countResults: 0
                  requestId: dd273343-4597-4fa4-bcb6-c74a608c10dc
                  performance:
                    workerMs: 4
                    lookupMs: 0
        '403':
          description: Forbidden — service disabled, or origin/IP not allowed for this key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                success: false
                error: service_disabled
                results: []
                meta:
                  countResults: 0
                  requestId: dd273343-4597-4fa4-bcb6-c74a608c10dc
                  performance:
                    workerMs: 4
                    lookupMs: 0
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                success: false
                error: rate_limited
                results: []
                meta:
                  countResults: 0
                  requestId: dd273343-4597-4fa4-bcb6-c74a608c10dc
                  performance:
                    workerMs: 4
                    lookupMs: 0
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                success: false
                error: server_error
                results: []
                meta:
                  countResults: 0
                  requestId: dd273343-4597-4fa4-bcb6-c74a608c10dc
                  performance:
                    workerMs: 4
                    lookupMs: 0
components:
  schemas:
    PhoneEnvelope:
      type: object
      properties:
        success:
          type: boolean
          const: true
        results:
          type: array
          items:
            $ref: '#/components/schemas/PhoneResult'
        meta:
          $ref: '#/components/schemas/Meta'
      required:
      - success
      - results
      - meta
    Performance:
      type: object
      properties:
        workerMs:
          type: integer
          minimum: 0
        lookupMs:
          type: integer
          minimum: 0
      required:
      - workerMs
      - lookupMs
      example:
        workerMs: 15
        lookupMs: 12
    PhoneResult:
      type: object
      properties:
        number:
          type: string
        isValid:
          type: boolean
        isPossible:
          type: boolean
        type:
          type:
          - string
          - 'null'
        countryCode:
          type:
          - string
          - 'null'
        countryName:
          type:
          - string
          - 'null'
        nationalFormat:
          type:
          - string
          - 'null'
        internationalFormat:
          type:
          - string
          - 'null'
        e164Format:
          type:
          - string
          - 'null'
        originalCarrier:
          type:
          - string
          - 'null'
        currentCarrier:
          type:
          - string
          - 'null'
        isPorted:
          type:
          - boolean
          - 'null'
        isReachable:
          type:
          - boolean
          - 'null'
        mcc:
          type:
          - string
          - 'null'
        mnc:
          type:
          - string
          - 'null'
        level:
          type:
          - string
          - 'null'
        lookupError:
          type: string
      required:
      - number
      - isValid
      - isPossible
      - type
      - countryCode
      - countryName
      - nationalFormat
      - internationalFormat
      - e164Format
      - originalCarrier
      - currentCarrier
      - isPorted
      - isReachable
      - mcc
      - mnc
      - level
      example:
        number: '+447700900123'
        isValid: true
        isPossible: true
        type: mobile
        countryCode: '44'
        countryName: United Kingdom
        nationalFormat: 07700 900123
        internationalFormat: +44 7700 900123
        e164Format: '+447700900123'
        originalCarrier: null
        currentCarrier: Vodafone Limited
        isPorted: true
        isReachable: true
        mcc: '234'
        mnc: '15'
        level: live
    ErrorEnvelope:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: string
        details:
          type:
          - string
          - 'null'
        results:
          type: array
          items: {}
          minItems: 0
          maxItems: 0
        meta:
          $ref: '#/components/schemas/Meta'
      required:
      - success
      - error
      - results
      - meta
    Meta:
      type: object
      properties:
        countResults:
          type: integer
          minimum: 0
        requestId:
          type: string
        performance:
          $ref: '#/components/schemas/Performance'
      required:
      - countResults
      - requestId
      - performance
      example:
        countResults: 1
        requestId: dd273343-4597-4fa4-bcb6-c74a608c10dc
        performance:
          workerMs: 15
          lookupMs: 12
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Postio API key, in the format `pk_…`. Get one free at https://postio.co.uk/signup — first 100 lookups on us, no card needed.