Getting started
From zero to your first API call in under 5 minutes.
Prerequisites
- • An HTTP client (curl, Postman, or your language's HTTP library)
- • A Homedata account (signup)
Create your account
Sign up at homedata.co.uk/register. You'll need:
- • Your name and email
- • Organisation name (company or project name)
- • Industry (helps us tailor your experience)
Your API key is generated instantly after signup. Add credit in Step 3 before your first authenticated call.
Get your API key
After signing in, go to Developer → API Keys in your dashboard. Click "Reveal" to see your full API key.
Keep your API key secret. Don't commit it to version control or expose it in client-side code.
Top up your balance
Your account starts with an empty wallet, and every authenticated call is charged, so this step comes before your first one. Add credit at homedata.co.uk/subscription. 100 tokens = £1. A one-off top-up is enough to start; a monthly subscription is optional and earns bonus tokens.
Calls are priced by what they cost us to serve: address search is 2 tokens, address retrieve is 5,
and the property record used below costs 1. A wallet key's responses carry X-Tokens-Charged
and X-Tokens-Balance,
so you can see what a call cost and what is left without leaving your terminal.
Skip this and the authenticated examples in the next steps return
402 insufficient_tokens,
with the tokens the call needed and the balance you have. Nothing else about the request is wrong:
top up and retry the same call. See error reference.
Make your first request
Let's start with something simple: search for an address. The address search endpoint takes the same API key as everything else, so you can try it right now:
curl "https://api.homedata.co.uk/address/find?q=10%20Downing%20Street" \
-H "Authorization: Api-Key YOUR_API_KEY"
import requests API_KEY = "YOUR_API_KEY" headers = {"Authorization": f"Api-Key {API_KEY}"} response = requests.get( "https://api.homedata.co.uk/address/find", params={"q": "10 Downing Street"}, headers=headers ) data = response.json() for addr in data["suggestions"]: print(f"{addr['address']}, {addr['postcode']} (UPRN: {addr['uprn']})")
const API_KEY = "YOUR_API_KEY"; const response = await fetch( "https://api.homedata.co.uk/address/find?q=10%20Downing%20Street", { headers: { "Authorization": `Api-Key ${API_KEY}` } } ); const data = await response.json(); data.suggestions.forEach(a => console.log(`${a.address}, ${a.postcode} (UPRN: ${a.uprn})`) );
$apiKey = "YOUR_API_KEY"; $url = "https://api.homedata.co.uk/address/find?" . http_build_query(['q' => '10 Downing Street']); $context = stream_context_create(['http' => [ 'header' => "Authorization: Api-Key $apiKey" ]]); $response = file_get_contents($url, false, $context); $data = json_decode($response, true); foreach ($data['suggestions'] as $addr) { echo $addr['address'] . ", UPRN: " . $addr['uprn'] . "\n"; }
Expected response:
{
"suggestions": [
{
"uprn": 100023336956,
"uprn_token": "gAAAAABm9x…",
"address": "10 Downing Street, London, SW1A 2AA",
"postcode": "SW1A 2AA",
"town": "London"
}
],
"count": 1
}
Each result includes a UPRN: the unique identifier you'll pass to authenticated endpoints. Copy one and use it in Step 5 below.
Use your API key for authenticated endpoints
Most endpoints require authentication. Pass your API key in the Authorization header:
# Property record: 15 base fields; add more with ?with= curl https://api.homedata.co.uk/properties/100023336956 \ -H "Authorization: Api-Key YOUR_API_KEY" # Nearby schools with Ofsted ratings curl "https://api.homedata.co.uk/schools/nearby?postcode=SW1A+2AA&radius_km=1" \ -H "Authorization: Api-Key YOUR_API_KEY" # Broadband speeds by postcode curl "https://api.homedata.co.uk/broadband?postcode=SW1A2AA" \ -H "Authorization: Api-Key YOUR_API_KEY" # Street-level crime nearby curl "https://api.homedata.co.uk/crime/?postcode=SW1A+2AA" \ -H "Authorization: Api-Key YOUR_API_KEY"
import requests API_KEY = "YOUR_API_KEY" BASE = "https://api.homedata.co.uk" headers = {"Authorization": f"Api-Key {API_KEY}"} # Get full property data prop = requests.get(f"{BASE}/properties/100023336956", headers=headers).json() print(f"Type: {prop['property_type']}, EPC score: {prop['current_energy_efficiency']}") # Nearby schools with Ofsted ratings schools = requests.get( f"{BASE}/schools/nearby", params={"postcode": "SW1A 2AA", "radius_km": 1}, headers=headers ).json() for school in schools["schools"][:5]: print(f"{school['name']}: {school['ofsted']['rating']} ({school['distance_miles']}mi)") # Broadband speeds by postcode bb = requests.get( f"{BASE}/broadband", params={"postcode": "SW1A2AA"}, headers=headers ).json()
const API_KEY = "YOUR_API_KEY"; const BASE = "https://api.homedata.co.uk"; const headers = { "Authorization": `Api-Key ${API_KEY}` }; // Get full property data const prop = await fetch(`${BASE}/properties/100023336956`, { headers }) .then(r => r.json()); // Nearby schools with Ofsted ratings const schools = await fetch( `${BASE}/schools/nearby?postcode=SW1A+2AA&radius_km=1`, { headers } ).then(r => r.json()); schools.schools.slice(0, 5).forEach(s => console.log(`${s.name}: ${s.ofsted.rating} (${s.distance_miles}mi)`) ); // Broadband speeds by postcode const bb = await fetch( `${BASE}/broadband?postcode=SW1A2AA`, { headers } ).then(r => r.json());
Monitor your usage
Which headers you get depends on how your key is billed. Wallet keys receive X-Tokens-Charged and X-Tokens-Balance, and no rate-limit headers at all; quota keys receive the X-RateLimit-* family instead. You will not see both.
X-Tokens-Charged: 1 ← Tokens spent by this request X-Tokens-Balance: 1997 ← Tokens left (100 = £1)
You can also check your usage in the Developer Dashboard: it shows a 30-day usage chart with daily breakdown.
What's next?
Integrate into your own product
Pay as you goThe Homedata address search endpoint returns UPRN-matched results for any UK address. Authenticated endpoints return a structured property record plus add-on datasets, covering 29 million UK properties.
Structured as JSON · queryable by UPRN or postcode · ready to embed in any application
Exact measurements
Real values (distances, concentrations, counts) not rounded ratings
29 million UK properties covered
Every address queryable by UPRN or postcode
REST API
JSON responses, OpenAPI docs, sandbox: first call in under 5 minutes
Pay as you go: 100 tokens = £1 across every endpoint, no subscription needed. Bonus tokens with an optional monthly subscription, and your first top-up matched 100%. See pricing →
Sources
Further reading