# EU External Trade Statistics — Eurostat (`jungle_synthesizer/eurostat-eu-external-trade-statistics-scraper`) Actor

Pulls EU external trade statistics from Eurostat: intra- and extra-EU trade by member state, partner, product classification, flow, and period. Returns export/import values and trade balances with every dimension code resolved to its label, across the whole external-trade dataset family.

- **URL**: https://apify.com/jungle\_synthesizer/eurostat-eu-external-trade-statistics-scraper.md
- **Developed by:** [BowTiedRaccoon](https://apify.com/jungle_synthesizer) (community)
- **Categories:** Business, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 record scrapeds

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## EU External Trade Statistics — Eurostat Trade Data Scraper

Pulls external trade data straight from [Eurostat](https://ec.europa.eu/eurostat), the EU's official statistics agency. Returns intra- and extra-EU trade values by member state, partner country, product classification, and trade flow — across the entire external-trade dataset family, from annual figures down to monthly, going back to 2002.

***

### EU External Trade Statistics Scraper Features

- Walks the whole Eurostat external-trade dataset family — long-term and short-term indicators alike, discovered live from the catalogue, not a hand-picked subset.
- Resolves every dimension code to its human label. Eurostat ships raw index numbers; you get country names, product descriptions, and indicator labels.
- Covers member states, trading partners, and SITC/CN/BEC product classifications in one flat schema.
- Carries Eurostat's own provisional/estimated status flag, which matters if you're using the figures for anything time-sensitive.
- Returns whichever frequency the source dataset publishes — annual, quarterly, or monthly — without you needing to know which in advance.
- Narrow to specific dataset codes when you only need one series, or leave it open for full-family coverage.

***

### Who Uses EU Trade Data?

- **Trade analysts & economists** — Track EU import/export trends by product group and partner country over time.
- **Supply chain researchers** — Quantify exposure to intra-EU sourcing versus extra-EU imports by product.
- **Policy & compliance teams** — Watch trade balance shifts ahead of tariff or regulatory decisions.
- **Data journalists** — Build trade-flow stories off sourced, structured Eurostat figures instead of a screenshot of a chart.
- **App & dashboard builders** — Feed EU trade statistics into BI tools without writing a JSON-stat decoder first.

***

### How EU External Trade Statistics Scraper Works

1. Reads Eurostat's live dataset catalogue and finds every dataset in the external-trade family.
2. Requests each dataset's most recent period, then walks backward through its history — by year, quarter, or month, whichever that dataset uses.
3. Flattens each period's response into one row per (member state, partner, product, indicator) combination, with codes resolved to labels.
4. Stops once the requested number of records is reached, or a dataset's history runs out.

***

### Input

```json
{
  "maxItems": 1000,
  "datasetCodes": ["ext_lt_intratrd"]
}
```

| Field          | Type    | Default    | Description |
|----------------|---------|------------|-------------------------------------------------------------------------------------------------------------------------------------------|
| `maxItems`     | integer | 10         | Maximum number of observation rows to save. Raise it for full-history pulls. |
| `datasetCodes` | array   | `[]` (all) | Limit the crawl to specific Eurostat `ext_*` dataset codes (e.g. `ext_lt_intratrd`, `ext_st_eu27_2020sitc`). Leave empty for the whole family. |

**Example — full external-trade family, default sample size:**

```json
{}
```

**Example — one dataset, deep history:**

```json
{
  "maxItems": 50000,
  "datasetCodes": ["ext_lt_intratrd"]
}
```

***

### EU External Trade Statistics Scraper Output Fields

```json
{
  "dataset_code": "ext_lt_intratrd",
  "dataset_label": "Intra and Extra-EU trade by Member State and by product group",
  "geo": "EU27_2020",
  "geo_label": "European Union - 27 countries (from 2020)",
  "partner": "EU27_2020",
  "partner_label": "European Union - 27 countries (from 2020)",
  "product_code": "TOTAL",
  "product_label": "Total - all products",
  "indicator": "PC_TOT_IMP",
  "indicator_label": "Share of imports by partner in total imports (%)",
  "freq": "A",
  "time_period": "2025",
  "value": 61.6,
  "unit": null,
  "status_flag": null,
  "last_updated": "2026-09-15T11:00:00+0200",
  "source": "ESTAT"
}
```

| Field             | Type   | Description                                                                                  |
|-------------------|--------|----------------------------------------------------------------------------------------------|
| `dataset_code`    | string | Eurostat dataset code (e.g. `ext_lt_intratrd`)                                               |
| `dataset_label`   | string | Human-readable dataset title                                                                 |
| `geo`             | string | Reporting member state code                                                                  |
| `geo_label`       | string | Reporting member state name                                                                  |
| `partner`         | string | Partner country/aggregate code (e.g. `EU27_2020`, `WORLD`, `CN`, `US`)                       |
| `partner_label`   | string | Partner country/aggregate name                                                               |
| `product_code`    | string | Product classification code (SITC/CN/BEC, dataset-dependent)                                 |
| `product_label`   | string | Product classification label                                                                 |
| `indicator`       | string | Trade indicator code (export/import value, trade balance, flow, etc.)                        |
| `indicator_label` | string | Trade indicator label                                                                        |
| `freq`            | string | Frequency of the observation — `A` annual, `Q` quarterly, `M` monthly                        |
| `time_period`     | string | Observation period (e.g. `2023`, `2023-Q4`, `2023-01`)                                       |
| `value`           | number | The observed value                                                                           |
| `unit`            | string | Unit of measure where the dataset carries one (e.g. `MIO_EUR`, `THS_T`)                      |
| `status_flag`     | string | Eurostat status flag — `p` provisional, `e` estimated, `:` not available                     |
| `last_updated`    | string | Dataset last-updated timestamp, from Eurostat (shared across the whole dataset, not per-row) |
| `source`          | string | Data source attribution (`ESTAT`)                                                            |

***

### FAQ

#### What counts as "external trade" here?

Eurostat's `ext_*` dataset family: intra-EU trade (between member states) and extra-EU trade (with the rest of the world), broken down by partner country, product classification, and trade flow.

#### Which datasets does this cover?

Every dataset in Eurostat's live catalogue whose code starts with `ext_` — long-term indicators, short-term indicators, and the technology-intensity breakdowns alongside them. The list comes from the catalogue on every run, so a dataset Eurostat adds tomorrow shows up without an actor update.

#### How far back does the data go?

As far back as each dataset's own history — most start in 2002. A run walks backward from the most recent period until either that history runs out or the requested record count is reached.

#### What does `status_flag` mean?

Eurostat's own data-quality marker: `p` for provisional, `e` for estimated, `:` for not available. A blank value means the figure is finalized.

#### Do I need a Eurostat account or API key?

No. External trade statistics are published as open data.

***

### Need More Features?

Need a dataset outside the external-trade family, or a different cut of the data? [File an issue](https://console.apify.com/actors/issues) or get in touch.

### Why Use EU External Trade Statistics Scraper?

- **Full family, not one dataset** — walks every `ext_*` dataset Eurostat publishes, discovered live, instead of wrapping a single series.
- **Labels, not index numbers** — Eurostat's raw JSON-stat format hands you a sparse array keyed by position; this actor resolves every dimension to its actual code and label.
- **No API key, no account** — Eurostat's external-trade statistics are open data.

# Actor input Schema

## `sp_intended_usage` (type: `string`):

What will this data feed? E.g. lead lists, KYB checks, price tracking.

## `sp_improvement_suggestions` (type: `string`):

Provide any feedback or suggestions for improvements.

## `sp_contact` (type: `string`):

We'll personally help with your use case. No spam.

## `maxItems` (type: `integer`):

Maximum number of observation rows to save.

## `datasetCodes` (type: `array`):

Limit the crawl to specific Eurostat ext\_\* external-trade dataset codes (e.g. "ext\_lt\_intratrd", "ext\_st\_eu27\_2020sitc"). Codes are validated live against Eurostat's catalogue on every run. Leave empty to walk the entire external-trade dataset family.

## Actor input object example

```json
{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "maxItems": 10,
  "datasetCodes": []
}
```

# Actor output Schema

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

No description

# 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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "maxItems": 10,
    "datasetCodes": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("jungle_synthesizer/eurostat-eu-external-trade-statistics-scraper").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 = {
    "sp_intended_usage": "Describe your intended use...",
    "sp_improvement_suggestions": "Share your suggestions here...",
    "sp_contact": "Share your email here...",
    "maxItems": 10,
    "datasetCodes": [],
}

# Run the Actor and wait for it to finish
run = client.actor("jungle_synthesizer/eurostat-eu-external-trade-statistics-scraper").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 '{
  "sp_intended_usage": "Describe your intended use...",
  "sp_improvement_suggestions": "Share your suggestions here...",
  "sp_contact": "Share your email here...",
  "maxItems": 10,
  "datasetCodes": []
}' |
apify call jungle_synthesizer/eurostat-eu-external-trade-statistics-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jungle_synthesizer/eurostat-eu-external-trade-statistics-scraper"
        }
    }
}
```

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/ub3j313XLYQcmZpc2/builds/t8v0SyoTrKJFdYxi5/openapi.json
