Sign inTry it

Search UK open datasets on data.gov.uk.

Searches the UK government open data directory like its search page: dataset title, publisher, short description and link, in the site's order. First page of results (about 20 datasets). Returns an empty list when nothing matches.

No reports yetRead-only, no login
Site
data.gov.uk, United Kingdom
Version
v1
Runs, last 7 days
No reports yet
sha256
a89239199ce6…

Run it with your agent

after installing Wield

Ask in plain words. Your agent finds this recipe and calls it:

“Search UK open datasets on data.gov.uk.”

Read-only: it changes nothing on the site. No login needed.

{
  "tool": "run",
  "arguments": {
    "recipe_id": "data.gov.uk/search-open-data",
    "params": {
      "query": "air quality"
    }
  }
}

Requests

sent from your browser, in order
  1. 1GET/search?qServer-rendered search page /search?q=…; read-only GET. Each dataset is li.datagovuk-search-results__item with its title link, publisher and description.

Parameters

from your agent
querystringrequiredSearch term for datasets, e.g. 'air quality', 'transport', 'crime'

Returns

to your agent
datasetsobject[]publisher, title, url
querystring

Where it can send

  • www.data.gov.uk

Anything else is blocked by the extension.

Reads from your session

Nothing. Your browser attaches the site's cookies by itself.

Used only in requests to the addresses on the left. Never sent to wield.run or your agent.

Checks

a run passes when
  • length(output.datasets) > `0`
  • length(output.datasets[?title != `null`]) == length(output.datasets)
  • length(output.datasets[?starts_with(url, 'https://www.data.gov.uk/dataset/')]) == length(output.datasets)

Raw recipe

Served as canonical JSON from /api/v1/recipes/data.gov.uk/search-open-data, so its sha256 matches the ETag and the index.

Check it yourself
curl -s https://wield.run/api/v1/recipes/data.gov.uk/search-open-data | shasum -a 256
# a89239199ce676256847e973c0b9f0ff8211edbff114a1098a8c39ddd19bcadb
data.gov.uk/search-open-data.json, v1
{
  "description": "Searches the UK government open data directory like its search page: dataset title, publisher, short description and link, in the site's order. First page of results (about 20 datasets). Returns an empty list when nothing matches.",
  "effect": "read",
  "id": "data.gov.uk/search-open-data",
  "keywords": [
    "data.gov.uk",
    "open data",
    "datasets",
    "dataset",
    "government data",
    "statistics",
    "uk",
    "gov.uk",
    "national data library",
    "open government",
    "data portal",
    "datenbank",
    "offene daten"
  ],
  "output": {
    "schema": {
      "properties": {
        "datasets": {
          "items": {
            "properties": {
              "publisher": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "url"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "query": {
          "type": "string"
        }
      },
      "required": [
        "query",
        "datasets"
      ],
      "type": "object"
    },
    "value": "{query: params.query, datasets: steps.search.datasets[?title != `null` && href != `null`].{title: title, publisher: publisher || `null`, url: join('', ['https://www.data.gov.uk', href])}}"
  },
  "params": {
    "additionalProperties": false,
    "properties": {
      "query": {
        "description": "Search term for datasets, e.g. 'air quality', 'transport', 'crime'",
        "maxLength": 100,
        "minLength": 2,
        "type": "string"
      }
    },
    "required": [
      "query"
    ],
    "type": "object"
  },
  "provenance": {
    "method": "har",
    "notes": "GET /search?q=… returns server-rendered dataset items (li.datagovuk-search-results__item) with title link a.datagovuk-link--secondary, publisher and description. Fetched once with the same page a visitor loads. Only the first page of results is read.",
    "recorded_at": "2026-11-08T16:40:00.000Z",
    "recorded_by": "wield-forge (claude-haiku agent)"
  },
  "requires_login": false,
  "schema": "https://wield.run/schema/recipe/v1.json",
  "site": {
    "country": "GB",
    "id": "data.gov.uk",
    "language": "en",
    "name": "data.gov.uk",
    "origin": "https://www.data.gov.uk",
    "origins": [
      "https://www.data.gov.uk"
    ]
  },
  "steps": [
    {
      "description": "Server-rendered search page /search?q=…; read-only GET. Each dataset is li.datagovuk-search-results__item with its title link, publisher and description.",
      "expect": {
        "content_type": "html",
        "status": [
          200
        ]
      },
      "extract": {
        "html_items": {
          "datasets": {
            "fields": {
              "href": {
                "attr": "href",
                "selector": "a.datagovuk-link--secondary"
              },
              "publisher": {
                "selector": ".datagovuk-search-results__item-value"
              },
              "title": {
                "selector": "a.datagovuk-link--secondary"
              }
            },
            "max": 50,
            "selector": "li.datagovuk-search-results__item"
          }
        }
      },
      "id": "search",
      "request": {
        "headers": {
          "Accept": "text/html"
        },
        "method": "GET",
        "query": {
          "q": "{{params.query}}"
        },
        "url": "/search"
      }
    }
  ],
  "task": "Search UK open datasets on data.gov.uk",
  "tos": {
    "notes": "Not reviewed. One search page per call, the same page a visitor loads. The site's terms on automated access were not checked.",
    "reviewed": false
  },
  "verify": {
    "checks": [
      "length(output.datasets) > `0`",
      "length(output.datasets[?title != `null`]) == length(output.datasets)",
      "length(output.datasets[?starts_with(url, 'https://www.data.gov.uk/dataset/')]) == length(output.datasets)"
    ],
    "example_params": {
      "query": "air quality"
    },
    "max_ms": 5000
  },
  "version": 1
}