- Data
- REST API
- Address & UPRN
- Address by postcode
Address by postcode
GET /v1/address/postcode/{postcode}Return all addresses at a UK postcode.
Same call over MCP
List the addresses at a postcodeaddress_by_postcodeAuthenticate with an API key from the API & MCP Hub. The same call is available as an MCP tool at the same price.
Inputs
Before you call it
- postcode
- The postcode must be a full UK postcode ("SE22 8HN"), not a district. Where a tool works at district grain it truncates the postcode itself.
Request
Calling GET /v1/address/postcode/{postcode}
curl "https://api.marketcode.ai/v1/address/postcode/SE22%208HN" \
-H "Authorization: Bearer $MARKETCODE_API_KEY"Send your API key as a Bearer token. Every response carries credits_charged and credits_remaining.
Inputs
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| postcode | Path | string | Yes |
Response
What GET /v1/address/postcode/{postcode} returns for a real request
curl "https://api.marketcode.ai/v1/address/postcode/SE22%208HN" \
-H "Authorization: Bearer $MARKETCODE_API_KEY"{
"postcode": "<string>",
"country": "<string>",
"data": {
"data": {
"matches": [
{
"id": "<string>",
"uprn": 0,
"similarity_distance": null,
"match_score": 0,
"distance": null,
"address": "<string>",
"address_highlight": null,
"confidence_score": 0,
"exact_match": false,
"is_residential": false,
"last_verified": "<string>",
"source": "<string>",
"session": null,
"elements": "<string>"
}
],
"total_matches": 0,
"search_time_ms": 0
}
},
"credits_charged": 0
}Shape only. This call returns licensed records, so the keys are real and every value is a placeholder of its type.
Response
Response fields
| Field | Type |
|---|---|
| postcode | string |
| country | string |
| data | object |
| data.data | object |
| data.data.matches | array |
| data.data.matches[].id | string |
| data.data.matches[].uprn | integer |
| data.data.matches[].similarity_distance | null |
| data.data.matches[].match_score | integer |
| data.data.matches[].distance | null |
| data.data.matches[].address | string |
| data.data.matches[].address_highlight | null |
| data.data.matches[].confidence_score | integer |
| data.data.matches[].exact_match | boolean |
| data.data.matches[].is_residential | boolean |
| data.data.matches[].last_verified | string |
| data.data.matches[].source | string |
| data.data.matches[].session | null |
| data.data.matches[].elements | string |
| data.data.total_matches | integer |
| data.data.search_time_ms | number |
| credits_charged | integer |
Fields observed in the example response above; a field the example did not exercise is not listed.
Price and licence
What it costs, and where the data comes from
Address by postcode costs 10 credits per successful call over MCP and over REST, and the two surfaces share one credit balance.
The price covers licensed records in the response, from Ordnance Survey. A call that fails is not charged.
Credits are granted on sign-up and bought in packs; the pricing page lists every call.
Sources
- Ordnance Survey
AddressBase
Used under licence from Ordnance Survey · Great Britain
Related
Endpoints used with Address by postcode
- Autocomplete a UK addressFree
address_autocompleteFree address autocomplete. Returns ranked candidates for a partial addressSame category - Resolve an address to a UPRN8 credits
address_resolveResolve free-text address to canonical record (UPRN for UK).Same category - Look up an address by UPRN8 credits
address_by_uprnLook up an address by UPRN (UK only).Same category
FAQ
Questions about Address by postcode
How much does `address_by_postcode` cost?
+
Address by postcode costs 10 credits per successful call over MCP and over REST, and the two surfaces share one credit balance. The price covers licensed records in the response, from Ordnance Survey. A call that fails is not charged.
How do I authenticate?
+
Send your API key as a Bearer token in the Authorization header. Keys are created in the API & MCP Hub, shown once and revocable. Every response carries the credits charged and your remaining balance.
Is there an MCP version?
+
Yes. The address_by_postcode tool on the MarketCode MCP server is the same call at the same price, signed in with OAuth rather than a key, so Claude, ChatGPT, Codex and Cursor can run it in a conversation.
Where does the data come from?
+
Read from Ordnance Survey AddressBase.
Can I store or republish the results?
+
The response includes records we license from Ordnance Survey. Use them in your own analysis, reports and products; bulk redistribution of the raw records or building a competing dataset from them is not covered. Ask us if you need a redistribution licence.
Does `address_by_postcode` change anything?
+
No. The tool is annotated read-only on the server, so it never writes to your data or ours and an assistant can call it without a confirmation step.
Try Address by postcode on a real address.
30-minute call. We'll provision a key and walk through the endpoint on your use case.