lookup_postcodes
Look up 1–100 UK postcodes in one call and return geographic, administrative, and ONS/GSS details, while sorting terminated, unknown, and invalid postcodes into separate results.
Instructions
Look up 1 to 100 UK postcodes in one call (any spacing or case). Each match returns country, region, local authority (admin_district), county, ward, parish, parliamentary constituency (2024 boundaries), Senedd constituency for Wales, latitude/longitude, OS eastings/northings, LSOA/MSOA, NUTS, police force area, ICB, urban/rural class, deprivation rank and the matching ONS/GSS codes. Postcodes that are no longer live come back under 'terminated' with the year and month; unknown ones under 'not_found'; badly formatted ones under 'invalid_format' without spending an API call. Use detail='full' for every field.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"postcodes": "<postcodes>"
},
"name": "lookup_postcodes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | No | 'summary' (default) is trimmed; 'full' returns every field Postcodes.io has. | summary |
| postcodes | Yes | Postcodes such as ['SW1A 2AA', 'ec1a1bb']. |