ONS UK Statistics Beta API Scraper
Pricing
from $27.00 / 1,000 results
ONS UK Statistics Beta API Scraper
Scrape the UK Office for National Statistics (ONS) Beta API. Pull the dataset catalogue, dataset-level metadata, editions, versions and CSV-style observations across themes including economy, population, labour market and inflation.
Pricing
from $27.00 / 1,000 results
Rating
0.0
(0)
Developer
ParseForge
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 days ago
Last modified
Categories
Share

📊 ONS UK Statistics Scraper
🚀 Export the official UK statistical catalogue in seconds. Pull the full ONS dataset catalogue, dataset metadata, editions, versions, available dimensions, and CSV-style observation values across inflation, the labour market, population, GDP, wellbeing, and more. No sign-up needed.
🕒 Last updated: 2026-05-15 · 📊 22 fields per record · 📦 300+ datasets · 🇬🇧 National + regional + local-authority coverage
The ONS UK Statistics Scraper taps the official UK Office for National Statistics catalogue and returns clean, structured records covering every published dataset. Pull dataset titles, descriptions, release frequencies, next-release dates, methodologies, related publications, dimension lists, and observation values keyed by geography, time, and analytic dimensions.
The catalogue spans 300+ active datasets, including CPIH inflation, labour-force survey, GDP estimates, population projections, regional wellbeing, and dozens of bespoke survey publications. Coverage runs from the UK level down to local-authority districts. This Actor turns the entire catalogue, single-dataset metadata, dimension-options helper, and version-level observations into downloadable CSV, Excel, JSON, or XML in minutes.
| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Economists, journalists, fintech & PropTech teams, policy analysts, researchers, BI engineers, civic-tech developers | Inflation tracking, GDP nowcasting, labour-market dashboards, regional analytics, BBC-style newsroom charts, ML feature engineering, Power BI / Tableau feeds |
📋 What the ONS UK Scraper does
Four workflows in a single Actor:
- 📚 Catalogue mode. List every published ONS dataset with title, description, release frequency, next-release date, keywords, contacts, methodologies, related publications, and the latest version pointer.
- 🧾 Dataset mode. Pull the full metadata for one dataset or batch up to 100 dataset slugs in a single run. Includes editions, versions, taxonomy, and quality-management information.
- 🗂️ Available dimensions mode. Helper that lists every dimension and its full set of options for a dataset version — so you know which filter codes to plug into observations mode.
- 📈 Observations mode. Download observation values for any dataset version with optional dimension filters (geography codes, time, analytic axes).
Every record carries the official ONS deep link, so you can verify any number against the source page in one click.
💡 Why it matters: UK official statistics underpin lending decisions, public-policy research, regional economic strategy, journalism, and academic work. Building your own pipeline against the official catalogue means handling pagination, edition resolution, dimension decoding, and CSV parsing by hand. This Actor skips all of that and keeps your dataset fresh on every run.
🎬 Full Demo
🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded dataset.
⚙️ Input
| Input | Type | Default | Behavior |
|---|---|---|---|
mode | enum | "catalogue" | One of catalogue, dataset, observations, availableDimensions. |
datasetId | string | "" | ONS dataset slug (e.g. cpih01, wellbeing-quarterly). Required for dataset, observations, and availableDimensions modes. |
datasetIds | array | [] | Batch lookup for dataset mode. Up to 100 slugs per run. Takes precedence over datasetId. |
edition | string | "time-series" | Edition slug used in observations and availableDimensions modes. |
version | string | "" | Version number. Leave empty to use the latest version. |
dimensions | object | {} | Dimension wildcards for observations mode, e.g. {"geography":"K04000001","time":"*","aggregate":"cpih1dim1A0"}. Use "*" for any. |
maxItems | integer | 10 | Records to return. Free plan caps at 10, paid plan at 1,000,000. |
Example: full ONS catalogue (first 50 datasets).
{"mode": "catalogue","maxItems": 50}
Example: latest CPIH inflation observations for England and Wales.
{"mode": "observations","datasetId": "cpih01","edition": "time-series","dimensions": {"geography": "K04000001","time": "*","aggregate": "cpih1dim1A0"},"maxItems": 100}
⚠️ Good to Know: ONS dataset slugs are short (e.g.
cpih01,weekly-deaths-region). Usecataloguemode first to discover slugs, then switch toavailableDimensionsto learn the valid filter codes for the dataset, then toobservationsto pull values. Geography codes follow the ONS Standard Geography Code (e.g.K04000001= England and Wales,E92000001= England).
📊 Output
Each record contains up to 22 fields depending on mode. Download the dataset as CSV, Excel, JSON, or XML.
🧾 Schema
| Field | Type | Example |
|---|---|---|
🆔 id | string | "cpih01" |
🔗 url | string | "https://www.ons.gov.uk/datasets/cpih01" |
🏷️ title | string | "Consumer Prices Index including owner occupiers' housing costs (CPIH)" |
📝 description | string | "A comprehensive measure of inflation that includes owner occupiers' housing costs..." |
🚦 state | string | "published" |
🏛️ national_statistic | boolean | true |
🔁 release_frequency | string | "Monthly" |
📅 next_release | string | "22 May 2026" |
📅 nextReleaseDate | ISO 8601 | "2026-05-22T00:00:00.000Z" |
📐 unit_of_measure | string | "Index" |
🪪 license | string | "Open Government Licence v3.0" |
🕒 last_updated | string | "2026-04-17T07:00:00.000Z" |
🏷️ keywords | array | ["inflation","cpi","cpih","prices"] |
📞 contacts | array | [{ "name": "Consumer Prices Team", "email": "..." }] |
📄 qmi | string | "https://www.ons.gov.uk/economy/inflationandpriceindices/qmis/..." |
📚 methodologies | array | [{ "title": "CPIH methodology", "href": "..." }] |
🔗 publications | array | [{ "title": "Consumer price inflation, UK: April 2026", "href": "..." }] |
🔗 related_datasets | array | [{ "title": "Producer price inflation", "href": "..." }] |
🔢 latest_version | string | "148" |
🗂️ editions | array | [{ "edition": "time-series", "state": "published", "latest_version": "148" }] |
💰 value | number | 132.4 |
📐 dimensions | object | { "geography": "K04000001", "time": "Apr-26", "aggregate": "cpih1dim1A0" } |
🕒 scrapedAt | ISO 8601 | "2026-05-15T10:00:00.000Z" |
📦 Sample record (catalogue mode)
✨ Why choose this Actor
| Capability | |
|---|---|
| 🇬🇧 | Full ONS catalogue. 300+ datasets across inflation, labour, GDP, population, wellbeing, and more. |
| 🗂️ | Edition + version aware. Pull the latest version automatically or pin to a historical edition. |
| 🧾 | Batch metadata. Up to 100 dataset slugs in one run with editions and versions resolved. |
| 🗺️ | Dimension helper. Discover the valid filter codes for any dataset version before pulling observations. |
| 🔁 | Always fresh. Every run reflects the current state of the official catalogue. |
| 🧰 | No setup. No sign-up, no key, no scraping CSS selectors. |
| 🔗 | Source-anchored. Every record carries the official ONS deep link. |
📊 The ONS is the most-cited reference for UK inflation, employment, GDP, and population data. This Actor makes it queryable in seconds.
📈 How it compares to alternatives
| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| ⭐ ONS UK Scraper (this Actor) | $5 free credit, then pay-per-use | 300+ datasets, regional + LA detail | Live per run | catalogue, dataset, observations, dimensions | ⚡ 2 min |
| Manual CSV downloads | Free | Per-dataset only | Manual | None | 🐢 Hours per dataset |
| Macro-data terminals | $24,000+/year | Curated subset | Live | Many | ⏳ Days |
| Build your own pipeline | Engineering hours | What you build | What you build | What you build | 🕒 Weeks |
Pick this Actor when you want broad UK coverage, server-side filtering, and no parser maintenance.
🚀 How to use
- 📝 Sign up. Create a free account with $5 credit (takes 2 minutes).
- 🌐 Open the Actor. Go to the ONS UK Statistics Scraper page on the Apify Store.
- 🎯 Set input. Pick a mode (start with
catalogueto browse), setmaxItems, and click Start. - 🚀 Run it. Click Start and let the Actor collect your data.
- 📥 Download. Grab your results in the Dataset tab as CSV, Excel, JSON, or XML.
⏱️ Total time from signup to downloaded dataset: 3-5 minutes. No coding required.
💼 Business use cases
🔌 Automating ONS UK Scraper
Control the scraper programmatically for scheduled runs and pipeline integrations:
- 🟢 Node.js. Install the
apify-clientNPM package. - 🐍 Python. Use the
apify-clientPyPI package. - 📚 See the Apify API documentation for full details.
The Apify Schedules feature lets you trigger this Actor on any cron interval. Daily refreshes for high-frequency datasets (CPIH, labour market, GDP estimates) keep dashboards current with no engineering effort.
🌟 Beyond business use cases
Data like this powers more than commercial workflows. The same structured records support research, education, civic projects, and personal initiatives.
🤖 Ask an AI assistant about this scraper
Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:
- 💬 ChatGPT
- 🧠 Claude
- 🔍 Perplexity
- 🅒 Copilot
❓ Frequently Asked Questions
🧩 How does it work?
Pick a mode (catalogue, dataset, observations, available dimensions), set the dataset slug or filters, and click Start. The Actor pulls clean structured records straight from the official ONS catalogue. No browser automation, no captchas, no setup.
📏 How accurate is the data?
Every value comes directly from the official ONS catalogue, the canonical source for UK official statistics. No transformation is applied beyond field-name normalization and ISO timestamp stamping.
🔁 How often is the catalogue refreshed?
The catalogue is updated continuously as ONS releases new datasets and revises existing versions. Every run of this Actor returns the live state of the catalogue.
🗺️ How do I pull regional or local-authority data?
Use availableDimensions mode to discover the geography codes a dataset supports, then pass the code in the dimensions.geography filter when running observations mode. ONS Standard Geography codes look like K04000001 (England and Wales) or E08000003 (Manchester).
⏰ Can I schedule regular runs?
Yes. Use Apify Schedules to run this Actor on any cron interval (hourly, daily, weekly) and keep your downstream database in sync with new ONS releases.
⚖️ Is this data legal to use?
ONS publishes under the Open Government Licence v3.0, which permits commercial and non-commercial use with attribution. Review the licence terms for your specific use case.
💼 Can I use this data commercially?
Yes. The underlying ONS data is open and permits commercial use with attribution. You are responsible for complying with the licence and with any downstream regulatory requirements.
💳 Do I need a paid Apify plan to use this Actor?
No. The free Apify plan is enough for testing and small runs (10 records per run). A paid plan lifts the limit and gives you access to scheduling, higher concurrency, and larger datasets.
🔁 What happens if a run fails or gets interrupted?
Apify automatically retries transient errors. If a run still fails, you can inspect the log in the Runs tab, fix the input, and re-run. Partial datasets from failed runs are preserved so you never lose progress.
📝 Why are some datasets missing fields?
Not every ONS dataset publishes the same metadata blocks (methodologies, publications, related datasets). When a block is empty in the source, the corresponding field is returned as null or an empty array.
🆘 What if I need help?
Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.
🔌 Integrate with any app
ONS UK Scraper connects to any cloud service via Apify integrations:
- Make - Automate multi-step workflows
- Zapier - Connect with 5,000+ apps
- Slack - Get run notifications in your channels
- Airbyte - Pipe ONS records into your warehouse
- n8n - Self-hosted workflow automation
- Pipedream - Event-driven serverless workflows
- GitHub - Trigger runs from commits and releases
- Google Drive - Export datasets straight to Sheets
You can also use webhooks to trigger downstream actions when a run finishes. Push fresh CPIH or labour-market numbers into your product backend, or alert your team in Slack the minute a new release lands.
🔗 Recommended Actors
- 📊 Statistics Canada Scraper - Canadian official statistics catalogue
- 📊 INE Spain Scraper - Spanish National Statistics Institute
- 📊 INE Portugal Scraper - Statistics Portugal indicators
- 📊 IBGE Brazil Scraper - Brazilian Institute of Geography and Statistics
- 📈 Indexmundi Scraper - Global demographic and economic indicators
💡 Pro Tip: browse the complete ParseForge collection for more reference-data scrapers.
🆘 Need Help? Open our contact form to request a new scraper, propose a custom data project, or report an issue.
⚠️ Disclaimer: this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the Office for National Statistics or the UK Government. All trademarks mentioned are the property of their respective owners. Only publicly available open data is collected.