Datos.gob.es Spain Open Data Scraper avatar

Datos.gob.es Spain Open Data Scraper

Pricing

from $7.50 / 1,000 results

Go to Apify Store
Datos.gob.es Spain Open Data Scraper

Datos.gob.es Spain Open Data Scraper

Scrapes dataset records from Datos.gob.es, the Spanish government's open data portal. Returns each dataset as a flat row with title, description, publisher, format, license, and URL. Supports keyword search and full catalogue listing.

Pricing

from $7.50 / 1,000 results

Rating

0.0

(0)

Developer

ParseForge

ParseForge

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

Share

ParseForge

Datos.gob.es Spain Open Data Scraper

Scrape Spain's national open data catalogue, Datos.gob.es, by keyword or browse every dataset. Each row returns the title, description, publisher, format, license, and landing URL. No API key. Export to CSV, JSON, Excel, or XML.

Datos.gob.es is the Spanish government's central open data portal, but its CKAN API needs registration and returns nested JSON that is hard to flatten. This Actor reads the public catalogue directly, searches by any Spanish or English keyword, and returns each dataset as one flat row. It works for researchers, journalists, and developers who need Spanish public sector data without writing API code.

Who uses itWhat they scrape Datos.gob.es for
Data journalistsFind Spanish government datasets on a topic, such as unemployment or air quality, for a story.
Open data researchersBuild a corpus of Spanish public datasets for analysis of data publishing practices.
Civic tech developersDiscover datasets to power apps, dashboards, or transparency tools for Spanish citizens.
Market analystsMonitor which public datasets Spanish ministries and regions release on a given sector.

What it does

This Actor collects dataset records from Datos.gob.es by free-text query or full catalogue listing, and returns each one as a flat row with title, description, publisher, format, license, and URL.

  • 🔎 Keyword search: pass any Spanish or English term, such as 'transporte' or 'covid', and get matching datasets.
  • 📋 Full catalogue listing: leave the query empty to collect every dataset up to your maxItems limit.
  • 📦 Flat output: each dataset is one row, ready for CSV, JSON, Excel, or XML export.
  • 🇪🇸 Spanish source: handles Spanish characters, accents, and multilingual metadata correctly.

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

What you can do with Datos.gob.es data

📰 Investigate public spending.

A data journalist searches 'contratos' and collects all contract-related datasets to find which ministries publish the most procurement data.

🌍 Track environmental data releases.

An NGO queries 'calidad del aire' monthly and exports new datasets to monitor air quality reporting across Spanish regions.

🏙️ Build a city dashboard.

A civic developer lists all datasets from a city like Madrid, filters by CSV format, and loads them into a local open data portal.

📊 Compare regional open data maturity.

A researcher collects the full catalogue and counts datasets per publisher to rank autonomous communities by data availability.

Why choose this scraper

What you get
No API keyThe public catalogue is read directly, so you do not register or manage tokens.
Spanish-firstSearch with native terms like 'medio ambiente' or 'contratos' and get accurate matches.
Flat schemaEvery dataset is one row with the same columns, so you can merge runs or load into a database.
ScalableCollect up to a million datasets per run, enough for the entire national catalogue.

How it compares

No other Store actor targets Datos.gob.es the same way, so the honest comparison is with the alternatives teams actually weigh.

Datos.gob.es Spain Open Data ScraperBuild it in-houseBy hand
SetupRun it now, zero configDays of engineeringNone, but hours per pull
When Datos.gob.es changesMaintained for youYou fix itYou re-learn the page
Proxies, retries, anti-botBuilt inYour problemBrowser only
OutputFixed JSON schema, CSV/Excel exportWhatever you buildCopy-paste
CostPay per resultEngineering timeAnalyst hours

Configure the run

Drive the Actor with a free-text query or leave it empty to list the whole catalogue, and set maxItems to cap how many datasets you collect per run. The Input tab lists every parameter.

A first run with the defaults:

{
"maxItems": 10
}

A larger pull:

{
"maxItems": 200
}

Pricing

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

Results collectedApproximate cost
100 results$0.85
1,000 results$8.50
10,000 results$85.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 Datos.gob.es Spain Open Data 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 Datos.gob.es 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/datos-gob-es-v2-scraper"

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

Troubleshooting

Why am I getting no results?

Check your query spelling. Try a broader term or leave the query empty to list all datasets. Also ensure maxItems is at least 1.

Why are some datasets missing?

The catalogue may paginate results. Increase maxItems to collect more, or run the Actor again with the same query to get newly added datasets.

Why do I see garbled Spanish characters?

The Actor handles UTF-8 encoding correctly. If your export tool shows issues, open the CSV with UTF-8 encoding selected.

Why does the run take a long time?

Collecting the full catalogue with a high maxItems can take several minutes. Reduce maxItems or narrow your query to speed it up.

Can I get the actual data files?

This Actor returns metadata only. Use the landing URL in each row to download the data files manually or with another scraper.

FAQ

QuestionAnswer
Do I need an API key for Datos.gob.es?No. This Actor reads the public catalogue pages directly, so you do not need to register or manage any credentials.
Can I search in Spanish?Yes. The query field accepts any Spanish term, including accents, and returns datasets whose title, description, or tags match.
What if I leave the query empty?The Actor lists all datasets in the catalogue, up to the maxItems limit you set. This is useful for building a full snapshot.
How many datasets can I collect?You can set maxItems up to 1,000,000 per run. The actual number depends on how many datasets match your query.
What format is the output?Each dataset is returned as a flat row with fields like title, description, publisher, format, license, and URL. You can export to CSV, JSON, Excel, or XML.
Does it include the actual data files?No, it returns metadata about each dataset, including the landing page URL where you can download the data files.
Can I filter by publisher or format?The current version supports only free-text query and maxItems. You can filter the results after export using your own tools.
Is this legal to scrape?Datos.gob.es publishes open data under Spanish law, and the catalogue itself is public. Always check each dataset's license before reusing the data.
How often is the catalogue updated?The Actor reads live data on each run, so you always get the current state of the catalogue.
Can I schedule regular runs?Yes, you can set up a schedule on Apify to run this Actor daily, weekly, or at any interval you need.

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 Gobierno de España. 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.