Open Government, Spain API
Overview
The Spain Open Government Data API (datos.gob.es) exposes thousands of datasets from Spanish public institutions including statistics, geography, and public services. It follows the DCAT-AP standard and requires no authentication, making it easy to query with a simple HTTP request. Perfect for exploring Spanish civic data or building data journalism tools.
Beginner Tip
Use the /api/action/package_search endpoint with the q parameter to search by keyword, or browse datos.gob.es to find specific dataset IDs before fetching them via the API.
Available Data
Example Response
{
"status": "success",
"data": {
"result": "Data from Open Government, Spain",
"description": "Spain Government Open Data",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
result List of dataset entries matching the search or browse query result[].title Human-readable title of the dataset in Spanish result[].identifier Unique identifier for the dataset used in API lookups result[].distribution Download links and format info for the dataset files result[].publisher The government entity that published the dataset Implementation Example
const url = "https://datos.gob.es/en";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →Bank Negara Malaysia Open Data
⭐ Beginner's PickBank Negara Malaysia Open Data provides free access to official financial data published by Malaysia's central bank, including exchange rates, interest rates, and key economic indicators.
BCLaws
BCLaws gives you free access to the full text of British Columbia's laws and regulations.
Brazil
⭐ Beginner's PickBrasilAPI is a free, community-driven API that centralizes public data about Brazil in one easy-to-use place.
Brazil Central Bank Open Data
The Brazil Central Bank Open Data API provides free access to official financial and economic data from Brazil s central bank (Banco Central do Brasil).
Brazil Receita WS
Brazil Receita WS lets you look up official information about Brazilian companies using their CNPJ (tax registration number).