ParseForge Scrapers

Spain datos.gob.es Catalog Scraper

parseforge/spain-datos-gob-es-catalog-scraper

AutomationIntegrations

Scrapes dataset metadata from the Spanish open data catalog datos.gob.es. Filter by theme, publisher, format, and modification date, and export each dataset as a flat row.

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

Overview

ParseForge

Spain datos.gob.es Catalog Scraper

Scrape the complete catalog of Spanish open data from datos.gob.es, filtering by theme, publisher, format, or modification date. Each dataset record includes its title, description, publisher, theme, and all distribution links. Export to CSV, JSON, Excel, or XML.

The Spanish government's open data portal, datos.gob.es, lists hundreds of thousands of datasets across dozens of themes, but browsing the web catalog makes it hard to find and track specific data. This Actor reads the public catalog API directly, letting you filter by theme, publisher, distribution format, and modification date, and returns matching datasets in a clean, flat schema. No API key or registration is needed.

Who uses it What they scrape datos.gob.es for
Data journalists Finding recent datasets on a specific topic like health or environment for an investigation.
Open data researchers Building a corpus of Spanish public sector datasets for analysis of data availability.
Business analysts Monitoring new economic or demographic datasets released by specific government bodies.
GIS specialists Filtering the catalog for geospatial formats like GeoJSON or Shapefile for mapping projects.

What it does

This Actor collects dataset metadata from the datos.gob.es catalog and returns each dataset as a flat row with its title, description, publisher, theme, and distribution links.

  • 🏷️ Filter by theme: Narrow results to one of 22 DCAT themes like medio-ambiente, transporte, or salud.
  • 🏢 Filter by publisher: Target datasets from a specific organization using its publisher slug.
  • 📅 Filter by modification date: Collect only datasets updated on or after a given date.
  • 📄 Filter by distribution format: Retrieve only datasets that offer downloads in CSV, JSON, XML, GeoJSON, or other formats.
  • 🔢 Control the volume: Set a maximum number of datasets to collect per run, from one to a million.

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

What you can do with datos.gob.es data

📈 Monitor new environmental data.

An environmental researcher runs the Actor weekly with the medio-ambiente theme and a recent modification date to discover newly published or updated datasets on air quality, water, or protected areas.

🗺️ Find geospatial datasets for a mapping project.

A GIS analyst filters the catalog by GeoJSON and Shapefile formats to quickly locate all datasets with geographic data, then downloads them for use in a regional planning map.

📊 Track public sector data releases.

A transparency advocate scrapes the catalog filtered by the sector-publico theme and a specific publisher to monitor what data a particular ministry is releasing over time.

🏥 Collect health datasets for research.

A university researcher uses the salud theme filter to gather all available health-related datasets from Spanish public bodies for a meta-analysis on healthcare data availability.

Why choose this scraper

What you get
Full catalog access Reads the public catalog API without needing an API key or registration.
Flexible filtering Combine theme, publisher, format, and date filters to pinpoint relevant datasets.
Structured output Every dataset is returned as a flat row with consistent fields for easy analysis.
Distribution links Each record includes all available download URLs and their formats.

How it compares

This Actor scrapes the full datos.gob.es open data catalog, while the Spain Solar Tender Monitor focuses specifically on procurement tenders from multiple sources.

Feature ParseForge Spain Solar Tender Monitor
Scrapes datos.gob.es catalog Yes Yes
Filter by DCAT theme Yes Not listed
Filter by distribution format Yes Not listed
Filter by publisher Yes Not listed
Filter by modification date Yes Not listed
Returns tender notices No Yes

Configure the run

Drive the Actor with optional theme, publisher, format, and modification date filters, and set a maximum number of datasets to 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 collected Approximate 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 Spain datos.gob.es Catalog 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/spain-datos-gob-es-catalog-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 filter combination is not too restrictive. Try removing the publisher or format filter, or broadening the theme, to see if results appear. Also verify that the publisher slug is correct.

The Actor stopped before reaching my maxItems limit.

The catalog may have fewer datasets matching your filters than your maxItems value. Try relaxing your filters or increasing the modification date range.

I don't know the publisher slug for the organization I want.

Visit datos.gob.es, navigate to a dataset from that publisher, and click the publisher name. The slug will appear in the URL of the publisher's page.

The modifiedSince filter is not returning the datasets I expect.

Ensure the date is in YYYY-MM-DD format. The filter matches datasets modified on or after that date. If a dataset was last modified before your date, it will not appear.

Can I combine multiple themes in one run?

The Actor currently supports selecting one theme per run. To collect datasets from multiple themes, run the Actor multiple times with different theme selections.

FAQ

Question Answer
Do I need an API key to scrape datos.gob.es? No. This Actor reads the public catalog API directly and does not require any registration or API key.
What information does each dataset record contain? Each record includes the dataset title, description, publisher name, theme, modification date, and all distribution links with their formats and URLs.
Can I filter datasets by a specific publisher? Yes. You can enter a publisher organization slug in the input to return only datasets from that body.
How do I find the slug for a publisher? Publisher slugs are typically codes like e05068001. You can find them by browsing the datos.gob.es catalog and inspecting the URL of a publisher's page.
What themes can I filter by? The Actor supports all 22 DCAT themes used by datos.gob.es, including medio-ambiente, transporte, salud, educacion, economia, and more.
Can I filter by the format of the downloadable files? Yes. You can select from CSV, JSON, XML, GeoJSON, Shapefile, XLSX, PDF, and other formats to find only datasets with distributions in that format.
How many datasets can I collect in one run? You can set a maximum from 1 up to 1,000,000 datasets per run. The Actor stops when it reaches your limit.
Does this Actor download the actual data files? No. It collects the metadata and distribution links. You can use the URLs in the output to download the files separately.
Can I get only datasets modified after a certain date? Yes. Use the modifiedSince input with a YYYY-MM-DD date to collect only datasets updated on or after that day.
What output formats are supported? You can export the results to CSV, JSON, Excel, or XML from your Apify dataset.

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 datos.gob.es. 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
maxItems integer How many datasets to collect per run. 10
theme string (23 options) DCAT theme slug (e.g. medio-ambiente, sector-publico, transporte). Empty for all. not set
publisher string Optional publisher org slug (e.g. e05068001). not set
format string (11 options) Optional distribution format filter. not set
modifiedSince string Only datasets modified on or after this date. not set

Pricing

from $7.50 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.0075 to $0.0085

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~spain-datos-gob-es-catalog-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 Spain datos.gob.es Catalog Scraper on Apify All scrapers