{"uid":"cap_y87qkh5fTE6JjMvXjjyFa","slug":"uk-postcode-nearest-lookup-00bcf858","name":"UK Postcode Nearest Lookup","description":"UK postcode lookup, search, validation and autocomplete with x402 payments.","url":"https://postcode.payapi.market/lookup/nearest?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"lat":{"type":"number","description":"Latitude in decimal degrees, e.g. 51.5014."},"lng":{"type":"number","description":"Longitude in decimal degrees, e.g. -0.1419."},"limit":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of postcodes to return (1-100, default 10)."},"radius":{"type":"integer","maximum":2000,"minimum":100,"description":"Search radius in metres (100-2000, default 1000)."}}},"responseSchema":{"type":"json","example":{"lat":51.5014,"lng":-0.1419,"count":1,"results":[{"ccg":"NHS North West London","lsoa":"Westminster 018C","msoa":"Westminster 018","nuts":"Westminster","codes":{"admin_ward":"E05013806","admin_district":"E09000033"},"incode":"1AA","parish":"Westminster, unparished area","region":"London","country":"England","outcode":"SW1A","quality":1,"latitude":51.501009,"postcode":"SW1A 1AA","longitude":-0.141588,"admin_ward":"St James's","distance_m":42.7,"admin_county":null,"admin_district":"Westminster","primary_care_trust":"Westminster","date_of_introduction":"198001","european_electoral_region":"London","parliamentary_constituency":"Cities of London and Westminster"}],"radius_m":1000}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_WYAmd4tZygxQ6PwTqpwnH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the nearest UK postcodes to a given latitude/longitude coordinate, with full administrative and geographic metadata for each result.","exampleAgentPrompt":"Find the nearest UK postcodes to latitude 51.5014, longitude -0.1419, searching within 500 metres and returning up to 5 results.","exampleUseCases":[{"title":"Delivery zone postcode resolution","prompt":"I have a GPS ping at lat 51.5074, lng -0.1278 from a delivery driver — can you find the nearest UK postcodes within 300 metres so I can assign it to the right delivery zone?"},{"title":"Local service area mapping","prompt":"For our new clinic at lat 53.4808, lng -2.2426 in Manchester, find up to 20 postcodes within 1 kilometre so we can map our patient catchment area."},{"title":"Electoral boundary identification","prompt":"What's the parliamentary constituency and admin ward for the location at lat 51.5014, lng -0.1419? Get the nearest postcode within 200 metres."}],"resultDescription":"A JSON object containing the input coordinates, the search radius used, a count of results, and an array of postcode records. Each record includes the full postcode, outcode, incode, latitude, longitude, distance in metres from the query point, admin district, admin ward, region, country, LSOA, MSOA, parish, parliamentary constituency, NHS CCG, primary care trust, NUTS area, European electoral region, date of introduction, and ONS codes for admin ward and district.","failureModes":["No postcodes found within the specified radius — returns empty results array","Coordinates outside the UK (e.g. non-GB lat/lng) — may return no results or error","Radius out of allowed range (below 100m or above 2000m) — validation error","Limit out of allowed range (below 1 or above 100) — validation error","Payment failure or insufficient USDC balance — x402 payment required error","Malformed request body — missing or invalid lat/lng fields"],"whenToPreferThis":"Choose this endpoint when you need to reverse-geocode a GPS coordinate to one or more nearby UK postcodes with rich administrative metadata (ward, district, LSOA, CCG, parliamentary constituency). It is ideal for location-aware UK services such as delivery routing, patient catchment mapping, electoral analysis, or any workflow that needs to map coordinates to UK administrative geographies. Prefer it over a simple postcode validation endpoint when proximity search (multiple postcodes within a radius) is needed rather than a single exact postcode lookup.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T19:04:51.746Z","isFirstParty":false,"canonicalSlug":"uk-postcode-nearest-lookup-00bcf858"}