# UK Postcode Lookup

> UK Postcode Lookup is a paid API for AI agents from postcode-api-production.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Look up full geographic and administrative details for a UK postcode, including coordinates, country, region, council, ward, parish, parliamentary constituency, and ONS/NHS area codes.

## Facts

- Endpoint: POST https://postcode-api-production.up.railway.app/lookup/postcode
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/uk-postcode-lookup-ae1f2228
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MFwucoDX8Zllasn5PoaE2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability uk-postcode-lookup-ae1f2228 -d '<json body>'
```

Example prompt: Can you look up postcode SW1A 1AA and tell me its coordinates, region, local council, and parliamentary constituency?

## When to prefer this

Use this endpoint when you need comprehensive administrative and geographic metadata for a single known UK postcode — especially when you need ONS/NHS area codes, council, ward, or constituency data alongside coordinates. It is more suitable than a generic geocoder when UK-specific administrative boundaries are required.

## Known failure modes

- Invalid or non-existent postcode returns an error or empty result
- Postcode for a newly assigned area may not yet be in the dataset
- Malformed input (e.g. missing letters) may return a validation error
- Network or server errors on the Railway-hosted service may return 5xx responses

## How this service works

Look up a UK postcode: coordinates, country, region, council, ward, parish, parliamentary constituency, and ONS/NHS area codes.

## Output

Returns a structured record for the given UK postcode including: normalised postcode, latitude/longitude coordinates, country, region, district/council, ward, parish, parliamentary constituency, and ONS and NHS area codes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "postcode": {
   "type": "string",
   "description": "UK postcode to look up; spacing and case are normalised, e.g. 'SW1A 1AA'."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/uk-postcode-lookup-ae1f2228/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from postcode-api-production.up.railway.app](https://www.zero.xyz/host/postcode-api-production.up.railway.app/llms.txt)
