API Documentation
Build with London's property scoring data. RESTful JSON endpoints, simple API key auth, and predictable responses.
Quick start
Base URL
All endpoints are relative to https://api.localpinned.co.uk/api.
JSON responses
Every response is JSON. Set Content-Type: application/json in your requests.
Example request
curl -X GET https://api.localpinned.co.uk/api/scores/postcode/WC1 \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json"
Endpoints
/properties/postcode/:postcodeGet property listings and scores for a specific postcode.
{
"postcode": "WC1",
"propertyCount": 2,
"averageScore": 81,
"properties": [ ... ]
}/properties/boroughsGet all London boroughs with average scores and property counts.
{
"boroughs": [
{ "name": "City of London", "propertyCount": 8, "averageScore": 82.3 }
],
"total": 16
}/properties/postcodesGet all postcodes with average scores and borough mapping.
{
"postcodes": [
{ "postcode": "WC1", "borough": "Westminster", "propertyCount": 2, "averageScore": 81 }
],
"total": 215
}/properties/searchAPI key requiredSearch properties by score, rent, borough, bedrooms, and type. Requires API key.
| Name | Type | Required | Description |
|---|---|---|---|
minScore | number | No | Minimum overall score (0-100) |
maxScore | number | No | Maximum overall score (0-100) |
minRent | number | No | Minimum monthly rent in GBP |
maxRent | number | No | Maximum monthly rent in GBP |
borough | string | No | Filter by borough name |
bedrooms | number | No | Number of bedrooms |
propertyType | string | No | Room, studio, 1-bed flat, 2-bed flat, 3-bed flat, house |
curl -X GET "https://api.localpinned.co.uk/api/properties/search?minScore=70&maxRent=2000&borough=Westminster" \ -H "x-api-key: YOUR_API_KEY"
/propertiesAPI key requiredList all properties with pagination. Requires API key.
| Name | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number |
limit | number | 50 | Items per page |
curl -X GET "https://api.localpinned.co.uk/api/properties?page=1&limit=20" \ -H "x-api-key: YOUR_API_KEY"
/commute/analyzeAPI key requiredAnalyze commute times from an origin to one or more destinations.
| Name | Type | Required | Description |
|---|---|---|---|
origin | string | Yes | Origin postcode or address |
destinations | string | Yes | Comma-separated destination postcodes |
mode | string | No | transit, driving, walking, bicycling |
curl -X GET "https://api.localpinned.co.uk/api/commute/analyze?origin=SW1A&destinations=EC1A,E14&mode=transit" \ -H "x-api-key: YOUR_API_KEY"
/commute/routeAPI key requiredGet detailed route information between two points.
| Name | Type | Required | Description |
|---|---|---|---|
origin | string | Yes | Origin postcode or address |
destination | string | Yes | Destination postcode or address |
mode | string | No | transit, driving, walking, bicycling |
curl -X GET "https://api.localpinned.co.uk/api/commute/route?origin=SW1A&destination=EC1A&mode=transit" \ -H "x-api-key: YOUR_API_KEY"
/scores/postcode/:postcodeGet the full score-system data for a postcode, including all five dimension scores and raw details.
{
"postcode": "WC1",
"area": "Bloomsbury",
"borough": "Westminster",
"scores": {
"amenities": 95,
"commute": 95,
"safety": 90,
"value": 30,
"transport": 95,
"overall": 81
}
}/scoresGet a summary of all scored postcodes with overall and dimension scores.
{
"scores": [ ... ],
"total": 215
}Rate Limits
Limits are tracked per API key. Public endpoints (/api/scores, /api/scores/postcode/:postcode, /api/properties/postcode/:postcode, /api/properties/boroughs, /api/properties/postcodes) do not require a key. Authenticated endpoints (/api/properties/search, /api/properties, /api/commute/*) require a key with the right scope.
Code Examples
const response = await fetch('https://api.localpinned.co.uk/api/scores/postcode/WC1', {
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data.scores.overall); // 81Error Codes
| Status | Meaning | How to fix |
|---|---|---|
| 200 | OK | Request succeeded. |
| 400 | Bad Request | Check query parameters or request body. |
| 401 | Unauthorized | Include a valid x-api-key header. |
| 403 | Forbidden | Invalid API key or insufficient scope. |
| 404 | Not Found | Postcode or resource does not exist. |
| 429 | Rate Limited | Reduce request rate or upgrade your plan. |
| 500 | Server Error | Retry later or contact support. |
Questions?
Get help with integration, custom plans, or volume discounts.
Book a meetingSee Terms, Privacy, Acceptable Use, Refund, and SLA.