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

Scrapes INE Portugal statistics by indicator code, theme, or catalogue. Returns each record as a flat row with dimensions and values. No API key needed.

- **URL**: https://apify.com/parseforge/ine-portugal-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Business, Education, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 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/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

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

### INE Portugal Statistics Scraper

**Scrape INE Portugal Statistics data by indicator code, theme, or catalogue, up to a million records per run.** Every row comes with its dimensions, period, geography, and value. No login or API key. Export to CSV, JSON, Excel, or XML.

INE Portugal's official portal hides its data behind a slow web interface and no public API. This Actor reads the public statistics service directly, filtered by indicator code, theme, or dimension, and returns each match in one fixed schema. Get crime rates, population, GDP, unemployment, and thousands of other indicators in seconds.

| Who uses it | What they scrape INE Portugal Statistics for |
|---|---|
| Market researchers | Which Portuguese regions are growing fastest this quarter |
| Data journalists | Crime, unemployment, or population figures for a story |
| Economists | GDP, inflation, and labour market series for models |
| Public policy analysts | Demographic and housing indicators by municipality |
| Students and academics | Official statistics for theses and papers |

### What it does

This Actor collects INE Portugal statistics by indicator code, theme, or the full catalogue, and returns each record as a flat row with dimensions and values.

- 📊 **Data values:** fetch actual observations for any indicator code, with optional dimension filters.
- 🗂️ **Indicator metadata:** get the description, units, and dimension labels for one or many codes.
- 📚 **Indicator catalogue:** list every available INE indicator code with its name and theme, optionally filtered by theme.
- 🔢 **Batch lookup:** pass up to 100 indicator codes in one run and get data or metadata for all of them.
- 🌐 **Bilingual labels:** return dimension and indicator names in English or Portuguese.

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

### What you can do with INE Portugal Statistics data

**📈 Track regional economic trends.**

A market researcher pulls GDP and unemployment by NUTS region each quarter to compare growth across Portugal.

**📰 Fact-check a news story.**

A journalist fetches the latest crime rate for Lisbon and Porto to verify a claim about rising violence.

**🏠 Analyse housing affordability.**

A policy analyst scrapes housing price and income indicators by municipality to identify areas under pressure.

**🎓 Build a demographic dataset.**

A student downloads population by age and sex for all municipalities to use in a GIS project.

**🔍 Discover available indicators.**

A researcher runs the catalogue mode to list every INE indicator on health, then batch-fetches the relevant codes.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key** | The public INE service needs no registration or token |
| **Fixed schema** | Every record has the same columns, ready for analysis |
| **Batch and catalogue** | Fetch many indicators at once or discover new ones |
| **Dimension filters** | Narrow by period, geography, or any other dimension |
| **Bilingual** | Labels in English or Portuguese |

### How it compares

No other Store actor targets INE Portugal Statistics the same way, so the honest comparison is with the alternatives teams actually weigh.

| | INE Portugal Statistics Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When INE Portugal Statistics changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| 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 from indicator codes, themes, and dimension filters, alone or together, and filters run as each record is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

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

A larger pull:

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

### Pricing

Pay-per-result: **$0.037 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $3.70 |
| 1,000 results | $37.00 |
| 10,000 results | $370.00 |

New Apify accounts start with $5 in free credit.

### 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 [INE Portugal Statistics Scraper](https://apify.com/parseforge/ine-portugal-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 INE Portugal Statistics 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/ine-portugal-scraper"
```

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

### Troubleshooting

**Why am I getting no results?**

Check that your indicator code is correct and padded to 7 digits. Also verify your dimension filters: if you set dim1 to a value that does not exist for that indicator, no records will match.

**The Actor returns only 10 records.**

Free users are limited to 10 records as a preview. Upgrade to a paid plan and increase maxItems to get more.

**I get an error about an invalid indicator code.**

Make sure the code is exactly 7 digits. Use the catalogue mode to list valid codes, or check the INE portal.

**The labels are in the wrong language.**

Set the language field to EN for English or PT for Portuguese. The default is EN.

**I want to filter by a specific municipality but don't know the code.**

Run the metadata mode for your indicator to see the dimension values, including geographic codes. Then use those codes in dim1, dim2, or dim3.

### FAQ

| Question | Answer |
|---|---|
| What is an INE indicator code? | It is the 7-digit code (varcd) that INE uses to identify each statistical series. You can find codes on the INE portal or use the catalogue mode to list them. |
| Can I fetch more than one indicator at a time? | Yes. Use the indicatorCodes array to pass up to 100 codes in one run. The Actor will return data or metadata for all of them. |
| What does the catalogue mode return? | It returns every available indicator code with its name and theme. You can optionally filter by a theme code to narrow the list. |
| How do I filter by geography or period? | Use the dim1, dim2, and dim3 fields. For example, dim1 can be a period code and dim2 a geographic code. Leave them empty to get all values. |
| Can I get labels in Portuguese? | Yes. Set the language field to PT for Portuguese labels, or EN for English. |
| Is there a limit on how many records I can get? | Free users are limited to 10 records as a preview. Paid users can set maxItems up to 1,000,000. |
| Do I need an API key or login? | No. The Actor reads the public INE statistics service directly, so no registration or token is required. |
| What format is the output? | The Actor returns a flat dataset that you can export to CSV, JSON, Excel, or XML from the Apify platform. |
| How do I find the theme code for the catalogue? | Theme codes (temaCod) are available on the INE portal. You can also run the catalogue without a theme to see all indicators and their themes. |
| Can I schedule this Actor to run regularly? | Yes. Use Apify schedules to run it daily, weekly, or monthly and keep your dataset up to date. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more 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 Instituto Nacional de Estatística. 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

## `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(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 '{
  "indicatorCode": "0008074",
  "mode": "data",
  "language": "EN",
  "maxItems": 10
}' |
apify call parseforge/ine-portugal-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/ine-portugal-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/OjBxNalWlKBYkgtvm/builds/Lyby4Kasje1LUv6Bl/openapi.json
