Skip to main content
All providers

Madrid Open Data

Open data portalsES

datos.madrid.es

The City of Madrid's open data portal: CKAN datasets on transport, air quality, budgets, population and city services.

Capabilities (17)

GET /v1/data/datos-madrid-es/dataset1 credit

Full metadata for one dataset: title, notes, licence, organization, tags, extras and the complete resource list with download URLs and formats.

id
GET /v1/data/datos-madrid-es/dataset-names1 credit

Flat JSON array of every dataset slug on the portal, in alphabetical order.

limit?offset?
GET /v1/data/datos-madrid-es/datasets1 credit

Solr-backed search over every dataset published on the Latvian open data portal; returns a page of 20 full dataset records plus the total match count and facets.

q?fq?sort?start?facet.field?
GET /v1/data/datos-madrid-es/dataset-suggest1 credit

Lightweight typeahead: matching datasets as {name, title, match_field} objects, no resources or descriptions.

qlimit?
GET /v1/data/datos-madrid-es/group1 credit

Metadata for one thematic group: title, description, image and dataset count.

idinclude_datasets?include_extras?
GET /v1/data/datos-madrid-es/group-datasets1 credit

A page of up to 20 full dataset records belonging to one thematic group, with the group's total count.

groupq?sort?start?
GET /v1/data/datos-madrid-es/groups1 credit

Every thematic group (subject category) on the portal with its name, display title, description and dataset count.

limit?offset?sort?
GET /v1/data/datos-madrid-es/licenses1 credit

Every licence the portal offers publishers, as {id, title, url, od_conformance, osd_conformance} objects.

No parameters
GET /v1/data/datos-madrid-es/organization1 credit

Metadata for one publishing organization: title, description, contact extras, dataset count and (optionally) its datasets.

idinclude_datasets?include_extras?include_followers?
GET /v1/data/datos-madrid-es/organization-datasets1 credit

A page of up to 20 full dataset records published by one organization, with the total count for that publisher.

organizationq?sort?start?
GET /v1/data/datos-madrid-es/organizations1 credit

Every publishing organization on the portal with its name, display title, description, image and dataset count.

limit?offset?sort?
GET /v1/data/datos-madrid-es/resource1 credit

Metadata for one file or API endpoint attached to a dataset: download URL, format, size, description and datastore flag.

id
GET /v1/data/datos-madrid-es/resource-rows1 credit

Up to 100 parsed rows of a tabular resource straight from CKAN's DataStore, with the column schema and total row count, so no file download or CSV parsing is needed.

resource_idq?offset?fields?sort?filters?distinct?include_total?plain?
GET /v1/data/datos-madrid-es/resource-search1 credit

Searches resource metadata (not datasets) across the whole portal and returns up to 50 matching resource records with their download URLs.

queryoffset?order_by?
GET /v1/data/datos-madrid-es/site-status1 credit

The portal's CKAN version, site title, locale and the list of installed CKAN extensions.

No parameters
GET /v1/data/datos-madrid-es/tag1 credit

The id, name and vocabulary of one tag, and optionally every dataset carrying it.

idinclude_datasets?vocabulary_id?
GET /v1/data/datos-madrid-es/tags1 credit

Flat JSON array of every free tag used on the portal.

query?vocabulary_id?

Response example

The shape of data from datos-madrid-es/dataset (Dataset detail). A sample, not live data.

Example truncated, full shape in JSON from the API.

JSON
{
  "help": "https://datos.madrid.es/api/3/action/help_show?name=package_show",
  "success": true,
  "result": {
    "author": "Ayuntamiento de Madrid",
    "author_email": "dgtransparenciayc@madrid.es",
    "creator_user_id": "bfcd887b-9a5d-46d4-ba24-c9b3df3ddf26",
    "dataset_downloads": 11321,
    "dcat_type": "https://publications.europa.eu/resource/authority/dataset-type/STATISTICAL",
    "frequency": "https://publications.europa.eu/resource/authority/frequency/DAILY",
    "id": "300680-0-servicios-sociales-problematicas",
    "isopen": true,
    "issued": "2024-07-15T00:00:00.000000",
    "language": "https://publications.europa.eu/resource/authority/language/SPA",
    "license_id": "cc-by",
    "license_title": "Creative Commons Attribution 4.0 International (CC BY 4.0)",
    "license_url": "https://creativecommons.org/licenses/by/4.0/legalcode.es",
    "maintainer": "Ayuntamiento de Madrid",
    "maintainer_email": "dgtransparenciayc@madrid.es",
    "metadata_created": "2024-07-15T00:00:00",
    "metadata_modified": "2026-10-23T06:00:22.822000",
    "modified": "2026-10-23T06:00:22.822000",
    "name": "300680-0-servicios-sociales-problematicas",
    "notes": "En este conjunto de datos se presentan datos relativos a las problemáticas sociales de las personas atendidas desde la red de centros de servicios sociales de atención social primaria del Ayuntamiento de Madrid.\r\n****\r\nLos centros de servicios sociales constituyen la unidad o equipamiento básico donde se prestan los servicios de atención social primaria. Estos centros son la puerta de entrada de la ciudadanía al sistema público de servicios sociales y a sus prestaciones, ya sean éstas del Ayuntamiento, de la Comunidad de Madrid o de otras administraciones. Las personas que precisen apoyo social se les asignarán una trabajadora o un trabajador social de referencia para la atención personalizada a sus problemas y necesidades sociales, asegurando así la coherencia y globalidad que requiere el proceso de atención social y seguimiento.\r\n****\r\nEn este portal también se ofrecen otros conjuntos de datos relacionados:\r\n****\r\n  * [Centros de servicios sociales municipales](https://datos.madrid.es/dataset/209094-0-centros-servicios-sociales)\r\n  * [Citas proporcionadas desde los centros de servicios sociales del Ayuntamiento de Madrid](https://datos.madrid.es/dataset/300303-0-servicios-sociales-citas)\r\n  * [Urgencias atendidas desde los servicios sociales del Ayuntamiento de Madrid](https://datos.madrid.es/dataset/300304-0-servicios-sociales-urgencias)\r\n  * [Atenciones en atención social primaria de centros de servicios sociales](https://datos.madrid.es/dataset/300385-0-servicios-sociales-atenciones)\r\n  * [Entrevistas realizadas en atención social primaria de centros de servicios sociales](https://datos.madrid.es/dataset/300386-0-servicios-sociales-atendidos)\r\n  * [Demandas de servicio en atención social primaria de centros de servicios sociales](https://datos.madrid.es/dataset/300387-0-servicios-sociales-demandas)\r\n  * [Personas atendidas en atención social primaria de centros de servicios sociales](https://datos.madrid.es/dataset/300355-0-servicios-sociales-atendidos)\r\n****\r\n…",
    "num_resources": 25,
    "num_tags": 2,
    "organization": {
      "id": "0ea76d4a-0c7f-4321-854c-73c4bfb6f868",
      "name": "ayuntamiento-de-madrid",
      "title": "Ayuntamiento de Madrid",
      "type": "organization",
      "description": "Portal dedicado a promover el acceso a los datos del gobierno municipal e impulsar el desarrollo de herramientas creativas para atraer y servir a la ciudadaní­a.",
      "image_url": "https://datos.madrid.es/base/images/escudo_madrid_negro.png",
      "created": "2025-02-22T08:09:40.150285",
      "is_organization": true,
      "approval_status": "approved",
      "state": "active"
    },
    "owner_org": "0ea76d4a-0c7f-4321-854c-73c4bfb6f868",
    "private": false,
    "spatial_resolution_in_meters": "",
    "state": "acti

Ask with this source

A prompt for your agent that names this source and how to call it through the crw MCP.

  • Dataset detail

    Use Madrid Open Data (datos-madrid-es) from fastCRW Pergamon, capability "Dataset detail" (dataset). You already have a dataset name or UUID from a search and need its resources, licence or full description. Example options: id=300680-0-servicios-sociales-problematicas. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "datos-madrid-es" and capability "dataset". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • All dataset names

    Use Madrid Open Data (datos-madrid-es) from fastCRW Pergamon, capability "All dataset names" (dataset-names). You want the complete inventory of dataset ids to iterate over, rather than a scored search page. Example options: limit=100, offset=0. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "datos-madrid-es" and capability "dataset-names". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Dataset search

    Use Madrid Open Data (datos-madrid-es) from fastCRW Pergamon, capability "Dataset search" (datasets). You want to find datasets on this portal by keyword, filter, or recency, and you do not already know a dataset id. Example options: q=statistika, fq=res_format:CSV, sort=metadata_modified desc. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "datos-madrid-es" and capability "datasets". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Dataset title autocomplete

    Use Madrid Open Data (datos-madrid-es) from fastCRW Pergamon, capability "Dataset title autocomplete" (dataset-suggest). You are resolving a partly-remembered dataset title into an id and do not want full search payloads. Example options: q=300680, limit=10. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "datos-madrid-es" and capability "dataset-suggest". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

Licence

Dataset records on this portal declare the licence "Creative Commons Attribution 4.0 International (CC BY 4.0)" (https://creativecommons.org/licenses/by/4.0/legalcode.es). This is the licence the publishing organisations attach to their own datasets; the portal itself states no separate API licence. Quoted as found in the portal's own dataset metadata.

https://creativecommons.org/licenses/by/4.0/legalcode.es

Attribution

Display this wherever you show the data. It arrives on every response as provenance.attribution_text.

Source: Portal de datos abiertos del Ayuntamiento de Madrid (Ayuntamiento de Madrid). Data published by the portal's contributing organisations.

Cache: up to 3600s