# UK Open Data Studio

UK Open Data Studio pulls time series from the Office for National Statistics beta API and joins them into one flat table per run: an annual GDP index for England, CPIH inflation, employment and unemployment rates, mid-year population, exports and imports, or the rental price index. It costs $0.02 per joined pull, or $0.01 for a raw extract of one to five datasets, and delivers CSV, JSON or XLSX under OGL v3.

## Key facts

- Price: from $0.02 per joined pull, $20.00 per 1,000
- Pricing model: Pay per event
- Output: JSON, CSV, Excel, XML, RSS via Apify datasets
- Access: Apify Console, REST API, Python and JS clients
- Version: Updated Nov 2026, build 0.1.7
- Usage: 100.0% successful runs (30 days)
- Actor: subimpact/uk-open-data-studio

## Who it is for

- Economists building a UK macro table from ONS series
- Property analysts tracking the rental price index
- Policy and public affairs teams needing cited official figures
- Data teams packaging UK indicators for a model or dashboard

## Use cases

### One macro table for a briefing

Run T1 for the annual GDP index, T2 for CPIH and T3 for the labour market, then stack the three files on the year key. Each preset returns a clean annual series rather than a raw ONS release, so a briefing table of growth, inflation and employment is assembled from three runs. The verification file records the years actually covered.

### Rental prices against inflation

T6 returns the Index of Private Housing Rental Prices for the UK using December values, and T2 returns CPIH all items on the same December basis. Because both presets use December values, the two series compare without further alignment, which is the comparison a property or affordability piece usually needs.

### Trade and population side by side

T5 gives total exports and imports against the whole world as monthly means, and T4 gives UK mid-year population estimates for all ages. Joined on year, that supports per-capita trade or an import dependence view. Use customJoinType left if you want every trade year kept even where a population estimate is not yet published.

### A custom join across ONS datasets

Set preset to custom, list two to six ONS dataset ids in customDatasets, and set customKey to year, which is extracted from the ONS time labels automatically. customJoinType chooses inner or left, customAgg sums or averages duplicates, and customParams passes dimension filters as JSON. That is how a regional cut gets built without downloading releases by hand.

### Raw series when you want no reshape

In extract mode, datasetIds takes one to five ONS ids such as cpih01, labour-market or regional-gdp-by-year and returns each dataset as its own file with a manifest and attribution. Use it when your own pipeline already does the joining, or when you need the full series that a preset narrows down.

## Price events

- Joined pull (`joined-pull`): $0.02, lowest tier $0.02. One cross-dataset join delivered as flat CSV/JSON/XLSX (studio mode).
- Data extraction (`extract-pull`): $0.01, lowest tier $0.01. One raw dataset pull (1-5 datasets by ID, no join).

Prices from the Apify Store. Apify shows the final price before each run.

## How it compares with other Apify actors

Price per 1,000 pulls at Apify Store list prices, checked 20 Nov 2026.

| Actor | Price per 1,000 pulls (Free plan) | Higher plans (Gold) | Start fee per run | Platform usage | Users | Rating | Last build |
| --- | --- | --- | --- | --- | --- | --- | --- |
| UK Open Data Studio — Gov Data Joins (this API) | $20.00 | $20.00 | None | Included | 2 | No reviews yet | 18 Nov 2026 |
| [data.gov.uk Datasets Scraper](https://apify.com/parseforge/data-gov-uk-scraper) | Charges per dataset listing row returned by a search, not per joined data pull. | Same unit, see the first price column | $0.075 | Included | 11 | 5.0 (2 reviews) | 30 Sep 2026 |
| [UK Location Risk & Amenity Report](https://apify.com/hllerdgn80/uk-location-risk-report) | One result per postcode, combining flood, crime and food hygiene data into a single report. | Same unit, see the first price column | $0.00005 | Included | 2 | No reviews yet | 29 Sep 2026 |
| [UK Police Crime Data: Street Crime, Stop & Search, Outcomes](https://apify.com/zaiqltd/uk-crime-data) | Charges per police data record, covering crime, stop and search and neighbourhood priorities. | Same unit, see the first price column | $0.00005 | Included | 2 | No reviews yet | 13 Nov 2026 |

### Where data.gov.uk Datasets Scraper is stronger

- Searches the whole data.gov.uk catalogue by topic, publisher and format
- Each row carries publisher, licence and download links
- Useful for finding which datasets exist before extracting anything

### Where this API is stronger

- Joins ONS series by year into one analysis ready table
- Six economic presets plus custom joins and aggregations
- CSV, JSON and XLSX delivery with webhook callbacks

### Where UK Location Risk & Amenity Report is stronger

- Combines flood warnings, street crime and food hygiene for one postcode
- Produces a plain English risk score next to the source values
- Covers environmental data that economic series do not

### Where this API is stronger

- Focuses on official ONS economic series with several join presets
- Custom datasets, keys and aggregations can be defined per run
- Exports to CSV, JSON or XLSX with OGL attribution text

### Where UK Police Crime Data: Street Crime, Stop & Search, Outcomes is stronger

- Covers three police datasets, including stop and search
- Rows carry force and neighbourhood identifiers
- Nationwide coverage rather than one economic theme

### Where this API is stronger

- Joins economic series across years rather than returning raw records
- Presets for growth, inflation, labour, population, trade and housing
- Output is shaped for analysis, with attribution written in

UK open data work on the Store is mostly single dataset extraction. parseforge lists data.gov.uk catalogue rows, zaiqltd returns police records, and hllerdgn80 joins a few local datasets into a postcode report. None of them join ONS economic series, which is the job this actor does through presets and custom joins.

Prices are Apify Store list prices, checked 20 Nov 2026. Platform usage 'Paid separately' means Apify bills compute on top of the event price. Check each listing before you buy.

## Input

- `mode` (string, optional): studio = value layer (presets, joins, AI-ready package). extract = raw data pull of 1-5 ONS datasets by ID (cheaper per-pull event).
- `datasetIds` (array, optional): For mode=extract: list of ONS dataset ids (e.g. cpih01, labour-market, regional-gdp-by-year) to pull raw (1-5). Leave empty to use studio mode.
- `preset` (string, optional): Join bundle. T1 = GDP & Economy by Year. T2 = Inflation by Year. T3 = Labour Market by Year. T4 = Population by Year. T5 = Trade by Year. T6 = Housing by Year. custom = bring your own ONS dataset ids.
- `customDatasets` (array, optional): For preset=custom: list of ONS dataset ids to join (2-6). Leave empty to use a preset.
- `customKey` (array, optional): For preset=custom: key parts to join on. Use 'year' (auto-extracted from ONS Time labels) or raw field names. All datasets must share these keys.
- `customJoinType` (string, optional): inner keeps only keys present in every dataset; left keeps all keys from the first dataset.
- `customParams` (string, optional): For preset=custom: JSON object of extra ONS dimension filters applied to every dataset, e.g. {"dims": {"geography": "K02000001"}}.
- `customAgg` (string, optional): none = keep raw rows (last value per key). sum = aggregate numeric values per key. mean = average numeric values per key.
- `format` (string, optional): File format delivered to the key-value store (dataset records are always JSON).
- `webhookUrl` (string, optional): POST the result file to this URL after the run (3 retries with backoff). Leave empty to skip.
- `aiReady` (boolean, optional): Also emit JSON Schema + data dictionary + sample rows for LLM/RAG ingestion.
- `includeAttribution` (boolean, optional): Attach source/licence metadata sidecar to every output (Open Government Licence v3.0).

### Example input

```json
{
  "mode": "studio",
  "preset": "T1"
}
```

## Output fields

- `mode` (any): 
- `preset` (any): 
- `rows` (any): 
- `format` (any): 
- `files` (any): 
- `year_range` (any): 
- `run_url` (any): 

## How to run it

1. Leave mode at studio and pick a preset, T1 for GDP and economy, T2 for inflation or T6 for housing.
2. Set format to csv for a spreadsheet, json for a pipeline, or xlsx for a report.
3. Optional: for your own indicators, set preset to custom and list two to six ONS dataset ids in customDatasets.
4. Run in the Apify Console and read the summary record, which reports rows, format, files and the year range.
5. Download the joined file and its verification, attribution and AI-ready sidecars from the key-value store.

### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/subimpact~uk-open-data-studio/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"studio","preset":"T1"}'
```

### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("subimpact/uk-open-data-studio").call(run_input={
      "mode": "studio",
      "preset": "T1"
    })

for item in client.dataset(run["default_dataset_id"]).iterate_items():
    print(item)
```

### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('subimpact/uk-open-data-studio').call({
  "mode": "studio",
  "preset": "T1"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();

console.log(items);
```

### n8n

Use the Apify node (Run an Actor).
Actor ID: subimpact/uk-open-data-studio
Input JSON: paste the example input below.

## Limits

- Presets cover six indicator bundles; anything else needs a custom join with ONS dataset ids.
- Series length and any gaps follow what ONS publishes for each dataset.
- A custom join requires knowing the ONS dataset ids in advance.
- Published output must keep the OGL v3 attribution sidecar.

## FAQ

### What does one join cost?

$0.02 per joined pull for a cross-dataset join delivered as a flat file, and $0.01 for a raw extract pull of one to five datasets by ID. ONS data is free to reuse, so the price covers the join, the reshape and the sidecar files.

### Which source does it read?

The ONS beta API for structured time series. The data.gov.uk CKAN catalogue is a metadata directory whose datastore API returns 403 with HTML links as resources, so this Actor pulls the series directly from ONS instead of chasing catalogue records.

### Which ONS presets are included?

T1 GDP and economy by year, T2 inflation by year, T3 labour market by year, T4 population by year, T5 trade by year and T6 housing by year. Each one joins named ONS series so you get a single annual table rather than a release document.

### Are the series annual or monthly?

Each preset is keyed on year: the GDP index is annual, CPIH uses December values, rental prices use December values, and trade is expressed as monthly means within the year. That keeps a multi-indicator table aligned on one row per year.

### Can I pull a specific ONS dataset?

Yes. In extract mode, datasetIds accepts one to five ONS ids such as cpih01, labour-market or regional-gdp-by-year, and returns each as its own file with a manifest and attribution, with no join or reshape applied.

### What licence applies?

ONS data is published under the Open Government Licence v3.0 with Crown copyright. Every run writes an attribution sidecar, and years are native CE, so the table needs no calendar conversion before publication.

### Which formats can I export?

json, csv and xlsx, chosen with format. The dataset also contains a summary record per run with mode, preset, rows, format, files and year range, and an AI-ready package with a JSON Schema, a data dictionary and sample rows when aiReady is left on.

## Links

- Page: https://subimpact.net/apis/uk-open-data-studio/
- Category: https://subimpact.net/apis/category/open-data/
- Run on Apify: https://apify.com/subimpact/uk-open-data-studio
- All data APIs: https://subimpact.net/apis/
- Catalogue JSON: https://subimpact.net/apis/catalogue.json
