API Endpoints

Geographic & Environment

Green Spaces

Tokens
× 1

API Credit Cost


Endpoint Overview

The Green Spaces endpoint provides a list of parks, nature reserves, and recreational areas within a specified radius of a postcode.


Coverage

EnglandEngland
ScotlandScotland
WalesWales
N. IrelandN. Ireland

Update Frequency

Quarterly

Request Format

HTTP Method:

GET

To use the API you should send an HTTP request to the following endpoint URL. This will return a JSON response.

https://api.postcodearea.co.uk/green-spaces/?key=&postcode={postcode}

Note that your key has automatically been added to the API endpoint for convenience.

Querystring Parameters:

{postcode}

A valid UK postcode (e.g., SW1A 1AA). Note that you can send the postcode with or without the space separating the outward and inward codes. For example, both "SW1A 1AA" and "SW1A1AA" are both valid.

{api_key}

A valid API key that authenticates your account.


Authorisation

For every endpoint request your API Key should be sent as part of the querystring:

https://api.postcodearea.co.uk/green-spaces/?key={api_key}&postcode=WS3+3PD

For example:

https://api.postcodearea.co.uk/green-spaces/?key=&postcode=WS3+3PD

Example Request and Response

If the above URL endpoint exists and the API key is valid, our system will return the following example response:

https://api.postcodearea.co.uk/green-spaces/?key=&postcode=WS3+3PD
{"data":[{"Location":"Gnosall","Country":"England","BUA Ha":"113.76","Address Count":"1737","Residential Garden Area":"55.49","Blue Space Area":"0.69","Green Space Area":"1.02","Public Green Space Area":"1.00","Allotment Area":"0.02","Allotment Count":"1.00","Bowling Green Area":"0.00","Bowling Green Count":"0.00","Cemetery Area":"0.00","Golf Area":"0.00","Golf Count":"0.00","Open Access Land Area":"0.00","Other Sports Area":"0.00","Other Sports Count":"0.00","Playing Fields Area":"0.33","Playing Fields Count":"1.00","Public Park Area":"0.00","Public Park Count":"0.00","Religious Grounds Area":"0.66","Religious Grounds Count":"1.00","Natural Land Cover Area":"22.30","Natural Land Agricultural Area":"11.61","Natural Land Boulders Area":"0.00","Natural Land Bridge Area":"0.01","Natural Land Cover Canal":"0.00","Natural Land Coniferous Area":"0.00","Natural Land Cover Coppice":"0.00","Natural Land Cover Footbridge Area":"0.00","Natural Land Heath Area":"0.00","Natural Land Marsh Area":"0.00","Natural Land Woodland Area":"0.13","Natural Land Mud Area":"0.00","Natural Land Unclassified Area":"5.69","Natural Land Non Coniferous Area":"1.66","Natural Land Orchard Area":"0.00","Natural Land Rail Bridge Area":"0.00","Natural Land Rail Area":"0.00","Natural Land Road Bridge Area":"0.00","Natural Land Roadside Natural Area":"2.99","Natural Land Rock Area":"0.00","Natural Land Rough Grassland Area":"0.00","Natural Land Saltmarsh Area":"0.00","Natural Land Sand Area":"0.00","Natural Land Scree Area":"0.00","Natural Land Scrub Area":"0.17","Natural Land Shingle Area":"0.00","Natural Land Track Area":"0.06","Area Metric":"Hectares"}],"response_time":0.0781,"Source":"PostcodeArea API","Output Area":"Radius","Radius":10,"Distance Unit":"Mile","Records":1,"Unique Fields":52,"Referrer":"api.postcodearea.co.uk","Host":"https://api.postcodearea.co.uk/green-spaces/?key=pa_XWQAV24RXCUU19NGUFM11TKTLN&postcode=st200ly","Endpoint":"/green-spaces/?key=pa_XWQAV24RXCUU19NGUFM11TKTLN&postcode=st200ly"}

Error Handling

HTTP Status Code Error Message Reason
400 Invalid postcode format The postcode provided is not valid.
401 Unauthorised request API key missing or invalid.
404 Postcode not found No data available for the given postcode.
404 No Results Found No data available for the given radius.
429 Too many requests Exceeded rate limit.
500 Internal server error An unexpected issue occurred.

Caching Policy

You may temporarily cache data retrieved from the API for performance optimisation purposes, provided that the cached data is:

  1. Stored in-memory only (e.g., application-level cache).
  2. Retained for no longer than one hour.

Caching API data to any persistent storage, including but not limited to databases, files, or external systems, constitutes a breach of our API Terms and Conditions. Such actions are strictly prohibited to ensure data accuracy and compliance with our licensing agreements.

If you have specific requirements for extended caching, you must seek prior written consent from us.


Get started today

Ready to use this data for your own business or organisation? Sign up today and get immediate access to all the PostcodeArea API endpoints.

Share this page