# Luxembourg STATEC Statistics Scraper (`parseforge/luxembourg-statec-scraper`) Actor

Scrape official Luxembourg statistics from STATEC's public SDMX API (lustat.statec.lu): population, employment, prices, national accounts and 900+ other tables. One flat row per observation with period, value, unit and dimension labels. CSV, JSON, Excel or XML.

- **URL**: https://apify.com/parseforge/luxembourg-statec-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Business, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.52 / 1,000 results

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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### Luxembourg STATEC Statistics Scraper

**Scrape official Luxembourg statistics from STATEC's public SDMX API, from any dataflow, up to a million observations per run.** Every observation comes with its period, value, and dimension attributes. No login or API key. Export to CSV, JSON, Excel, or XML.

STATEC publishes Luxembourg's official statistics through a public SDMX API, but querying it by hand means learning SDMX syntax and juggling XML responses. This Actor reads any dataflow from lustat.statec.lu, filters by series key and period, and returns each observation as one flat row. It works for population, employment, prices, national accounts, weather, and every other dataset STATEC exposes.

| Who uses it | What they scrape Luxembourg STATEC for |
|---|---|
| Economists and analysts | Pull long time series for Luxembourg macro indicators into a spreadsheet |
| Journalists and researchers | Get official figures on population, prices, or employment for a story |
| Data engineers | Feed Luxembourg official statistics into a data warehouse or dashboard |
| Students and academics | Download clean datasets for coursework or papers on Luxembourg |

### What it does

This Actor collects observations from a STATEC dataflow and returns each one as a flat row with its period, value, and dimension attributes.

- 📊 **Any dataflow:** pass a STATEC dataflow ID like DF\_B1100, or paste the lustat.statec.lu table URL, and get every observation in it.
- 🔎 **Series filtering:** narrow the series with a positional dot-separated SDMX key, or leave empty for all series.
- 📅 **Period range:** set startPeriod and endPeriod to fetch only the years, quarters, or months you need.
- 🌐 **English or French labels:** pick the language STATEC publishes the dimension labels in.
- 📦 **Flat output:** each observation becomes one row with the table name, series label, period, value, unit, observation status, and one column per dimension, newest period first.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Luxembourg STATEC data

**📈 Track Luxembourg economic indicators.**

An analyst pulls the consumer price index dataflow with a start period of 2015 and exports the CSV to chart inflation trends.

**🗺️ Compare regional statistics.**

A researcher fetches population by canton from the geographical situation dataflow and joins it with shapefiles for a map.

**📰 Fact-check with official figures.**

A journalist retrieves the latest employment dataflow and uses the JSON output to verify a claim about the labour market.

**🏗️ Build a statistics pipeline.**

A data engineer schedules the Actor to fetch the national accounts dataflow every quarter and load it into a warehouse.

### Why choose this scraper

|  | What you get |
|---|---|
| **Official source** | Data comes directly from STATEC's public SDMX API, the same source behind lustat.statec.lu |
| **No SDMX knowledge needed** | You only need a dataflow ID; the Actor handles the SDMX query and response parsing |
| **Large exports** | Paid users can collect up to 1,000,000 observations in a single run |
| **Structured output** | Every observation is a flat row with period, value, and dimensions, ready for analysis |

### How it compares

No other Store actor targets Luxembourg STATEC the same way, so the honest comparison is with the alternatives teams actually weigh.

| | Luxembourg STATEC Statistics Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When Luxembourg STATEC changes | Maintained for you | You fix it | You re-learn the page |
| Retries and error handling | Built in (the STATEC API is open, no proxy needed) | Your problem | Manual |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor with a STATEC dataflow ID, optionally narrow to one series key, and limit the period range. Filters are applied by the STATEC API before results are returned. The Input tab lists every parameter.

A first run with the defaults (total population by sex, most recent years first):

```json
{
  "dataflow": "DF_B1100",
  "maxItems": 10
}
```

A larger pull, monthly employment and unemployment since 2015:

```json
{
  "dataflow": "DF_B3010",
  "startPeriod": "2015-01",
  "maxItems": 5000
}
```

Population by canton and municipality, with French labels:

```json
{
  "dataflow": "DF_X021",
  "language": "fr",
  "maxItems": 10000
}
```

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Luxembourg STATEC Statistics Scraper](https://apify.com/parseforge/luxembourg-statec-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Luxembourg STATEC through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/luxembourg-statec-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Verify the dataflow ID against the list at https://lustat.statec.lu/rest/dataflow/LU1/all. If you set a series key, make sure the dimension codes are correct and in the order the run log prints. Also check that your startPeriod and endPeriod overlap with the data's actual range.

**Why does the run stop at 10 observations?**

Free Apify accounts are limited to 10 observations per run as a preview. Upgrade to a paid plan to collect up to 1,000,000 observations.

**The series key I used returns an error.**

Series keys are positional: one dot-separated slot per dimension, an empty slot meaning any value. For DF\_B1100 the order is SPECIFICATION.FREQ, so '.A' keeps every specification at annual frequency. The run log prints the key order of the dataflow you asked for.

**The output has columns I did not expect.**

Every dataflow has its own dimensions (SPECIFICATION, SEX, AGE, CANTON, and so on) and each becomes a column, next to the fixed ones: dataflow, dataflowName, seriesLabel, region, category, frequency, period, value, unit, obsStatus. You can select only the columns you need when exporting from the Apify dataset.

**Can I get data for a single month?**

Yes. Set startPeriod and endPeriod to the same value, for example '2024-01', to fetch only that month.

### FAQ

| Question | Answer |
|---|---|
| What is a STATEC dataflow? | A dataflow is a table identifier in STATEC's SDMX API, such as DF\_B1100 for total population by sex or DF\_B3010 for monthly employment and unemployment. You can browse all 900+ dataflows at https://lustat.statec.lu/rest/dataflow/LU1/all. |
| How do I find the dataflow ID for the dataset I want? | Open the STATEC dataflow list at https://lustat.statec.lu/rest/dataflow/LU1/all and search for the dataset name. The ID is the value in the 'id' attribute of each dataflow. You can also paste the table URL from lustat.statec.lu; the Actor reads the df\[id] parameter. |
| What does the series key input do? | It filters the dataflow with a positional SDMX key, one dot-separated slot per dimension, for example '.A' on DF\_B1100 for annual data. Leave it empty or set it to 'all' to fetch every series in the dataflow. |
| Can I limit the time period? | Yes. Use startPeriod and endPeriod with ISO-8601 values like 2020 or 2024-Q1. Both are optional; if omitted, the full available period is returned. |
| How many observations can I get? | Free users are limited to 10 observations per run as a preview. Paid users can collect up to 1,000,000 observations. |
| What output formats are supported? | The Actor returns data in the Apify dataset, which you can export to CSV, JSON, Excel, or XML from the Apify console or API. |
| Do I need an API key for STATEC? | No. The Actor uses STATEC's public SDMX endpoint, which does not require authentication. |
| Is this the same data as on lustat.statec.lu? | Yes. The Actor queries the same SDMX API that powers the lustat.statec.lu portal, so the values are identical. |
| Can I schedule this Actor to run regularly? | Yes. You can set up a schedule in Apify to run the Actor daily, weekly, or monthly and automatically update your dataset. |
| What if my dataflow returns no observations? | Check that the dataflow ID is correct and that your series key and period filters match the data. You can also try removing the series key to fetch all series. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more official-statistics scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by STATEC (Institut national de la statistique et des études économiques du Grand-Duché de Luxembourg). It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `dataflow` (type: `string`):

STATEC dataflow ID, for example DF\_B1100 (population by sex), DF\_B3010 (employment and unemployment per month), DF\_X021 (population by canton and municipality) or DSD\_PRIX\_CONSO@DF\_E5100 (national consumer price index). Browse all 900+ IDs at https://lustat.statec.lu/rest/dataflow/LU1/all or paste the lustat.statec.lu table URL.

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

Free users are limited to 10 observations (preview). Paid users optional, up to 1,000,000. The most recent periods come first.

## `key` (type: `string`):

Optional positional SDMX key: one dot-separated slot per dimension, in the order the run log prints (for DF\_B1100 that is SPECIFICATION.FREQ, so ".A" keeps every specification at annual frequency). Empty slot means any value. Leave empty or use "all" for every series.

## `startPeriod` (type: `string`):

Earliest period to return, in the dataflow's own format: 2020, 2024-01 or 2024-Q1. Leave empty for the full history.

## `endPeriod` (type: `string`):

Latest period to return, same format as Start period. Leave empty for the most recent data.

## `language` (type: `string`):

Language of the dimension labels (STATEC publishes English and French).

## Actor input object example

```json
{
  "dataflow": "DF_B1100",
  "maxItems": 10,
  "language": "en"
}
```

# 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 = {
    "dataflow": "DF_B1100",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/luxembourg-statec-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 = {
    "dataflow": "DF_B1100",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/luxembourg-statec-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 '{
  "dataflow": "DF_B1100",
  "maxItems": 10
}' |
apify call parseforge/luxembourg-statec-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/luxembourg-statec-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/5HYc7ziDBQMcfXZq9/builds/B33WJo1Rw2thnn14j/openapi.json
