canonical: https://jentic.com/apis/data.gov.uk/data-gov-uk

# data.gov.uk CKAN API

The data.gov.uk CKAN API searches and retrieves metadata for UK government open datasets published through the national data portal. It returns dataset records (called packages) with their titles, descriptions, tags, and downloadable resource links, and it lists the organisations that publish them. Every response is a JSON envelope carrying a success flag and a result payload, and the read-only endpoints need no API key. It exposes a public subset of the CKAN action API covering dataset and organisation list, show, and search operations.

## For AI agents

Search UK government open datasets, retrieve dataset details and resource download links, and list the organisations that publish them. Returns JSON records from the data.gov.uk portal with no API key required.

## Scope

Does not handle data transformation, visualisation, or writing records back to the portal. Use for searching and retrieving UK government open dataset and publisher metadata only.

## Capabilities

- Search UK government datasets by keyword and return matching package records
- Retrieve the full metadata for a dataset, including its resources and download URLs
- List every dataset name available on the data.gov.uk portal
- List the government organisations that publish open data
- Look up a single publishing organisation and the datasets it maintains

## Use cases

### Agent-Driven Open Data Discovery

An AI agent connected through Jentic searches the data.gov.uk portal for UK government datasets matching a user's question, reads each dataset's metadata and resource links, and hands back the most relevant sources. Because the endpoints are read-only and need no API key, the agent can browse datasets and publishing organisations without any credential setup.

Example prompt: Search data.gov.uk for datasets matching 'renewable energy generation' and return the top five with their titles and resource download URLs

### Dataset Research and Sourcing

Analysts and applications use the data.gov.uk CKAN API to locate authoritative UK government datasets on a topic, then pull each dataset's description, tags, and resource files for download. The dataset search endpoint accepts free-text queries and returns structured records so a tool can rank and filter results before fetching the underlying files.

Example prompt: Retrieve the details for the dataset named 'road-safety-data' and extract every resource download URL it lists

### Publisher and Organisation Lookup

Applications that need to know which UK public bodies publish open data query the organisation endpoints to list every publisher and inspect an individual organisation's profile and datasets. This supports building directories of data sources or attributing a dataset to the department that maintains it.

Example prompt: List all organisations on data.gov.uk and then fetch the profile for the organisation named 'environment-agency'

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/package_search` | Search datasets by keyword |
| GET | `/package_show` | Get the details of a dataset |
| GET | `/package_list` | List all dataset names |
| GET | `/organization_list` | List all organisations |
| GET | `/organization_show` | Get the details of an organisation |

## Key resources

- **Datasets (packages)** — List, show, and search dataset records including their resources and metadata
- **Organisations** — List all publishers and retrieve a single organisation's details and datasets

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 68 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 90 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 45 / 100
  - Agent Usability: 94 / 100
  - Security: 100 / 100
  - AI Discoverability: 73 / 100
- **View full report:** https://jentic.com/apis/data.gov.uk/data-gov-uk/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the data.gov.uk CKAN API by hand means reading the CKAN action conventions, handling the JSON envelope, and parsing the success and result fields yourself. Through Jentic you install once, import the API from the Directory, and your agent calls it. There is no API key to obtain or configure, because the endpoints are public.
- **Permission scoping:** Every data.gov.uk operation is a read-only request, and Jentic lets you choose which ones your agent may call, so you can allow dataset search and dataset detail reads while leaving out anything else. The API exposes no write or delete operations, so the agent cannot modify the portal.
- **Credential handling:** The data.gov.uk CKAN API needs no API key or token, so there is nothing sensitive to keep. Jentic calls its public endpoints directly on your behalf.
- **Discovery method:** Agents search Jentic by intent such as 'find open datasets about transport' or 'list data publishers', and Jentic returns the matching data.gov.uk operation with its input schema so the agent calls the right endpoint without reading the portal's documentation.

## Related APIs

- **Data.gov CKAN API** — US federal open data portal, also powered by CKAN with the same action API shape
- **Socrata Open Data API** — Open data platform serving many government and civic datasets with SoQL query support
- **US Census Bureau API** — US Census Bureau statistical data accessed by variable and geography

## FAQ

### What authentication does the data.gov.uk CKAN API use?

The data.gov.uk CKAN API is a public, read-only API that requires no API key or token per its OpenAPI spec. You call its action endpoints directly and receive a JSON envelope with a success flag and a result payload. Because there is nothing to authenticate, connecting it through Jentic is simply importing the API and letting your agent call it.

### Is there a data.gov.uk MCP server?

You don't need an MCP server to give your agent the data.gov.uk CKAN API. Jentic connects it directly from the API Directory: import it and your agent can search datasets and list organisations straight away, with no extra server to run and no tool definitions to load into the agent's context.

### Can I limit what my agent is allowed to do with the data.gov.uk CKAN API?

Yes. Every operation on this API is read-only, and through Jentic you pick which of them your agent may call, such as searching datasets and reading dataset details, so it can discover and fetch open data and nothing more. There are no write, update, or delete operations to expose, and every call your agent makes is logged.

### Can I download the actual dataset files with the data.gov.uk CKAN API?

The API returns each dataset's resource records, which include the direct download URLs for the underlying files such as CSV or JSON that the publisher uploaded. You read the dataset detail response to get those URLs, then fetch the files from the resource links themselves. The action endpoints serve metadata and search, not the file bytes.

### What are the rate limits for the data.gov.uk CKAN API?

The data.gov.uk documentation states that no API key is required and there are no published rate limits on the action API. For the authoritative and current guidance, see the official documentation at https://guidance.data.gov.uk/get_data/api_documentation/.

### How do I search data.gov.uk datasets through Jentic?

Import the data.gov.uk CKAN API from the Jentic API Directory, then have your agent issue a search such as 'find UK government datasets about flooding'. Jentic matches the intent to the dataset search operation and returns its input schema so the agent builds the correct request, and because the API is public there is nothing to authenticate. To run it on your own infrastructure, install Jentic One from its GitHub repo.
