Schools Search API
Search 51,000+ UK schools by postcode with Ofsted ratings, Progress 8 scores, and comprehensive school data
Overview
The Schools Search API provides access to data on over 51,000 UK schools. Search by postcode to find nearby schools with comprehensive details including Ofsted ratings, Progress 8 scores, pupil numbers, age ranges, and contact information.
Data included for each school:
- Basic info — school name, URN, type, phase (Primary/Secondary/All through/16 plus), gender, religious character
- Ofsted data — overall Ofsted rating (Outstanding/Good/Requires improvement/Inadequate) and date of last inspection
- Performance — Progress 8 score and category for secondary schools
- Capacity — number of pupils, school capacity, age range (statutory low/high age)
- Contact — full address, postcode, telephone, website, headteacher name
- Location — coordinates (lat/lng) and distance from search postcode in miles
- Summary stats — Ofsted rating breakdown and phase breakdown for all results
This API is ideal for:
- Property platforms showing nearby schools on listings
- Relocation services helping families find schools
- Estate agents providing catchment area information
- Education technology platforms and school comparison tools
- Property investors assessing area desirability for families
Authentication
All requests to the Schools Search API require authentication using an API key. You can obtain your API key from your PropertyInsights dashboard after subscribing to an API plan.
Include your API key in the request header as follows:
X-API-Key: your_api_key_here
Security Warning
Endpoints
Base URL
https://propertyinsights.co.uk/api/v1/
Search Schools
/schools/search
Returns nearby schools for the specified postcode, sorted by distance, with optional filtering by phase, Ofsted rating, and school type.
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| postcode | Required | String | UK postcode to search near (e.g., "SW1A 1AA") |
| radius | Optional | Float | Search radius in miles (default: 1, max: 10) |
| phase | Optional | String | Filter by phase: Primary, Secondary, 16 plus, All through |
| ofstedRating | Optional | String | Minimum Ofsted rating: Outstanding, Good, Requires improvement, Inadequate |
| type | Optional | String | Filter by establishment type group (e.g., Academies, Free Schools) |
| limit | Optional | Integer | Maximum results to return (default: 20, max: 50) |
The ofstedRating filter returns schools at the specified rating or better. For example, ofstedRating=Good returns both Outstanding and Good rated schools. Only open schools are included in results.
Billing details in the response
Successful chargeable JSON responses include a top-level billing object. The endpoint examples on this page focus on the endpoint-specific data, so this repeated block may not be shown in every example.
"billing": {
"mode": "prepaid",
"creditsCharged": 1,
"creditsRemaining": 1999,
"creditsRefreshAt": "2026-08-14T09:30:00.000Z"
}| Field or header | Meaning |
|---|---|
| billing.creditsCharged X-Credits-Charged | Credits charged by this call. Failed and non-chargeable calls return 0 in the header. |
| billing.creditsRemaining X-Credits-Remaining | The credit balance after the call. |
| billing.creditsRefreshAt X-Credits-Refresh-At | The next monthly credit refresh as an ISO 8601 timestamp. Trial and non-renewing balances return null and omit the header. |
All authenticated API-key calls expose the billing headers, including validation errors and zero-credit status or management requests. Only successful chargeable JSON responses add the billing object to the response body.
Response Format
The response is returned in JSON format with the following structure:
{
"success": true,
"data": {
"schools": [ ... ],
"summary": {
"totalResults": 15,
"searchRadius": 1,
"searchPostcode": "SW1A 2AA",
"ofstedBreakdown": {
"Outstanding": 2,
"Good": 8,
"Requires improvement": 3
},
"phaseBreakdown": {
"Primary": 10,
"Secondary": 5
}
}
}
}schools (array)
Each item in the array represents a single school, sorted by distance from the search postcode.
{
"urn": 140123,
"name": "Westminster Academy",
"phase": "Secondary",
"type": "Academy sponsor led",
"typeGroup": "Academies",
"address": {
"street": "15 Horseferry Road",
"locality": "Westminster",
"town": "London",
"county": "Greater London",
"postcode": "SW1A 2AB"
},
"ofstedRating": "Good",
"ofstedLastInspection": "2024-03-15",
"progress8Score": 0.45,
"progress8Category": "Above average",
"pupils": 1200,
"capacity": 1350,
"ageRange": {
"low": 11,
"high": 18
},
"gender": "Mixed",
"religiousCharacter": "Does not apply",
"admissionsPolicy": "Non-selective",
"hasSixthForm": true,
"website": "https://www.westminsteracademy.org.uk",
"telephone": "020 7123 4567",
"headteacher": {
"title": "Mrs",
"firstName": "Jane",
"lastName": "Smith"
},
"coordinates": {
"lat": 51.4975,
"lng": -0.1357
},
"distance": 0.3
}Examples
Basic Request
GET https://propertyinsights.co.uk/api/v1/schools/search?postcode=SW1A%202AA
Search for Outstanding Primary Schools
GET https://propertyinsights.co.uk/api/v1/schools/search?postcode=SW1A%202AA&phase=Primary&ofstedRating=Outstanding&radius=2
Search for Secondary Schools within 5 Miles
GET https://propertyinsights.co.uk/api/v1/schools/search?postcode=SW1A%201AA&phase=Secondary&radius=5&limit=30
cURL Example
curl -X GET \ "https://propertyinsights.co.uk/api/v1/schools/search?postcode=SW1A%202AA&radius=2&phase=Primary" \ -H "x-api-key: YOUR_API_KEY"
Error Handling
The API uses standard HTTP status codes to indicate the success or failure of requests.
| Code | Error Code | Description |
|---|---|---|
| 400 | MISSING_POSTCODE | Postcode parameter is required |
| 400 | INVALID_POSTCODE | Could not geocode the provided postcode |
| 401 | UNAUTHORIZED | API key is missing or invalid |
| 402 | INSUFFICIENT_CREDITS | Insufficient API credits to process this request |
| 500 | INTERNAL_ERROR | An error occurred while searching for schools |
Error Response Example
{
"success": false,
"error": {
"code": "INVALID_POSTCODE",
"message": "Could not geocode the provided postcode. Please check it is a valid UK postcode."
}
}Need Help?
If you need assistance with implementation or have questions about the API, our support team is here to help.