# Agent402 UK Postcode Geocoder

> Agent402 UK Postcode Geocoder is a paid API for AI agents from agent402.co.uk, paid per call via x402, $0.002/call, status down (last checked 2026-09-15).

Converts a UK postcode to latitude/longitude coordinates and admin district using postcodes.io, with caching and no API key required.

## Facts

- Endpoint: GET https://agent402.co.uk/v1/data/uk/postcode
- Price: $0.002/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-uk-postcode-geocoder-d08ad270
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mzh92pkEPBsYtJZXkoMJ4

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 agent402-uk-postcode-geocoder-d08ad270
```

Example prompt: What are the latitude and longitude coordinates for the UK postcode SW1A 1AA, and which admin district does it fall under?

## When to prefer this

Choose this endpoint when you need fast, keyless UK postcode geocoding without setting up a postcodes.io integration yourself — ideal for logistics, routing, or admin-district resolution steps within an agent workflow. Prefer over raw postcodes.io calls when you want a cached, pay-per-use micro-service that avoids rate limit concerns.

## Known failure modes

- Invalid or malformed postcode returns an error response
- Non-existent postcode not found in postcodes.io database
- Missing required 'postcode' query parameter causes a bad request error
- Non-UK postcodes (e.g. US ZIP codes) are not supported
- Upstream postcodes.io outage may cause temporary failures

## How this service works

Don't burn tokens on deterministic work. Go/no-go jobs first: payout preflight, text firewall (PII/secrets), budget check — then rails, calendars, finmath. x402 USDC on Base. UK + global. agent402.co.uk — not agent402.tools. $0.001–$0.002 USDC on Base. No API keys.

## Output

A JSON object containing the input postcode, its decimal latitude and longitude, and the name of the admin district (e.g. Westminster) it belongs to.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "postcode"
     ],
     "properties": {
      "postcode": {
       "type": "string",
       "description": "UK postcode"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "latitude": 51.501,
  "postcode": "SW1A 1AA",
  "longitude": -0.142,
  "admin_district": "Westminster"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-uk-postcode-geocoder-d08ad270/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.co.uk](https://www.zero.xyz/host/agent402.co.uk/llms.txt)
