API Documentation
Complete reference for the UKDataAPI. 14 endpoints, proprietary scoring, 400+ UK government sources.
Base URL: https://www.ukdatapi.com
Quick Start
- Get an API key at ukdatapi.com/#pricing
- Make your first call:
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://www.ukdatapi.com/api/v1/entity/00000006" - Get enriched data with proprietary scoring — distress scores, risk ratings, investment signals, and more.
Authentication
Pass your API key using either header:
Authorization: Bearer ukd_live_...
# or
X-API-Key: ukd_live_...ukd_live_ — Production keys. Deducts credits from your plan.
ukd_test_ — Sandbox keys. Returns mock data, no credits deducted.
Rate Limits & Credits
| Tier | Price | Credits/mo | Rate Limit |
|---|---|---|---|
| Free | €0 | 200 | 10/min |
| Starter | €39/mo | 8,000 | 60/min |
| Growth | €129/mo | 30,000 | 200/min |
| Scale | €349/mo | 150,000 | 500/min |
Depth Parameter
Most endpoints accept a depth query parameter that controls how much data is returned — and how many credits are consumed.
summary — Cheapest. Key fields only. Ideal for list views and quick checks.
standard — Default. Balanced detail. Includes proprietary scores.
full — Most data. All available fields, historical data, and deep analysis.
Endpoints
4.1 Entity Intelligence
GET /api/v1/entity/{identifier}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| identifier | string | Yes | Company number (e.g. 00000006) or company name |
| depth | string | No | summary | standard | full (default: standard) |
| include | string | No | Comma-separated list of sections to include |
Credit Cost
| Depth | Credits |
|---|---|
| summary | 2 |
| standard | 8 |
| full | 16 |
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/entity/00000006?depth=standard"Example Response
{
"entity": {
"company_number": "00000006",
"company_name": "MARINE AND GENERAL MUTUAL...",
"company_status": "active",
"incorporation_date": "1852-07-01",
"sic_codes": ["65120"]
},
"officers": [
{ "name": "John Smith", "role": "director", "appointed": "2019-03-15" }
],
"distress_score": {
"score": 22,
"rating": "LOW_RISK",
"recommendation": "PROCEED"
}
}4.2 Location Intelligence
GET /api/v1/location/{postcode}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| postcode | string | Yes | UK postcode (URL-encoded, e.g. SW1A%201AA) |
| depth | string | No | summary | standard | full (default: standard) |
| radius_m | number | No | Search radius in metres |
Credit Cost
| Depth | Credits |
|---|---|
| summary | 2 |
| standard | 10 |
| full | 20 |
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/location/SW1A%201AA?depth=standard"Example Response
{
"location": {
"postcode": "SW1A 1AA",
"latitude": 51.501009,
"longitude": -0.141588,
"admin_district": "Westminster"
},
"crime": {
"total_last_month": 847,
"top_category": "theft-from-the-person"
},
"environment": {
"flood": { "risk_level": "very_low" }
},
"services": {
"nearest_gp": "The Practice Soho",
"nearest_school": "St Matthew's Westminster"
}
}4.3 Property Intelligence
GET /api/v1/property/{postcode}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| postcode | string | Yes | UK postcode (URL-encoded) |
| depth | string | No | summary | standard | full (default: standard) |
Credit Cost
| Depth | Credits |
|---|---|
| summary | 5 |
| standard | 15 |
| full | 30 |
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/property/SW1A%201AA"Example Response
{
"price_history": {
"avg_price": 1250000,
"transactions_12m": 12,
"trend": "rising"
},
"energy": {
"avg_epc_rating": "C",
"avg_efficiency": 68
},
"planning": {
"applications_12m": 34,
"approved_rate": 0.82
},
"environmental_risk": {
"score": 31,
"rating": "LOW"
}
}4.4 Due Diligence Report
GET /api/v1/report/entity/{identifier}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| identifier | string | Yes | Company number or company name |
Credit Cost
25 credits per request (flat rate)
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/report/entity/00000006"Example Response
{
"verdict": "PROCEED",
"distress_score": {
"score": 22,
"rating": "LOW_RISK"
},
"red_flags": [],
"green_flags": [
"Accounts filed on time for 5+ years",
"No adverse Gazette notices",
"Stable director tenure"
],
"recommendation": "Low-risk entity suitable for engagement."
}4.5 Environmental Risk
GET /api/v1/environment/{postcode}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| postcode | string | Yes | UK postcode (URL-encoded) |
| depth | string | No | summary | standard | full (default: standard) |
Credit Cost
| Depth | Credits |
|---|---|
| summary | 4 |
| standard | 12 |
| full | 24 |
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/environment/SW1A%201AA"Example Response
{
"risk_score": {
"score": 28,
"rating": "LOW",
"factors": ["flood_low", "geology_stable", "air_moderate"]
},
"flood": {
"river_sea": "very_low",
"surface_water": "low"
},
"geology": {
"radon": "low",
"shrink_swell": "negligible"
}
}4.6 Market Sizing
GET /api/v1/market/{postcode}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| postcode | string | Yes | UK postcode (URL-encoded) |
| sector | string | No | Industry or business type (e.g. restaurant) |
| depth | string | No | summary | standard | full (default: standard) |
Credit Cost
| Depth | Credits |
|---|---|
| summary | 5 |
| standard | 15 |
| full | 30 |
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/market/M1%201AA?sector=restaurant"Example Response
{
"labour_market": {
"unemployment_rate": 4.2,
"median_wage": 31500
},
"property_market": {
"avg_commercial_rent_sqft": 28.50,
"vacancy_rate": 0.07
},
"competition": {
"businesses_in_sector": 142,
"density_per_1000": 3.8
},
"market_opportunity": {
"score": 72,
"rating": "HIGH"
}
}4.7 Trade & Customs
GET /api/v1/trade/{commodity}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| commodity | string | Yes | Commodity code or description (e.g. beef, 0201) |
Credit Cost
10 credits per request (flat rate)
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/trade/beef"Example Response
{
"commodity": {
"code": "0201",
"description": "Meat of bovine animals, fresh or chilled"
},
"duties": {
"third_country": "12.8% + 303.4 EUR/100 kg"
},
"preferential_rates": [
{ "country": "Australia", "rate": "0%", "agreement": "UK-Australia FTA" },
{ "country": "New Zealand", "rate": "0%", "agreement": "UK-NZ FTA" }
]
}4.8 Education
GET /api/v1/education/{postcode}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| postcode | string | Yes | UK postcode (URL-encoded) |
| depth | string | No | summary | standard | full (default: standard) |
| phase | string | No | Filter by phase (primary, secondary, etc.) |
Credit Cost
| Depth | Credits |
|---|---|
| summary | 3 |
| standard | 8 |
| full | 16 |
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/education/SW1A%201AA?phase=primary"Example Response
{
"schools": [
{
"name": "St Matthew's Westminster CE Primary",
"phase": "primary",
"ofsted_rating": "Outstanding",
"distance_m": 320,
"pupils": 210
}
],
"summary": {
"outstanding": 3,
"good": 8,
"requires_improvement": 1,
"inadequate": 0
}
}4.9 Transport
GET /api/v1/transport/{postcode}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| postcode | string | Yes | UK postcode (URL-encoded) |
| depth | string | No | summary | standard | full (default: standard) |
Credit Cost
| Depth | Credits |
|---|---|
| summary | 3 |
| standard | 8 |
| full | 16 |
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/transport/SW1A%201AA"Example Response
{
"nearest_stations": [
{ "name": "Westminster", "type": "tube", "distance_m": 210 },
{ "name": "St James's Park", "type": "tube", "distance_m": 350 },
{ "name": "London Waterloo", "type": "rail", "distance_m": 890 }
],
"connectivity_score": 94,
"connectivity_rating": "EXCELLENT"
}4.10 Vehicle
GET /api/v1/vehicle/{registration}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| registration | string | Yes | Vehicle registration number (e.g. AB12CDE) |
Credit Cost
6 credits per request (flat rate)
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/vehicle/AB12CDE"Example Response
{
"vehicle": {
"make": "BMW",
"model": "320D",
"colour": "Black",
"fuel_type": "Diesel",
"first_registered": "2019-03-15"
},
"mot_history": [
{ "test_date": "2024-03-10", "result": "PASS", "mileage": 45230 },
{ "test_date": "2023-03-08", "result": "PASS", "mileage": 33100 }
],
"health_score": 82,
"mileage_trend": [
{ "year": 2023, "mileage": 33100 },
{ "year": 2024, "mileage": 45230 }
]
}4.11 Health
GET /api/v1/health/{postcode}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| postcode | string | Yes | UK postcode (URL-encoded) |
| depth | string | No | summary | standard | full (default: standard) |
Credit Cost
| Depth | Credits |
|---|---|
| summary | 4 |
| standard | 12 |
| full | 24 |
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/health/SW1A%201AA"Example Response
{
"indicators": {
"life_expectancy_male": 83.1,
"life_expectancy_female": 86.4,
"obesity_prevalence": 0.18
},
"care_providers": [
{ "name": "The Practice Soho", "type": "GP", "cqc_rating": "Good", "distance_m": 640 }
],
"prescribing": {
"total_items_per_1000": 8420,
"antibiotics_per_1000": 312
}
}4.12 Energy & ESG
GET /api/v1/energy/{postcode}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| postcode | string | Yes | UK postcode (URL-encoded) |
| depth | string | No | summary | standard | full (default: standard) |
Credit Cost
| Depth | Credits |
|---|---|
| summary | 4 |
| standard | 12 |
| full | 24 |
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/energy/SW1A%201AA"Example Response
{
"carbon": {
"grid_intensity_gco2_kwh": 182,
"renewable_percentage": 42.5
},
"grid": {
"generation_mix": {
"wind": 35.2,
"gas": 28.1,
"nuclear": 15.8,
"solar": 8.4
}
},
"local_efficiency": {
"avg_epc_rating": "D",
"avg_co2_tonnes": 3.2
},
"esg_score": 64,
"esg_rating": "MODERATE"
}4.13 Legal & Policy
GET /api/v1/legal/{query}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search term (URL-encoded, e.g. data%20protection) |
Credit Cost
10 credits per request (flat rate)
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/legal/data%20protection"Example Response
{
"legislation": [
{
"title": "Data Protection Act 2018",
"url": "https://www.legislation.gov.uk/ukpga/2018/12",
"year": 2018,
"status": "in_force"
}
],
"pending_bills": [
{
"title": "Data Protection and Digital Information Bill",
"stage": "Committee Stage",
"introduced": "2024-11-06"
}
]
}4.14 Tender Intelligence
GET /api/v1/tendersParameters
| Name | Type | Required | Description |
|---|---|---|---|
| sector | string | No | Industry sector (e.g. construction) |
| region | string | No | UK region (e.g. London, North West) |
Credit Cost
10 credits per request (flat rate)
Example Request
curl -H "Authorization: Bearer ukd_live_..." \
"https://www.ukdatapi.com/api/v1/tenders?sector=construction"Example Response
{
"tenders": [
{
"title": "School Refurbishment Programme",
"buyer": "Department for Education",
"value": 2400000,
"deadline": "2025-03-15",
"status": "open"
}
],
"summary": {
"open": 47,
"awarded": 312,
"avg_value": 850000
}
}Scoring Algorithms
UKDataAPI enriches raw government data with proprietary scores. Each score is a normalised 0-100 value with a human-readable rating.
Corporate Distress Score
Used in: Entity Intelligence
0 = healthy, 100 = critical
LOW_RISK → MODERATE_RISK → ELEVATED_RISK → HIGH_RISK → CRITICAL_RISK
Environmental Risk Score
Used in: Environmental Risk, Property Intelligence
0 = minimal risk, 100 = severe risk
LOW → MODERATE → ELEVATED → HIGH → SEVERE
Area Investment Score
Used in: Location Intelligence
0 = poor prospect, 100 = strong prospect
POOR → BELOW_AVERAGE → AVERAGE → GOOD → STRONG
ESG Score
Used in: Energy & ESG
0 = poor, 100 = excellent
POOR → BELOW_AVERAGE → MODERATE → GOOD → STRONG
Vehicle Health Score
Used in: Vehicle
0 = poor condition, 100 = excellent condition
POOR → FAIR → GOOD → VERY_GOOD → EXCELLENT
Market Opportunity Score
Used in: Market Sizing
0 = saturated/weak, 100 = high opportunity
LOW → MODERATE → GOOD → HIGH
Connectivity Score
Used in: Transport
0 = isolated, 100 = highly connected
LIMITED → MODERATE → GOOD → VERY_GOOD → EXCELLENT
Error Codes
| Status | Code | Meaning |
|---|---|---|
| 401 | INVALID_API_KEY | Missing or invalid API key |
| 402 | PAYMENT_REQUIRED | Insufficient credits |
| 429 | RATE_LIMITED | Rate limit exceeded |
| 500 | INTERNAL_ERROR | Server error |
Example Error Response
{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 12 seconds.",
"retry_after": 12
}
}AI Agents (x402 / MCP)
MCP (Model Context Protocol)
Connect any MCP-compatible AI agent to all 14 UKDataAPI tools with a single endpoint.
https://www.ukdatapi.com/api/mcp- 14 tools available for Claude Desktop, Cursor, LangChain, and any MCP client
- Listed on the Official MCP Registry
- Uses your existing API key for authentication
x402 — Pay-per-Call with USDC
No signup needed. AI agents pay per request with USDC on Base network using the x402 protocol.
- Endpoints available at
/api/x402/(same structure as v1) - Payment via USDC on Base (Coinbase L2)
- Ideal for autonomous agents — no API key management
- Compatible with any x402-enabled HTTP client