# Datos.gob.es MCP for AI Agents AI Agent Connect

> Datos.gob.es (Catálogo Nacional) lets you query Spain's official open data repository. Use it to find specific datasets, filter by theme or region, and pull metadata for public sector information. It connects your AI client directly to national, regional, and local government data.

## Overview
- **Category:** knowledge-management
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_xo2gC4rSEibGD4JOnCtKXoQ0k5wPqvoW722sKuKq/ai-agent-connect
- **Tags:** open-data, spain, public-sector, datasets, transparency

## Description

The Datos.gob.es MCP gives you direct access to Spain's official national open data catalog. It connects your AI client to a massive repository of public sector information from national, regional, and local governments. Instead of hunting through confusing web portals and manual search bars, you can just ask your agent to find specific datasets for you. It handles the heavy lifting of navigating the catalog, allowing you to query information on everything from regional health statistics and economic reports to local infrastructure and environmental policies.

If you are looking for specific file types, you can tell your agent to only show you CSVs or JSON files. It can also narrow down results by a specific publisher or a geographic area like a province or an autonomous community. This is a huge time-saver for anyone who needs to stay on top of public sector transparency without the headache of manual data gathering. You can quickly pull detailed metadata to see how often a dataset is updated or which body issued it. It makes the process of finding and analyzing Spanish public data much faster. You can find this Connector in the Vinkius catalog to get your agent connected to the full scope of the Datos.gob.es API.

## Tools

### get_dataset
Fetch a specific dataset using its unique URI identifier. This is useful for getting deep details on a known file.

### get_province
Retrieve details for a specific province by its ID. Use this to find regional data specifics.

### get_public_sector
Get information on a specific primary sector using its ID. Use this to drill down into specific industries.

### get_region
Get details for a specific Autonomous Community (Region) by its ID. This helps target regional data.

### list_datasets_by_date
Filter the catalog for datasets modified within a specific date range. Use this to find the most recent data.

### list_datasets_by_format
Find datasets available in specific formats like CSV or JSON. This saves you from clicking links that don't match your needs.

### list_datasets_by_keyword
Search the catalog for datasets containing specific keywords. Use this to find topics like transport or health.

### list_datasets_by_publisher
Filter datasets based on a specific publisher ID. Use this to see all data from one specific agency.

### list_datasets_by_spatial
Filter datasets by geographic scope like specific provinces or regions. This helps target data to a specific area.

### list_datasets
Retrieve a full list of all datasets available in the catalog. Use this for a broad overview of available data.

### list_distributions_by_dataset
Get all available data distributions for a specific dataset ID. Use this to see all file options for one dataset.

### list_distributions_by_format
Filter data distributions by file format. This helps you find only the CSVs or JSONs you need.

### list_distributions
Get a list of all data distributions across the catalog. Use this to see the variety of file types available.

### list_provinces
Get a list of all provinces in Spain. Use this to see all available geographic sub-divisions.

### list_publishers
Get a list of all publishers in the catalog. Use this to identify which agencies provide data.

### list_regions
Get a list of all Autonomous Communities (Regions). Use this to see all available regional data options.

### list_spatial_options
Get all available geographic coverage options. Use this to understand the different levels of spatial filtering.

### list_themes
Get a list of all categories and themes in the catalog. Use this to see what topics are covered.

### get_country_spain
Get general country-level information for Spain. Use this to establish basic geographic context.

### list_datasets_by_theme
Find datasets categorized under specific themes like health or economy. Use this to browse by industry.

### list_public_sectors
Get the full taxonomy of primary sectors. Use this to understand how the government categorizes its data.

### search_datasets_by_title
Search for specific datasets using their titles. Use this for a quick search when you know the name of the data.

## Prompt Examples

**Prompt:** 
```
Find datasets about 'transporte' in Spain.
```

**Response:** 
```
I've found several datasets related to 'transporte' in the Spanish open data catalog. Here are some notable entries:

| Dataset Title | Publisher | Format |
| :--- | :--- | :--- |
| **Transporte Terrestre de Viajeros** | Ministry of Transport | CSV |
| **Red de Carreteras** | Infrastructure Agency | JSON |

Would you like the full metadata or download links for any of these?
```

**Prompt:** 
```
List all CSV datasets available.
```

**Response:** 
```
I'm pulling the list of datasets available in CSV format. Here are some of the results:

* **Censo de locales**
* **Presupuestos municipales**
* **Registro de vehículos**

I can provide more details or filter these by a specific region if you'd like.
```

**Prompt:** 
```
What themes are available in the catalog?
```

**Response:** 
```
The Datos.gob.es catalog is organized into several main themes. You can explore categories such as:

* **Hacienda** (Finance)
* **Cultura y Ocio** (Culture and Leisure)
* **Medio Ambiente** (Environment)
* **Salud** (Health)

Which of these categories would you like to search first?
```

## Capabilities

### Search datasets by title
Find specific government datasets using keywords or exact names.

### Filter by theme or publisher
Narrow your results to specific categories like health or economy.

### Filter by geographic scope
Query data for specific provinces, regions, or autonomous communities.

### Retrieve dataset metadata
Get update frequencies and issuing body details for any dataset.

### Inspect public sector organizations
List and view the organizations involved in the open data ecosystem.

## Use Cases

### Finding regional health data
An analyst asks for health datasets in the Basque Country. The agent uses list_datasets_by_spatial to find them.

### Budget research
A researcher wants to find municipal budgets. The agent uses list_datasets_by_keyword to find 'presupuestos'.

### Data format check
A developer needs to see if a dataset is in JSON. The agent uses list_datasets_by_format to check availability.

### Publisher lookup
A user wants to see what data a specific agency provides. The agent uses list_publishers and then list_datasets_by_publisher.

## Benefits

- Stop manually browsing government websites. Use list_datasets to see everything available in one view.
- Find specific files faster. Use list_datasets_by_format to grab only the CSVs or JSONs you actually need.
- Target specific regions easily. Use list_datasets_by_spatial to focus your search on one province or region.
- Save time on data discovery. Use list_datasets_by_theme to find relevant data across different sectors instantly.
- Get precise metadata instantly. Use get_dataset to see update frequencies and issuing bodies without clicking through pages.

## How It Works

The bottom line is you get direct, searchable access to Spain's national open data catalog without leaving your chat interface.

1. Subscribe to the Datos.gob.es MCP on the Vinkius Marketplace.
2. Connect your AI client to the Connector to establish a link to the official API.
3. Ask your agent to find, filter, or analyze Spanish public datasets.

## Frequently Asked Questions

**Can I use the Datos.gob.es MCP to find specific Spanish government data?**
Yes, this Connector gives your agent direct access to the official national open data catalog. You can search for specific datasets, filter by theme, and retrieve data from national, regional, and local governments.

**How does the Datos.gob.es MCP help with regional data?**
It allows you to filter results by specific geographic scopes. You can quickly find data for specific provinces or autonomous communities across Spain.

**Can I filter by file type using the Datos.gob.es MCP?**
Yes, you can ask your agent to show only specific formats like CSV or JSON. This helps you find the exact data files you need for your tools.

**Does the Datos.gob.es MCP show who published the data?**
Yes, the Connector retrieves metadata that includes the issuing body. This lets you identify which government agency or publisher provided the information.

**Is the Datos.gob.es MCP good for policy research?**
It's excellent for policy research. You can track public sector transparency and data availability across different regions and themes in one place.

**Can I search for datasets by specific keywords with the Datos.gob.es MCP?**
Absolutely. You can use keywords to find datasets related to specific topics like transport, health, or economy without browsing manually.

**How can I search for datasets containing a specific word in the title?**
Use the `search_datasets_by_title` tool. Provide the string you are looking for in the `title` parameter, and the agent will return all matching datasets from the national catalog.

**Is it possible to filter datasets by a specific file format like CSV or JSON?**
Yes! Use the `list_datasets_by_format` tool and specify the format (e.g., 'csv', 'json', 'xlsx'). This will retrieve only the datasets that offer distributions in that format.

**Can I find datasets belonging to a specific category like 'Health' or 'Environment'?**
Absolutely. Use the `list_datasets_by_theme` tool with the corresponding theme ID. You can first use `list_themes` to see all available categories in the catalog.