ParseForge Scrapers

Iceland Hagstofa PxWeb Statistics Scraper

parseforge/iceland-hagstofa-px-scraper

EducationAutomationOther

Scrapes data from Statistics Iceland's PxWeb API. Provide a table path and optional query JSON to get flat rows of official Icelandic statistics.

Run this scraper See the API call
Total users
2
Monthly active
1
Total runs
42
Bookmarked
0
Rating
Not rated yet
Last modified
9 days ago

Overview

ParseForge

Iceland Hagstofa PxWeb Statistics Scraper

Scrape any Iceland Hagstofa PxWeb table into clean rows, up to a million per run. Get official Icelandic statistics with all dimensions and values, in English or Icelandic. No API key needed. Export to CSV, JSON, Excel, or XML.

Statistics Iceland publishes hundreds of official datasets through its PxWeb API, but querying it means building JSON selection objects by hand and paging through responses. This Actor reads any table path you give it, expands every dimension into flat rows, and returns the result in one fixed schema. You can also pass a raw PxWeb query for exact control.

Who uses it What they scrape Iceland Hagstofa PxWeb for
Market researchers Pull demographic or economic series for reports without writing API code.
Data journalists Get official Icelandic statistics into a spreadsheet for analysis.
Government analysts Monitor population, labour, or price indicators across municipalities.
Academic researchers Collect time series from Statistics Iceland for econometric models.

What it does

This Actor collects data from a specified Iceland Hagstofa PxWeb table and returns each data point as a flat row with all dimension values and the measure.

  • ๐Ÿ“Š Flat rows: every dimension value and the measure become columns in one row per data point.
  • ๐ŸŒ Bilingual output: request English or Icelandic labels for dimensions and values.
  • ๐Ÿ”Ž Full table or custom query: leave query empty to get all values, or pass a PxWeb selection JSON.
  • ๐Ÿ“ฆ Bulk export: collect up to 1,000,000 rows for paid users, 10 for free preview.

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

What you can do with Iceland Hagstofa PxWeb data

๐Ÿ“ˆ Track population changes.

A municipal planner pulls the latest population table for all municipalities and compares year-over-year growth to plan services.

๐Ÿ“Š Monitor labour market indicators.

An economist collects monthly unemployment by region and age group to feed a dashboard.

๐Ÿ  Analyse housing prices.

A real estate analyst scrapes the housing price index table to spot trends by region and dwelling type.

๐ŸŽ“ Gather education statistics.

A researcher downloads educational attainment by municipality and gender for a study on regional disparities.

Why choose this scraper

What you get
Official source Data comes directly from Statistics Iceland's public PxWeb API.
No API key The endpoint is open, so you only need the table path.
Flexible selection Use the built-in all-values request or your own PxWeb query JSON.
Clean output Each row is a flat record ready for CSV, JSON, Excel, or XML.

How it compares

No other Store actor targets Iceland Hagstofa PxWeb the same way, so the honest comparison is with the alternatives teams actually weigh.

Iceland Hagstofa PxWeb Statistics Scraper Build it in-house By hand
Setup Run it now, zero config Days of engineering None, but hours per pull
When Iceland Hagstofa PxWeb 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 with a table path under px.hagstofa.is/pxen/api/v1/en, optionally a PxWeb query JSON, and choose the response language. The maximum rows limit controls how many data points are returned. The Input tab lists every parameter.

A first run with the defaults:

{
  "tablePath": "Ibuar/mannfjoldi/1_yfirlit/yfirlit_mannfjolda/MAN00101.px",
  "maxItems": 10
}

A larger pull:

{
  "tablePath": "Ibuar/mannfjoldi/1_yfirlit/yfirlit_mannfjolda/MAN00101.px",
  "maxItems": 200
}

Pricing

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

Results collected Approximate cost
100 results $0.18
1,000 results $1.80
10,000 results $18.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 to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the Iceland Hagstofa PxWeb Statistics Scraper.
  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 (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

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

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/iceland-hagstofa-px-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 the table path is correct and includes the .px extension. Also verify that your query JSON, if provided, selects at least one value for each dimension. If the table is empty on the source, no rows will be returned.

Why do I get an error about invalid query JSON?

The query must be a JSON array of objects with "code" and "selection" fields. Validate your JSON with a linter and ensure it matches the PxWeb API format.

Why are labels in English even though I set language to Icelandic?

Some tables may not have Icelandic translations for all labels. The API returns whatever is available. Try a different table or check the source website.

Why did the run stop at 10 rows?

Free users are limited to 10 rows as a preview. Upgrade to a paid plan to collect more, up to 1,000,000 rows.

Why is the run slow for a large table?

The PxWeb API can be slow for tables with many dimensions. Use a query JSON to reduce the number of selected values, or increase the timeout if needed.

FAQ

Question Answer
What is a table path? It is the part of the PxWeb API URL after /pxen/api/v1/en/. For example, Ibuar/mannfjoldi/1_yfirlit/yfirlit_mannfjolda/MAN00101.px. You can find paths by browsing px.hagstofa.is/pxen/ and copying the table identifier.
Do I need an API key? No. The Statistics Iceland PxWeb API is public. You only need the table path.
How do I select only certain dimensions? Pass a query JSON in the input. It must be an array of PxWeb selection objects, for example [{"code":"Kyn","selection":{"filter":"item","values":["1"]}}]. Leave it empty to get all values.
Can I get labels in Icelandic? Yes. Set the language input to "is" and the response will use Icelandic labels for dimensions and values.
What is the maximum number of rows? Free users are limited to 10 rows as a preview. Paid users can collect up to 1,000,000 rows per run.
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 platform.
How do I find the table path for a dataset I see on the website? On px.hagstofa.is, open the table you want, then look at the URL. The path after /pxen/ is what you need, with .px at the end.
Can I scrape multiple tables in one run? This Actor handles one table path per run. To scrape multiple tables, run it multiple times or use a separate orchestrator.
What if the table has many dimensions and the result is huge? The Actor will page through all data points up to your maxItems limit. For very large tables, consider using a query JSON to filter dimensions first.
Is the data updated automatically? The Actor fetches whatever is currently available on the PxWeb API. To keep data fresh, schedule regular runs.

Related actors

Browse the full ParseForge collection 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 Statistics Iceland. 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.

Input

FieldTypeWhat it doesDefault
tablePath required string Iceland Hagstofa PxWeb table path under px.hagstofa.is/pxen/api/v1/en (for example Ibuar/mannfjoldi/1_yfirlit/yfirlit_mannfjolda/MAN00101.px). Ibuar/mannfjoldi/1_yfirlit/yfirlit_mannf
maxItems integer Free users are limited to 10 rows (preview). Paid users can collect up to 1,000,000. 10
lang string (2 options) Response language. en
query string Optional. JSON array of PxWeb selection objects. Leave empty for an all-values request. not set

Pricing

from $1.63 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.00163 to $0.0018

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~iceland-hagstofa-px-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run Iceland Hagstofa PxWeb Statistics Scraper on Apify All scrapers