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-address-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: 3.2.0
info:
title: Postio Address 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: Address
description: 'Postio are an official UK Royal Mail Address Data Provider.
Lookups search against Royal Mail''s Postcode Address File (PAF) and the British Forces Post Office (BFPO) database. Search drives single-line typeahead; Postcode and UDPRN endpoints return the full delivery-point record. Updates directly from Royal Mail are refreshed daily.'
x-scalar-icon: travel-map-earth-globe
paths:
/address/search:
get:
operationId: getV1AddressSearch
tags:
- Address
summary: Search
description: 'Free, single-line autocomplete over UK PAF + BFPO. Feed it whatever the user has typed — building, street, postcode, organisation, or any combination — and get back a slim `{ udprn, suggestion }` list of matches. To pull the full address for the one the user picks, call `/address/udprn/{udprn}`. Free to use.
Search is backed by a Typesense index replicated next to the Worker, so typeahead queries usually resolve in single-digit milliseconds before network.'
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: q
in: query
required: true
description: 'Search string (free-form: building, street, postcode, organisation).'
schema:
type: string
example: 57 wimpole street
- name: max_results
in: query
required: false
description: Max results to return. Default 10, max 50.
schema:
type: integer
minimum: 1
maximum: 50
default: 10
responses:
'200':
description: Search results (zero or more matches).
content:
application/json:
schema:
$ref: '#/components/schemas/AddressSearchEnvelope'
example:
success: true
results:
- udprn: 25742215
suggestion: 57 Wimpole Street, London, W1G 8YW
- udprn: 19152598
suggestion: 57 Wimpole Court, Wimpole Street, Portsmouth, PO1 1QT
meta:
countResults: 2
requestId: 0991208d-c175-4fb3-880f-40471013be6d
performance:
workerMs: 19
lookupMs: 16
'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
/address/postcode/{postcode}:
get:
operationId: getV1AddressPostcodeByPostcode
tags:
- Address
summary: Postcode
description: 'Returns every PAF delivery point at the given postcode, ordered by building number. Whitespace and case are normalised, so `w1g8yw`, `W1G 8YW`, and `w1g 8yw` all resolve to the same record. Billable on a hit. A syntactically valid postcode with no delivery points (a withdrawn postcode, or one outside PAF''s coverage) returns `200` with `results: []` and is not charged.'
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: postcode
in: path
required: true
description: UK postcode. Whitespace and case are normalised.
schema:
type: string
example: W1G 8YW
- name: max_results
in: query
required: false
description: Max results to return. Default 100, max 100. UK PAF postcodes max out at ~100 delivery points so a single page covers every postcode.
schema:
type: integer
minimum: 1
maximum: 100
default: 100
responses:
'200':
description: Addresses at the postcode (empty array if none).
content:
application/json:
schema:
$ref: '#/components/schemas/AddressPostcodeEnvelope'
example:
success: true
results:
- udprn: 25742215
postcode: W1G 8YW
postcode_outward: W1G
postcode_inward: 8YW
postcode_type: S
address_line_1: 57 Wimpole Street
post_town: LONDON
building_number: '57'
thoroughfare: Wimpole Street
delivery_point_suffix: 1Y
country: England
district: City of Westminster London Boro
ward: Marylebone Ward
latitude: 51.51922791
longitude: -0.14898992
eastings: 528525
northings: 181658
meta:
countResults: 1
requestId: c7eb0ed4-9768-4c2b-824e-16abff64d6cd
performance:
workerMs: 15
lookupMs: 12
'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
/address/udprn/{udprn}:
get:
operationId: getV1AddressUdprnByUdprn
tags:
- Address
summary: UDPRN
description: Looks up a single delivery point by its Unique Delivery Point Reference Number — Royal Mail's stable per-address ID. Use this after `/address/search` to fetch the full record for the address the user picked, or to refresh a stored record. Billable on a hit. A UDPRN that doesn't exist returns `404`; misses are not charged.
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: udprn
in: path
required: true
schema:
type: string
example: '25742215'
responses:
'200':
description: The matching address.
content:
application/json:
schema:
$ref: '#/components/schemas/AddressUdprnEnvelope'
example:
success: true
results:
- udprn: 25742215
postcode: W1G 8YW
postcode_outward: W1G
postcode_inward: 8YW
postcode_type: S
address_line_1: 57 Wimpole Street
post_town: LONDON
building_number: '57'
thoroughfare: Wimpole Street
delivery_point_suffix: 1Y
country: England
district: City of Westminster London Boro
ward: Marylebone Ward
latitude: 51.51922791
longitude: -0.14898992
eastings: 528525
northings: 181658
meta:
countResults: 1
requestId: dd273343-4597-4fa4-bcb6-c74a608c10dc
performance:
workerMs: 19
lookupMs: 16
'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
'404':
description: UDPRN not found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorEnvelope'
example:
success: false
error: udprn_not_found
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:
AddressPostcodeEnvelope:
type: object
properties:
success:
type: boolean
const: true
results:
type: array
items:
$ref: '#/components/schemas/Address'
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
Address:
type: object
properties:
udprn:
type: integer
description: Unique Delivery Point Reference Number — Royal Mail's per-address ID.
postcode:
type: string
postcode_outward:
type: string
postcode_inward:
type: string
postcode_type:
type: string
address_line_1:
type: string
address_line_2:
type: string
address_line_3:
type: string
post_town:
type: string
organisation_name:
type: string
department_name:
type: string
building_name:
type: string
building_number:
type: string
sub_building_name:
type: string
po_box:
type: string
thoroughfare:
type: string
dependent_thoroughfare:
type: string
dependent_locality:
type: string
double_dependent_locality:
type: string
delivery_point_suffix:
type: string
country:
type: string
district:
type: string
description: Administrative district or unitary authority. ONS administrative geography, not Royal Mail postal data — not part of the postal address.
ward:
type: string
description: Electoral ward. ONS administrative geography, not Royal Mail postal data — not part of the postal address.
latitude:
type: number
longitude:
type: number
eastings:
type: integer
northings:
type: integer
required:
- udprn
- postcode
example:
udprn: 25742215
postcode: W1G 8YW
postcode_outward: W1G
postcode_inward: 8YW
postcode_type: S
address_line_1: 57 Wimpole Street
post_town: LONDON
building_number: '57'
thoroughfare: Wimpole Street
delivery_point_suffix: 1Y
country: England
district: City of Westminster London Boro
ward: Marylebone Ward
latitude: 51.51922791
longitude: -0.14898992
eastings: 528525
northings: 181658
AddressSearchEnvelope:
type: object
properties:
success:
type: boolean
const: true
results:
type: array
items:
$ref: '#/components/schemas/AddressSearchResult'
meta:
$ref: '#/components/schemas/Meta'
required:
- success
- results
- meta
AddressSearchResult:
type: object
properties:
udprn:
type: integer
suggestion:
type: string
description: Single-line typeahead label, e.g. "57 Wimpole Street, London, W1G 8YW".
required:
- udprn
- suggestion
example:
udprn: 25742215
suggestion: 57 Wimpole Street, London, W1G 8YW
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
AddressUdprnEnvelope:
type: object
properties:
success:
type: boolean
const: true
results:
type: array
items:
$ref: '#/components/schemas/Address'
meta:
$ref: '#/components/schemas/Meta'
required:
- success
- 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.