Sign inTry it

Search UK statistics on the ONS website.

Searches the Office for National Statistics site like its search page: release title, release date, type (e.g. Statistical bulletin) and link, in the site's order. First page of results (about 10 items).

No reports yetRead-only, no login
Site
Office for National Statistics, United Kingdom
Version
v1
Runs, last 7 days
No reports yet
sha256
642c773cc10f…

Run it with your agent

after installing Wield

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

“Search UK statistics on the ONS website.”

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

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

Requests

sent from your browser, in order
  1. 1GET/search?qServer-rendered search page /search?q=…; read-only GET. Each result is li.search__results__item with its title link and a meta line (release date and type).

Parameters

from your agent
querystringrequiredStatistics topic, e.g. 'inflation', 'population', 'gdp'

Returns

to your agent
querystring
resultsobject[]released, title, type, url

Where it can send

  • www.ons.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.results) > `0`
  • length(output.results[?title != `null`]) == length(output.results)
  • length(output.results[?starts_with(url, 'https://www.ons.gov.uk/')]) == length(output.results)

Raw recipe

Served as canonical JSON from /api/v1/recipes/ons.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/ons.gov.uk/search-open-data | shasum -a 256
# 642c773cc10ff8048cae58a044b113980cd3b08f1b99dd26385e366e5c12fcdf
ons.gov.uk/search-open-data.json, v1
{
  "description": "Searches the Office for National Statistics site like its search page: release title, release date, type (e.g. Statistical bulletin) and link, in the site's order. First page of results (about 10 items).",
  "effect": "read",
  "id": "ons.gov.uk/search-open-data",
  "keywords": [
    "ons",
    "office for national statistics",
    "statistics",
    "statistik",
    "inflation",
    "population",
    "gdp",
    "economy",
    "census",
    "bulletin",
    "uk",
    "ons.gov.uk",
    "data"
  ],
  "output": {
    "schema": {
      "properties": {
        "query": {
          "type": "string"
        },
        "results": {
          "items": {
            "properties": {
              "released": {
                "description": "Release date as shown, e.g. '28 January 2022'",
                "type": [
                  "string",
                  "null"
                ]
              },
              "title": {
                "type": "string"
              },
              "type": {
                "description": "Release type, e.g. 'Statistical bulletin'",
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "url"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [
        "query",
        "results"
      ],
      "type": "object"
    },
    "value": "{query: params.query, results: steps.search.results[?title != `null` && href != `null`].{title: title, released: (meta && trim(split(split(meta, 'Released on:')[1] || '', '|')[0])) || `null`, type: (meta && trim(split(meta, '|')[1] || '')) || `null`, url: join('', ['https://www.ons.gov.uk', href])}}"
  },
  "params": {
    "additionalProperties": false,
    "properties": {
      "query": {
        "description": "Statistics topic, e.g. 'inflation', 'population', 'gdp'",
        "maxLength": 100,
        "minLength": 2,
        "type": "string"
      }
    },
    "required": [
      "query"
    ],
    "type": "object"
  },
  "provenance": {
    "method": "har",
    "notes": "GET /search?q=… returns server-rendered result items (li.search__results__item) with the title link inside h3 and a p.search__results__meta line holding 'Released on: <date> | <type>'. Fetched once with the same page a visitor loads. Only the first page of results is read.",
    "recorded_at": "2026-11-08T16:45:00.000Z",
    "recorded_by": "wield-forge (claude-haiku agent)"
  },
  "requires_login": false,
  "schema": "https://wield.run/schema/recipe/v1.json",
  "site": {
    "country": "GB",
    "id": "ons.gov.uk",
    "language": "en",
    "name": "Office for National Statistics",
    "origin": "https://www.ons.gov.uk",
    "origins": [
      "https://www.ons.gov.uk"
    ]
  },
  "steps": [
    {
      "description": "Server-rendered search page /search?q=…; read-only GET. Each result is li.search__results__item with its title link and a meta line (release date and type).",
      "expect": {
        "content_type": "html",
        "status": [
          200
        ]
      },
      "extract": {
        "html_items": {
          "results": {
            "fields": {
              "href": {
                "attr": "href",
                "selector": "h3 a"
              },
              "meta": {
                "selector": "p.search__results__meta"
              },
              "title": {
                "selector": "h3 a"
              }
            },
            "max": 50,
            "selector": "li.search__results__item"
          }
        }
      },
      "id": "search",
      "request": {
        "headers": {
          "Accept": "text/html"
        },
        "method": "GET",
        "query": {
          "q": "{{params.query}}"
        },
        "url": "/search"
      }
    }
  ],
  "task": "Search UK statistics on the ONS website",
  "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.results) > `0`",
      "length(output.results[?title != `null`]) == length(output.results)",
      "length(output.results[?starts_with(url, 'https://www.ons.gov.uk/')]) == length(output.results)"
    ],
    "example_params": {
      "query": "inflation"
    },
    "max_ms": 5000
  },
  "version": 1
}