ONS UK Statistics Beta API Scraper avatar

ONS UK Statistics Beta API Scraper

Pricing

from $27.00 / 1,000 results

Go to Apify Store
ONS UK Statistics Beta API Scraper

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

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

ParseForge Banner

📊 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 developersInflation 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

InputTypeDefaultBehavior
modeenum"catalogue"One of catalogue, dataset, observations, availableDimensions.
datasetIdstring""ONS dataset slug (e.g. cpih01, wellbeing-quarterly). Required for dataset, observations, and availableDimensions modes.
datasetIdsarray[]Batch lookup for dataset mode. Up to 100 slugs per run. Takes precedence over datasetId.
editionstring"time-series"Edition slug used in observations and availableDimensions modes.
versionstring""Version number. Leave empty to use the latest version.
dimensionsobject{}Dimension wildcards for observations mode, e.g. {"geography":"K04000001","time":"*","aggregate":"cpih1dim1A0"}. Use "*" for any.
maxItemsinteger10Records 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). Use catalogue mode first to discover slugs, then switch to availableDimensions to learn the valid filter codes for the dataset, then to observations to 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

FieldTypeExample
🆔 idstring"cpih01"
🔗 urlstring"https://www.ons.gov.uk/datasets/cpih01"
🏷️ titlestring"Consumer Prices Index including owner occupiers' housing costs (CPIH)"
📝 descriptionstring"A comprehensive measure of inflation that includes owner occupiers' housing costs..."
🚦 statestring"published"
🏛️ national_statisticbooleantrue
🔁 release_frequencystring"Monthly"
📅 next_releasestring"22 May 2026"
📅 nextReleaseDateISO 8601"2026-05-22T00:00:00.000Z"
📐 unit_of_measurestring"Index"
🪪 licensestring"Open Government Licence v3.0"
🕒 last_updatedstring"2026-04-17T07:00:00.000Z"
🏷️ keywordsarray["inflation","cpi","cpih","prices"]
📞 contactsarray[{ "name": "Consumer Prices Team", "email": "..." }]
📄 qmistring"https://www.ons.gov.uk/economy/inflationandpriceindices/qmis/..."
📚 methodologiesarray[{ "title": "CPIH methodology", "href": "..." }]
🔗 publicationsarray[{ "title": "Consumer price inflation, UK: April 2026", "href": "..." }]
🔗 related_datasetsarray[{ "title": "Producer price inflation", "href": "..." }]
🔢 latest_versionstring"148"
🗂️ editionsarray[{ "edition": "time-series", "state": "published", "latest_version": "148" }]
💰 valuenumber132.4
📐 dimensionsobject{ "geography": "K04000001", "time": "Apr-26", "aggregate": "cpih1dim1A0" }
🕒 scrapedAtISO 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

ApproachCostCoverageRefreshFiltersSetup
⭐ ONS UK Scraper (this Actor)$5 free credit, then pay-per-use300+ datasets, regional + LA detailLive per runcatalogue, dataset, observations, dimensions⚡ 2 min
Manual CSV downloadsFreePer-dataset onlyManualNone🐢 Hours per dataset
Macro-data terminals$24,000+/yearCurated subsetLiveMany⏳ Days
Build your own pipelineEngineering hoursWhat you buildWhat you buildWhat you build🕒 Weeks

Pick this Actor when you want broad UK coverage, server-side filtering, and no parser maintenance.


🚀 How to use

  1. 📝 Sign up. Create a free account with $5 credit (takes 2 minutes).
  2. 🌐 Open the Actor. Go to the ONS UK Statistics Scraper page on the Apify Store.
  3. 🎯 Set input. Pick a mode (start with catalogue to browse), set maxItems, and click Start.
  4. 🚀 Run it. Click Start and let the Actor collect your data.
  5. 📥 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

🏦 Banking, fintech, and insurance

  • Live CPIH inflation feeds for retail-rate dashboards
  • Mortgage and insurance underwriting fed by labour-market and earnings data
  • Macro-forecasting models with quarterly GDP estimates
  • Risk dashboards aligned with ONS official statistics

🏘️ PropTech and real estate

  • Local-authority population and household projections for site selection
  • Regional wage and employment data for valuation models
  • Construction output and house-price indices
  • Demographic shifts feeding tenant-targeting

📊 Market research and consulting

  • Industry GDP, productivity, and earnings benchmarks
  • Retail sales, services turnover, and producer prices
  • Consumer trends from the household-spending survey
  • Sector deliverables backed by official UK numbers

📰 Journalism and policy

  • Live charts of inflation, jobs, and GDP for newsrooms
  • Regional explainers backed by local-authority data
  • Public-policy briefs with cited, versioned numbers
  • Investigative reporting on housing, health, and wellbeing

🔌 Automating ONS UK Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

  • 🟢 Node.js. Install the apify-client NPM package.
  • 🐍 Python. Use the apify-client PyPI 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.

🎓 Research and academia

  • Macroeconomic theses with cited, versioned dataset pulls
  • Public-health and demographic research at the regional level
  • Reproducible studies with stable dataset slugs and versions
  • Open-data exercises in econometrics and stats courses

🎨 Personal and creative

  • Side projects, indie data dashboards, and portfolio demos
  • Interactive UK maps, inflation trackers, and visualizations
  • Content research for data journalists and creators
  • Hobbyist time-series for forecasters and analysts

🤝 Non-profit and civic

  • Equity research on regional income, housing, and labour outcomes
  • Civic transparency on public spending and services
  • Investigative journalism backed by ONS official numbers
  • Open data community contributions and visualizations

🧪 Experimentation

  • Train forecasting and anomaly-detection ML models
  • Validate macro hypotheses with real time-series
  • Prototype agent pipelines that resolve dataset slugs
  • Test BI dashboard concepts with live UK data

🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:


❓ 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.

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.


💡 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.