The data.gov.uk API uses the CKAN API and its extensions.
You do not need an API key to use the API and there are no rate limits.
To call the API, post a JSON dictionary in a HTTP POST request to one of the data.gov.uk API URLs. The base URL for all calls is
In CKAN vocabulary,
packages refers to ‘datasets’.
For example calls using curl and parameters see the CKAN API documentation.
Get datasets and publisher information
This table lists the parameters and returns with example URLs.
||List of datasets||https://data.gov.uk/api/action/package_list|
||Information about a single dataset||https://data.gov.uk/api/action/package_show?id=cabinet-office-energy-use|
package_search to search datasets.
SOLR provides the parameters for search calls. For example parameters, see the SOLR documentation.
||Free text query||https://data.gov.uk/api/action/package_search?q=fish|
||Data by field||https://data.gov.uk/api/action/package_search?fq=publisher=peterborough-city-council|
Remember to escape these URLs. Most browsers will escape these automatically when you open these example links, but some clients, such as Python, will mostly need them URL encoded (spaces to
%20 etc). And on the command-line remember to quote the whole URL, for example use single quotes:
Get publisher information
Data.gov.uk uses CKAN
organizations to store what is shown as ‘publishers’ on the frontend.
||List of publishers||https://data.gov.uk/api/action/organization_list|
||Information about a single publisher||https://data.gov.uk/api/action/organization_show?id=cabinet-office&include_datasets=false|
Send a data request
If you cannot find the data you need, you can ask government to publish a dataset that is not yet published on data.gov.uk.
Send a data request to the data.gov.uk team and they will forward it to the relevant government department.
For requests and questions about a dataset already on data.gov.uk, you can contact the publisher directly if they’ve provided their contact details next to the dataset.