# UK GDP Four-Decimal Time Series - ONS, Per Observation (`nexgensignal/uk-gdp-four-decimal-time-series`) Actor

The UK's GDP to four decimal places (ONS time-series) as clean per-observation records - SIC/GDP component, geography, month, four-decimal value and the resolved dataset version. Latest version resolved at run time (not hard-coded). ~9,558 rows. UK ONS, not Swedish SCB. OGL v3.0. $0.05 per record.

- **URL**: https://apify.com/nexgensignal/uk-gdp-four-decimal-time-series.md
- **Developed by:** [NexGen Signal](https://apify.com/nexgensignal) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $33.50 / 1,000 gdp observations

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## UK GDP Four-Decimal Time Series - ONS, Per Observation

The UK's GDP components to four decimal places by SIC component and month from the Office for National Statistics (ONS), as clean per-observation records, stamped with the dataset version resolved at run time.

### What one record represents

The source is the ONS **GDP to four decimal places** time-series, read through the ONS beta datasets API at `api.beta.ons.gov.uk`. Each record is **one SIC component x measure x month observation** - the time, geography and SIC/GDP component, the four-decimal observation value and the resolved `dataset_version`, stamped on every record. Every column is emitted, so no dimension is dropped.

### Coverage and versioning

The Actor resolves the **latest published version at run time** from the ONS dataset API (it does not hard-code a version), reads that version's own CSV download link and streams it. The version fetched at listing time holds **9,558** observation rows. Because ONS re-publishes and re-versions the series, the live row count is the honest measure and is quoted here; a scheduled run always pulls the newest version. This is the UK ONS four-decimal GDP series - distinct from the Swedish SCB GDP cell (different country and office). You raise **Maximum records** to pull the whole series or lower it to sample.

### Licence

UK Office for National Statistics (ONS). Crown copyright, reusable commercially under the Open Government Licence v3.0 (OGL v3.0) with the acknowledgement 'Source: Office for National Statistics licensed under the Open Government Licence v3.0', carried on every record.

### Sibling Actors

The fleet's Eurostat gdp-components cell is an EU aggregate from a different office, and this wave's se-gdp-industry-quarter cell is the Swedish national series; this is the UK ONS four-decimal series. No dataset-row overlap.

### Fields, scheduling and integration

Every field in the record is either a source-native identifier, a source-native attribute, or one of the six
provenance fields (`source`, `source_dataset`, `licence`, `attribution`, `caveat`, `observed_at`) the fleet attaches to
every record. Nothing is derived or inferred beyond the small, documented transforms noted above, and nothing is
dropped silently - the handling section spells out exactly what is excluded and why. The grain is one record per the
natural unit of the source, which keeps each row independently meaningful, keeps the key stable across runs so
re-running is a cheap upsert rather than a re-import, and lets you aggregate up to whatever unit you need without
unpicking a pre-joined table.

Because the source republishes on its own cadence, a scheduled run keeps a downstream table current: new and changed
records upsert over the old ones on the stable key, and the `observed_at` stamp tells you when each was last seen live.
Set **Maximum records** low to sample the shape of the data cheaply, then raise it once the cell fits your use; the
Actor streams or partitions its source, so memory stays flat regardless of how many records you request, and you are
billed only for what is delivered. The output is a flat table of typed records, so it drops straight into whatever you
already use: load the run's dataset over the API or an export, key on the record id, and upsert. Because identifiers
are preserved exactly as the source publishes them, joins across the fleet's cells - and onto your own systems - work
without a mapping layer. There is no subscription and no minimum: the per-record price and the record cap together
mean the spend on any run is known in advance and matched exactly to the data you receive.

### Reconciling counts honestly

Where the live count differs from any previously published figure, the live measure is the honest one and is what this
listing quotes; sources re-issue and re-version their data over time. The run receipt always states what was actually
delivered and charged and confirms the two agree, so every run is auditable against itself regardless of what any
external index expected.

### Scaling, scheduling and support

A common pattern is a light scheduled run that pulls the newest slice into a staging table, then a merge on the stable
key into the table your product reads, so you never re-pay for rows you already hold and your history grows cleanly
over time. Because the record shape assumes no particular warehouse, language or tool, the integration work is a load
and a merge, not a cleaning project: the same code path handles a 40-row sample and a full pull, and the only thing
that changes between them is the record cap. If you only need a slice, the cap and any partition or filter inputs bound
the run precisely, so a targeted pull costs cents rather than the price of the whole set, and a broad pull is simply a
higher cap left to run. Nothing about the delivery is subscription-gated: each run stands alone, priced at exactly the
records it returns, so you can dial spend up or down run by run as your needs change, and a scheduled cadence keeps a
downstream table current without any standing commitment. When the source publishes a correction or a new period, the
next run picks it up and upserts it over the stale row on the same key, so the table you maintain stays both complete
and current with no manual reconciliation.

### Provenance and compliance

Every run reads the door host's `robots.txt` at runtime and records the result (URL, status, byte length and, where
a policy is served, its SHA-256) in the run's `RUN_RECEIPT`. Where the host serves no applicable policy - a 404, a
403, or a homepage redirect - the gate records that as a flag and proceeds on the licence, which grants re-use; a flag
is never treated as permission in itself. The endpoint is keyless and the Actor reads only the public data door -
never a mirror, and it never bypasses a block.

### Data quality and freshness

Numbers arrive as real numbers, booleans as real booleans, and every other value as a string or null, so the dataset
loads without a cleaning pass. Each record is keyed on a stable composite of the source's own identifiers, so it is
safe to diff, deduplicate or upsert. Every run re-reads the live door, so the data is as fresh as the source
publishes, and each record's `observed_at` stamp dates the snapshot. The receipt records how many rows were delivered
and charged and confirms `charge_equals_delivered`.

### Billing, delivery and joins

Pricing is per record: you are billed only for records the Actor actually delivers, and the charge is raised after
each record is pushed (push-then-charge), so a failed or empty run costs nothing. The **Maximum records** cap bounds
every run, so spend is known before you start - sample cheaply, then raise it. Every record is a flat, typed object
keyed on a stable id, so it loads without a cleaning pass, diffs cleanly between runs, and upserts into a table you
keep over time; re-running keeps that table current without re-paying for rows you already hold, and each receipt
reconciles delivered against charged. Because the source's own identifiers are preserved verbatim, the dataset joins
onto other sources keyed on the same identifier.

### Who buys this, and how they use it

This cell is bought by teams that need the source's published set as a typed, keyed table they can hold and refresh
rather than a page they scrape: market- and macro-intelligence teams sizing and tracking a market, data engineers
wiring a clean upstream feed into a warehouse, and compliance and research teams building on a stable identifier. The
grain and the key are chosen so the output is a building block, not a one-off export - you run it on a schedule, keep
the delta, and join it to your other sources on the identifiers it preserves verbatim. The spend on any run is the
per-record price times the records delivered, matched exactly to what you receive.

# Actor input Schema

## `maxRecords` (type: `integer`):

Maximum records delivered and billed. You are billed only for records actually delivered. Raise it to pull the full set.

## Actor input object example

```json
{
  "maxRecords": 500
}
```

# Actor output Schema

## `results` (type: `string`):

The delivered UK four-decimal GDP observation.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxRecords": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgensignal/uk-gdp-four-decimal-time-series").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxRecords": 500 }

# Run the Actor and wait for it to finish
run = client.actor("nexgensignal/uk-gdp-four-decimal-time-series").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxRecords": 500
}' |
apify call nexgensignal/uk-gdp-four-decimal-time-series --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nexgensignal/uk-gdp-four-decimal-time-series"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Qe2x0lGgF3C4Up2pW/builds/Xf0FaiNcRNdz3uVs3/openapi.json
