API Documentation
Complete reference for the GeoData API.
Authentication
All API requests require an API key passed in the X-API-Key request header:
X-API-Key: YOUR_API_KEY
Single Lookup
Get data for a single GB postcode:
GET /v1/lookup?location=SW1A1AA&categories=demographics,housing
Parameters
location- GB postcode (required)categories- Comma-separated list (optional)
Code Examples
Batch Lookup
Get data for multiple postcodes (max 100):
POST /v1/batch
Content-Type: application/json
{
"locations": ["SW1A1AA", "M11AD"],
"categories": ["demographics"]
} Code Examples
Data Categories
demographics- Population, age, ethnicity (Census 2021)economic- Employment, economic activity (ONS / NRS)housing- Property prices, tenure (Land Registry)crime- Crime statistics (Police UK)business- Enterprise counts (ONS)deprivation- IMD scores (MHCLG)education- Nearest schools (DfE / gov.scot)connectivity- Broadband & mobile coverage (Ofcom)energy- EPC energy efficiency ratings (MHCLG / Scottish Government)flood- Rivers & sea flood-risk bands (Environment Agency)health-conditions- Modelled GP long-term condition prevalence for England (21 NHS England QOF conditions), Wales (StatsWales GP disease registers) and Scotland (Public Health Scotland GP disease prevalence). Each location is compared with its own nation's rate (national,vsNational,nation). Wales and Scotland publish no practice-to-area patient split, so their estimates are modelled from practice locations (method: "modelled-distance"). Condition sets and age groups differ by nation;populationgives each rate's age group.climate- Observed climate on a 1 km grid (Met Office HadUK-Grid): temperature, rainfall, sunshine and frost for the latest year and each season, with the 1991–2020 average
Error Codes
400- Invalid request401- Missing or invalid API key403- Category not available on your plan404- Location not found429- Rate limit exceeded