# INE Portugal Statistics Scraper (`parseforge/ine-portugal-scraper`) Actor

Scrape official Portuguese statistics from INE (Instituto Nacional de Estatística) via the json\_indicador endpoint. Fetch indicator metadata or full data series by varcd. No API key required.

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

## Pricing

from $27.75 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Banner](https://github.com/ParseForge/apify-assets/blob/main/banners/banner-default.jpg?raw=true)

## 📊 INE Portugal Statistics Scraper

> 🚀 **Export the official Portuguese statistical catalogue in seconds.** Pull **thousands of INE Portugal indicators** with values, dimension labels, and metadata across crime, population, GDP, inflation, employment, and demographics. Bilingual labels (English + Portuguese), no sign-up needed.

> 🕒 **Last updated:** 2026-05-15 · **📊 18 fields** per record · **📦 Thousands of indicators** · **🇵🇹 National + NUTS II + municipal coverage**

The **INE Portugal Statistics Scraper** taps the official Instituto Nacional de Estatística (Portugal) catalogue and returns clean, structured records covering every published indicator. Pull observation values for any indicator (varcd), full indicator metadata with dimension descriptions and units, and batch-fetch up to 100 indicators in a single run.

The catalogue spans **thousands of indicators** including crime rate (varcd 0008074), resident population (0008250), GDP, inflation, unemployment, household income, education enrolment, energy consumption, and tourism arrivals. Coverage runs from the national level down to NUTS II regions and individual municipalities. Labels are available in English and Portuguese. This Actor turns indicator data, batch lookups, and full metadata into downloadable CSV, Excel, JSON, or XML in minutes.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Economists, journalists, banking & insurance teams, policy analysts, researchers, BI engineers, civic-tech developers | Inflation tracking, demographic dashboards, crime analytics, regional research, ML feature engineering, Power BI / Tableau feeds, newsroom charts |

---

### 📋 What the INE Portugal Scraper does

Two core workflows in a single Actor:

- 📈 **Data mode.** Pull every observation for an indicator across periods, geographies, and analytic dimensions. Values come with raw and cleaned numeric fields plus dimension code + label pairs.
- 🧾 **Metadata mode.** Get the full description of an indicator: name, dimensions, units, latest available period, last-updated timestamp, and the official metadata page URL.
- 📚 **Batch lookup.** Pass an array of up to 100 indicator codes (varcd) to data or metadata mode and pull them all in a single run.

Every record carries the official INE Portugal metadata page deep link, so you can verify any number against the source page in one click.

> 💡 **Why it matters:** Portuguese official statistics underpin lending decisions, public-policy research, regional economic strategy, and academic work. Building your own pipeline against the official catalogue means handling Portuguese-specific JSON quirks, dimension decoding, and bilingual labels 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

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td><code>mode</code></td><td>enum</td><td><code>"data"</code></td><td>One of <code>data</code>, <code>metadata</code>.</td></tr>
<tr><td><code>indicatorCode</code></td><td>string</td><td><code>"0008074"</code></td><td>INE Portugal indicator code (varcd), padded to 7 digits. Default = crime rate.</td></tr>
<tr><td><code>indicatorCodes</code></td><td>array</td><td><code>[]</code></td><td>Batch lookup. Up to 100 indicator codes per run. Takes precedence over <code>indicatorCode</code>.</td></tr>
<tr><td><code>language</code></td><td>enum</td><td><code>"EN"</code></td><td>Response language for labels. <code>EN</code> or <code>PT</code>.</td></tr>
<tr><td><code>dim1</code>, <code>dim2</code>, <code>dim3</code></td><td>string</td><td><code>""</code></td><td>Optional dimension filters (period, geography, analytic). Leave empty for all values.</td></tr>
<tr><td><code>maxItems</code></td><td>integer</td><td><code>10</code></td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
</tbody>
</table>

**Example: data for crime rate per 1,000 inhabitants (varcd 0008074), English labels.**

```json
{
    "mode": "data",
    "indicatorCode": "0008074",
    "language": "EN",
    "maxItems": 50
}
````

**Example: batch metadata for crime rate, resident population, and GDP per capita.**

```json
{
    "mode": "metadata",
    "indicatorCodes": ["0008074", "0008250", "0009098"],
    "language": "EN"
}
```

> ⚠️ **Good to Know:** INE Portugal indicator codes are 7-digit zero-padded strings (e.g. `0008074`, `0008250`). You can find codes by browsing the official INE Portugal portal at https://www.ine.pt/. Use `metadata` mode first to confirm an indicator's dimensions before pulling large data sets.

***

### 📊 Output

Each record contains up to **18 fields** depending on mode. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🆔 `indicatorCode` | string | `"0008074"` |
| 🏷️ `indicatorName` | string | `"Crime rate (No./1000 inhabitants) by Geographic localization (NUTS - 2013); Annual"` |
| 🧹 `cleanIndicatorName` | string | `"Crime rate (No./1000 inhabitants)"` |
| 🔗 `url` | string | `"https://www.ine.pt/bddXplorer/htdocs/minfo.jsp?var_cd=0008074&lingua=EN"` |
| 📅 `period` | string | `"2024"` |
| 💰 `value` | number | `30.5` |
| 📝 `valueRaw` | string | `"30.5"` |
| 🗺️ `geoCode` | string | `"PT"` |
| 🗺️ `geoLabel` | string | `"Portugal"` |
| 🏷️ `dim1Code` | string | `"T"` |
| 🏷️ `dim1Label` | string | `"Total"` |
| 🏷️ `dim2Code` | string | `""` |
| 🏷️ `dim2Label` | string | `""` |
| 🌐 `language` | string | `"EN"` |
| 📚 `datasource` | string | `"INE Portugal"` |
| 🕒 `lastUpdated` | string | `"2025-04-12"` |
| 🔢 `seriesCode` | string | `"0008074"` |
| 📐 `dimensions` | array | `[{ "abrv": "Loc", "name": "Geographic localization" }, ...]` |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-15T10:00:00.000Z"` |

#### 📦 Sample record (data mode)

<details>
<summary><strong>📊 Crime rate per 1,000 inhabitants (varcd 0008074, Portugal, 2024)</strong></summary>

```json
{
    "indicatorCode": "0008074",
    "indicatorName": "Crime rate (No./1000 inhabitants) by Geographic localization (NUTS - 2013); Annual",
    "cleanIndicatorName": "Crime rate (No./1000 inhabitants)",
    "period": "2024",
    "value": 30.5,
    "valueRaw": "30.5",
    "geoCode": "PT",
    "geoLabel": "Portugal",
    "datasource": "INE Portugal",
    "lastUpdated": "2025-04-12",
    "seriesCode": "0008074",
    "url": "https://www.ine.pt/bddXplorer/htdocs/minfo.jsp?var_cd=0008074&lingua=EN",
    "scrapedAt": "2026-05-15T10:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🧾 Metadata mode: full indicator schema</strong></summary>

```json
{
    "indicatorCode": "0008074",
    "indicatorName": "Crime rate (No./1000 inhabitants) by Geographic localization (NUTS - 2013); Annual",
    "cleanIndicatorName": "Crime rate (No./1000 inhabitants)",
    "metaInfoUrl": "https://www.ine.pt/bddXplorer/htdocs/minfo.jsp?var_cd=0008074&lingua=EN",
    "lastUpdated": "2025-04-12",
    "latestPeriod": "2024",
    "extractionDate": "2026-05-15",
    "language": "EN",
    "dimensions": [
        { "abrv": "Loc", "name": "Geographic localization (NUTS - 2013)" }
    ],
    "url": "https://www.ine.pt/bddXplorer/htdocs/minfo.jsp?var_cd=0008074&lingua=EN",
    "scrapedAt": "2026-05-15T10:00:00.000Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🇵🇹 | **Thousands of indicators.** Crime, population, GDP, inflation, employment, education, energy, tourism, and more. |
| 🌐 | **Bilingual labels.** Indicator names, dimensions, and geography labels in English or Portuguese. |
| 📚 | **Batch mode.** Up to 100 indicators in a single run. |
| 📈 | **Data + metadata.** Pull values, or pull the full schema first to understand dimensions and units. |
| 🔁 | **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 INE Portugal metadata deep link. |

> 📊 INE Portugal is the canonical source for Portuguese inflation, GDP, employment, and demographic data. This Actor makes it queryable in seconds.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ INE Portugal Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **Thousands of indicators** | **Live per run** | data, metadata, batch | ⚡ 2 min |
| Manual indicator downloads | Free | Per-indicator only | Manual | None | 🐢 Hours per indicator |
| Macro-data terminals | $24,000+/year | Curated subset | Live | Many | ⏳ Days |
| Build your own pipeline | Engineering hours | What you build | What you build | What you build | 🕒 Weeks |

Pick this Actor when you want broad Portuguese coverage, bilingual labels, and no parser maintenance.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the INE Portugal Statistics Scraper page on the Apify Store.
3. 🎯 **Set input.** Enter an indicator code (or batch list), pick a language, 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

<table>
<tr>
<td width="50%" valign="top">

#### 🏦 Banking, fintech, and insurance

- Live macroeconomic feeds for retail-rate dashboards in Portugal
- Mortgage and insurance underwriting fed by employment and income data
- Macro-forecasting models with quarterly GDP indicators
- Risk dashboards aligned with INE Portugal official numbers

</td>
<td width="50%" valign="top">

#### 🏘️ PropTech and real estate

- Municipal population and household projections for site selection
- Regional wage and employment data for valuation models
- Construction output and house-price indicators
- Demographic shifts feeding tenant-targeting

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 📊 Market research and consulting

- Industry, productivity, and earnings benchmarks
- Retail trade, services turnover, and tourism arrivals
- Consumer trends from household-spending indicators
- Sector deliverables backed by official Portuguese numbers

</td>
<td width="50%" valign="top">

#### 📰 Journalism and policy

- Live charts of inflation, jobs, and GDP for newsrooms
- Regional explainers backed by NUTS II data
- Public-policy briefs with cited, versioned numbers
- Investigative reporting on crime, housing, and demographics

</td>
</tr>
</table>

***

### 🔌 Automating INE Portugal 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](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Daily or monthly refreshes for high-frequency indicators (crime, inflation, employment) 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.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Macroeconomic theses with cited, versioned data pulls
- Public-health and demographic research at the regional level
- Reproducible studies with stable indicator codes (varcd)
- Open-data exercises in econometrics and stats courses

</td>
<td width="50%">

#### 🎨 Personal and creative

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

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

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

</td>
<td width="50%">

#### 🧪 Experimentation

- Train forecasting and anomaly-detection ML models
- Validate macro hypotheses with real time-series
- Prototype agent pipelines that resolve indicator codes
- Test BI dashboard concepts with live Portuguese data

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

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

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20INE%20Portugal%20Statistics%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20INE%20Portugal%20Statistics%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20INE%20Portugal%20Statistics%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20INE%20Portugal%20Statistics%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

Pick a mode (data or metadata), enter the 7-digit indicator code, and click Start. The Actor pulls clean structured records straight from the official INE Portugal catalogue. No browser automation, no captchas, no setup.

#### 📏 How accurate is the data?

Every value comes directly from the official INE Portugal catalogue, the canonical source for Portuguese 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 INE Portugal releases new indicators and revises existing ones. Every run of this Actor returns the live state of the catalogue.

#### 🌐 Are labels available in Portuguese?

Yes. Set `language` to `PT` to receive indicator names, dimensions, and geography labels in Portuguese. The default is English (`EN`).

#### ⏰ 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 INE Portugal releases.

#### ⚖️ Is this data legal to use?

INE Portugal publishes its data under terms that permit free reuse with attribution to INE. Review the licence terms for your specific use case.

#### 💼 Can I use this data commercially?

Yes. The underlying INE Portugal 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.

#### 🔢 How do I find indicator codes (varcd)?

Browse the official INE Portugal portal at https://www.ine.pt/ to find any indicator's 7-digit code. Common examples: `0008074` = crime rate, `0008250` = resident population, `0009098` = GDP per capita.

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

INE Portugal Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe INE records into your warehouse
- [**n8n**](https://n8n.io) - Self-hosted workflow automation
- [**Pipedream**](https://pipedream.com) - Event-driven serverless workflows
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh inflation or employment numbers into your product backend, or alert your team in Slack the minute a new release lands.

***

### 🔗 Recommended Actors

- [**📊 INE Spain Scraper**](https://apify.com/parseforge/ine-spain-scraper) - Spanish National Statistics Institute
- [**📊 ONS UK Statistics Scraper**](https://apify.com/parseforge/ons-uk-scraper) - UK Office for National Statistics datasets
- [**📊 Statistics Canada Scraper**](https://apify.com/parseforge/statistics-canada-scraper) - Canadian official statistics catalogue
- [**📊 IBGE Brazil Scraper**](https://apify.com/parseforge/ibge-brazil-scraper) - Brazilian Institute of Geography and Statistics
- [**📈 Indexmundi Scraper**](https://apify.com/parseforge/indexmundi-scraper) - Global demographic and economic indicators

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) 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 Instituto Nacional de Estatística or the Government of Portugal. All trademarks mentioned are the property of their respective owners. Only publicly available open data is collected.

# Actor input Schema

## `indicatorCode` (type: `string`):

INE indicator code, padded to 7 digits (e.g. 0008074 for crime rate, 0008250 for population). Find codes on the INE Portugal portal.

## `indicatorCodes` (type: `array`):

Array of INE indicator codes (varcd) to fetch in one run (data, metadata modes). Takes precedence over single indicatorCode. Max 100 per call.

## `mode` (type: `string`):

data = actual values; metadata = description of dimensions and units; catalogue = list every available indicator code with its name and theme.

## `theme` (type: `string`):

Optional INE theme code (temaCod) to limit the catalogue listing. Leave empty for every indicator.

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

Response language for labels.

## `dim1` (type: `string`):

Optional value for dimension 1 (e.g. period code, geographic code). Leave empty for all.

## `dim2` (type: `string`):

Optional value for dimension 2. Leave empty for all.

## `dim3` (type: `string`):

Optional value for dimension 3. Leave empty for all.

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## Actor input object example

```json
{
  "indicatorCode": "0008074",
  "indicatorCodes": [],
  "mode": "data",
  "language": "EN",
  "maxItems": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

Overview of scraped data

## `fullData` (type: `string`):

Complete dataset

# 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 = {
    "indicatorCode": "0008074",
    "mode": "data",
    "language": "EN",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/ine-portugal-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 = {
    "indicatorCode": "0008074",
    "mode": "data",
    "language": "EN",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/ine-portugal-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "indicatorCode": "0008074",
  "mode": "data",
  "language": "EN",
  "maxItems": 10
}' |
apify call parseforge/ine-portugal-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/ine-portugal-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "INE Portugal Statistics Scraper",
        "description": "Scrape official Portuguese statistics from INE (Instituto Nacional de Estatística) via the json_indicador endpoint. Fetch indicator metadata or full data series by varcd. No API key required.",
        "version": "0.0",
        "x-build-id": "zczeu0XoaeNDxkj2X"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~ine-portugal-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-ine-portugal-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~ine-portugal-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-ine-portugal-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~ine-portugal-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-ine-portugal-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "indicatorCode": {
                        "title": "Indicator Code (varcd)",
                        "type": "string",
                        "description": "INE indicator code, padded to 7 digits (e.g. 0008074 for crime rate, 0008250 for population). Find codes on the INE Portugal portal.",
                        "default": "0008074"
                    },
                    "indicatorCodes": {
                        "title": "Indicator Codes (batch lookup)",
                        "type": "array",
                        "description": "Array of INE indicator codes (varcd) to fetch in one run (data, metadata modes). Takes precedence over single indicatorCode. Max 100 per call.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "mode": {
                        "title": "Mode",
                        "enum": [
                            "data",
                            "metadata",
                            "catalogue"
                        ],
                        "type": "string",
                        "description": "data = actual values; metadata = description of dimensions and units; catalogue = list every available indicator code with its name and theme.",
                        "default": "data"
                    },
                    "theme": {
                        "title": "Theme Code (catalogue mode only)",
                        "type": "string",
                        "description": "Optional INE theme code (temaCod) to limit the catalogue listing. Leave empty for every indicator."
                    },
                    "language": {
                        "title": "Language",
                        "enum": [
                            "EN",
                            "PT"
                        ],
                        "type": "string",
                        "description": "Response language for labels.",
                        "default": "EN"
                    },
                    "dim1": {
                        "title": "Dim1 filter",
                        "type": "string",
                        "description": "Optional value for dimension 1 (e.g. period code, geographic code). Leave empty for all."
                    },
                    "dim2": {
                        "title": "Dim2 filter",
                        "type": "string",
                        "description": "Optional value for dimension 2. Leave empty for all."
                    },
                    "dim3": {
                        "title": "Dim3 filter",
                        "type": "string",
                        "description": "Optional value for dimension 3. Leave empty for all."
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
