The Planning API exposes the following API endpoints. Send a GET request to https://api.planning.org.uk/v1/{endpoint} with the required query string parameters and the API will return a JSON response to the request.
Returns a randomly generated API key for a new user.
Parameter | Data type | Required | Notes |
---|---|---|---|
string | yes | Required to receive low credit warnings. |
EXAMPLE
GET REQUEST: https://api.planning.org.uk/v1/[email protected]
JSON RESPONSE: {
"request": {
"api_endpoint": "/generatekey",
"ip_address": "999.999.999.999",
"datetime": "2023-10-22 20:40:38",
"email": "[email protected]"
},
"response": {
"api_version": "1.0",
"status": "OK",
"key": "a1b2c3d4e5f6g7h8"
}
}
API endpoint response is a redirect to STRIPE payment page for top up of credits for the API key. Alternatively the topup payment links below can also be used.
Parameter | Data type | Required | Notes |
---|---|---|---|
key | string | yes | Required for authentication. |
credits | int | yes | The number of credits you wish to purchase. |
EXAMPLE
GET REQUEST: https://api.planning.org.uk/v1/topup?key=a1b2c3d4e5f6g7h8&credits=1000
Credits | Cost / credit | Cost | Payment link |
---|---|---|---|
1,000 | £0.10 | £100 | Buy now |
2,500 | £0.09 | £225 | Buy now |
5,000 | £0.08 | £400 | Buy now |
10,000 | £0.07 | £700 | Buy now |
25,000 | £0.06 | £1,500 | Buy now |
50,000 | £0.05 | £2,500 | Buy now |
Returns a list of available LPA IDs for use in the /search endpoint.
EXAMPLE
GET REQUEST: https://api.planning.org.uk/v1/lpas
JSON RESPONSE: {
"request": {
"api_endpoint": "/lpas",
"ip_address": "999.999.999.999",
"datetime": "2023-10-22 20:44:08"
},
"response": {
"api_version": "1.0",
"status": "OK",
"data": [
{
"id": "1",
"name": "bromsgrove",
"application_count": "2496"
}, ...json truncated.
Returns matching application results. Please ensure you understand the return_data parameter before use.
Parameter | Data type | Required | Notes |
---|---|---|---|
key | string | yes | Required for authentication. |
lpa_id | string | no | Field can accept a single LPA ID or multiple comma separated LPA IDs. |
date_from | string | no | Format: yyyy-mm-dd, matches all applications whose validated date is greater than or equal to given date. |
date_to | string | no | Format: yyyy-mm-dd, matches all applications whose validated date is less than or equal to given date. |
postcode_exact | string | no | Example "GU16 7HF", matches all applications with given exact postcode (with space). |
postcode_start | string | no | Example "GU16", matches all applications whose postcode start with given string. |
postcode_radius | string | no | Example "GU16 7HF,0.5", matches all applications whose postcode are within 0.5 miles of a full postcode. The larger the radius the slower the query. |
address | string | no | Matches all applications whose application address contains the given string. |
keyword | string | no | Matches all applications whose application description contains the given string. |
return_data | int | no | If parameter is set to 1, the API will return all matching application data for the search and charge the corresponding number of credits. It is highly recommended that searches are initially run with this parameter set to 0 to understand the volume of responses expected. |
EXAMPLE - (return_data=0)
GET REQUEST: https://api.planning.org.uk/v1/search?key=a1b2c3d4e5f6g7h8&lpa_id=2&date_from=2023-10-10&date_to=2023-10-21&return_data=0
JSON RESPONSE: {
{
"request": {
"api_endpoint": "/search",
"ip_address": "999.999.999.999",
"datetime": "2023-10-22 21:16:42",
"key": "a1b2c3d4e5f6g7h8",
"date_from": "2023-10-20",
"date_to": "2023-10-21",
"return_data": "0"
},
"response": {
"api_version": "1.0",
"credits": {
"consumed": 0,
"remaining": "100"
},
"status": "OK",
"application_count": 26
}
}
EXAMPLE - (return_data=1)
GET REQUEST: https://api.planning.org.uk/v1/search?key=a1b2c3d4e5f6g7h8&lpa_id=2&date_from=2023-10-10&date_to=2023-10-21&return_data=1
JSON RESPONSE: {
{
"request": {
"api_endpoint": "/search",
"ip_address": "999.999.999.999",
"datetime": "2023-10-22 21:16:42",
"key": "a1b2c3d4e5f6g7h8",
"date_from": "2023-10-20",
"date_to": "2023-10-21",
"return_data": "0"
},
"response": {
"api_version": "1.0",
"credits": {
"consumed": 26,
"remaining": "74
},
"status": "OK",
"application_count": 26,
"data": [
{
"lpa_id": "2",
"lpa_name": "chichester",
"keyval": "S08U81GYK8S00",
"externalLink": "https://publicaccess.bromsgroveandredditch.gov.uk/online-applications/applicationDetails.do?activeTab=summary&keyVal=RX66U0SEIM600",
"title": "Two storey rear extension, following demolition of the existing ground floor rear addition.",
"address": "21 Church Road Epsom Surrey KT17 4DZ",
"postcode": "KT17 4DZ",
"lat": "51.333349",
"lng": "-0.257361",
"validated": "2023-10-10",
"applicant_name": "Mr Adrian Bailey",
"applicant_address": "21 Church Road Epsom Surrey KT17 4DZ",
"agent_name": null,
"agent_address": null,
"agent_phone": null,
"agent_email": null,
"docs": "11"
},...json truncated