Open Data Madrid

App · Misc References · 22 actions

Read Madrid City Council's open-data catalog: search its datasets by words, category, tag or file format, open any one of them with every file it publishes, and follow the categories, tags, licenses and changes behind them.

Actions

ActionWhat it does
Get a categoryRead one category's own record: its title, what it covers and how many datasets are filed under it.
Get a category's datasetsRead the datasets filed under one category, each in full with its files and license.
Get a changeRead one entry from a change history by its id, as returned by 'Get a dataset's history' or 'List recently updated datasets': what kind of change it was, which dataset it touched and exactly when.
Get a datasetRead one dataset in full: what it covers, who publishes it, the license it is released under, when it was last updated, and every file it offers with that file's format, size and download link.
Get a dataset's historyRead one dataset's change history, most recent first: when it was created and each time it has been updated since.
Get a fileRead one file's details: its format, its size, whether the portal hosts it or links out to it, and the link to download it.
Get a file's rowsRead the data inside one of the portal's files, such as a CSV, without downloading it: search its rows for words, keep only the rows whose columns hold given values, choose the columns, order and page through them.
Get a previewRead one preview on its own by its id, as returned by 'List a file's previews': its title, its description and which kind of viewer it is.
Get a tagRead one tag by name, with how many datasets carry it.
Get follower countCount the people following one dataset or one category on the portal: a rough measure of how much interest it attracts, which is how a workflow picks the datasets worth reporting on.
Get related datasetsRead the datasets the portal records as related to one dataset (a parent it derives from, a version it supersedes, or one it links to) together with the kind of relationship and any note the publisher left on it.
Get the category treeRead the categories as a tree rather than a flat list: the portal's three families of categories (its own themes, the EU's high-value datasets and the UN Sustainable Development Goals), each carrying the categories inside it.
List a file's previewsList the previews the portal has configured on one file (a data table, a chart, a map or an embedded viewer) each with its own id and kind.
List categoriesRead every category the portal files its datasets under (transport, environment, population, urban planning and the rest) each with its title, its description and how many datasets it holds.
List datasetsList the names of the datasets in the catalog, in the portal's own order.
List licensesRead the licenses datasets in the catalog are published under, each with its name, its full text online and whether it is an open license.
List recently updated datasetsRead what has changed across the whole catalog lately, most recent first, each entry naming the dataset it touched and when.
List tagsRead every tag used across the catalog, alphabetically.
Search datasetsSearch the whole Madrid catalog by words in a dataset's title, description or tags, and narrow it by category, tag, file format or publishing body.
Search filesFind files across the whole catalog by one of their own fields rather than by their dataset: every file whose name mentions 'padrón', or every GeoJSON the portal publishes.
Search tagsFind the tags whose names contain a word, rather than reading the whole list.
Suggest namesComplete a partly-typed name against the portal's own vocabulary: dataset names, categories, tags or file formats.

Get a category

Read one category's own record: its title, what it covers and how many datasets are filed under it. Takes the category's name or a link to its page.

Inputs

CategorycategorytextRequired
Which category to read. Pick one, or type its name.

Outputs

categoryobject
Example output
{
  "category": {
    "category_url": "https://datos.madrid.es/group/ods-11",
    "dataset_count": 12,
    "description": null,
    "id": "7c8d9e0f-1a2b-4c3d-9e8f-7a6b5c4d3e2f",
    "image_url": null,
    "name": "ods-11",
    "state": "active",
    "title": "Ciudades y Comunidades Sostenibles"
  }
}

Get a category's datasets

Read the datasets filed under one category, each in full with its files and license. Use 'Search datasets' with a category filter instead when you also want to search within it or to page through a large category.

Inputs

CategorycategorytextRequired
Which category to read. Pick one, or type its name.
Number of resultslimitnumber
How many results to return (1–100). Defaults to 20. Use 'Skip' alongside it to read further down the list.From 1 to 100. Default: 20.

Outputs

categorytext
result_countnumber
resultslist
Example output
{
  "category": "ods-11",
  "result_count": 1,
  "results": [
    {
      "author": "Ayuntamiento de Madrid",
      "author_email": null,
      "categories": [
        {
          "description": null,
          "name": "ods-11",
          "title": "Ciudades y Comunidades Sostenibles"
        }
      ],
      "created": "2026-01-14T09:12:33.123456",
      "created_utc": "2026-01-14T09:12:33.123456+00:00",
      "dataset_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa",
      "description": "Avisos comunicados por la ciudadan\u00eda a trav\u00e9s de Madrid Avisa, con su tipo, su localizaci\u00f3n y el estado en que se encuentra cada uno.",
      "extras": {
        "frecuencia_actualizacion": "Mensual"
      },
      "formats": [
        "CSV",
        "JSON",
        "PDF",
        "XML"
      ],
      "id": "212411-0-madrid-avisa",
      "is_open": true,
      "is_private": false,
      "license_id": "cc-by",
      "license_title": "Creative Commons Attribution",
      "license_url": "https://creativecommons.org/licenses/by/4.0/",
      "maintainer": "\u00c1rea de Gobierno de Obras, Urbanismo y Equipamientos",
      "maintainer_email": null,
      "modified": "2026-09-15T06:30:00.000000",
      "modified_utc": "2026-09-15T06:30:00+00:00",
      "name": "212411-0-madrid-avisa",
      "organization": {
        "description": null,
        "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "image_url": null,
        "name": "ayuntamiento-de-madrid",
        "title": "Ayuntamiento de Madrid"
      },
      "resource_count": 1,
      "resources": [
        {
          "created": "2026-01-14T09:12:33.123456",
          "created_utc": "2026-01-14T09:12:33.123456+00:00",
          "dataset_id": "212411-0-madrid-avisa",
          "description": "Avisos ciudadanos tramitados (SIC). 2026",
          "download_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa/resource/212411-0-madrid-avisa-csv/download/212411-0-madrid-avisa.csv",
          "format": "CSV",
          "id": "212411-0-madrid-avisa-csv",
          "is_queryable": true,
          "is_uploaded": true,
          "mimetype": "text/csv",
          "name": "212411-0-madrid-avisa-csv",
          "position": 0,
          "resource_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa/resource/212411-0-madrid-avisa-csv",
          "size_bytes": 2516582,
          "size_label": "2.4 MB",
          "state": "active",
          "updated_at": "2026-09-15T06:30:00.000000",
          "updated_at_utc": "2026-09-15T06:30:00+00:00"
        }
      ],
      "source_url": null,
      "state": "active",
      "tags": [
        "avisos",
        "madrid-avisa",
        "servicios-urbanos"
      ],
      "title": "Avisos ciudadanos",
      "version": null
    }
  ]
}

Get a change

Read one entry from a change history by its id, as returned by 'Get a dataset's history' or 'List recently updated datasets': what kind of change it was, which dataset it touched and exactly when.

Inputs

ChangeactivitytextRequired
The change's id, as returned by one of the history actions.

Outputs

activityobject
Example output
{
  "activity": {
    "activity_type": "changed package",
    "dataset_name": "212411-0-madrid-avisa",
    "dataset_title": "Avisos ciudadanos",
    "id": "0a1b2c3d-4e5f-4061-8273-8495a6b7c8d9",
    "object_id": "212411-0-madrid-avisa",
    "timestamp": "2026-09-15T06:30:00.000000",
    "timestamp_utc": "2026-09-15T06:30:00+00:00",
    "user_id": "2b3c4d5e-6f70-4812-9354-a6b7c8d9e0f1"
  }
}

Get a dataset

Read one dataset in full: what it covers, who publishes it, the license it is released under, when it was last updated, and every file it offers with that file's format, size and download link. Takes the dataset's name, its id, or a link to its page copied from a browser.

Inputs

DatasetdatasettextRequired
The dataset's name as it appears in its web address, its id, or a link to its page.

Outputs

datasetobject
Example output
{
  "dataset": {
    "author": "Ayuntamiento de Madrid",
    "author_email": null,
    "categories": [
      {
        "description": null,
        "name": "ods-11",
        "title": "Ciudades y Comunidades Sostenibles"
      }
    ],
    "created": "2026-01-14T09:12:33.123456",
    "created_utc": "2026-01-14T09:12:33.123456+00:00",
    "dataset_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa",
    "description": "Avisos comunicados por la ciudadan\u00eda a trav\u00e9s de Madrid Avisa, con su tipo, su localizaci\u00f3n y el estado en que se encuentra cada uno.",
    "extras": {
      "frecuencia_actualizacion": "Mensual"
    },
    "formats": [
      "CSV",
      "JSON",
      "PDF",
      "XML"
    ],
    "id": "212411-0-madrid-avisa",
    "is_open": true,
    "is_private": false,
    "license_id": "cc-by",
    "license_title": "Creative Commons Attribution",
    "license_url": "https://creativecommons.org/licenses/by/4.0/",
    "maintainer": "\u00c1rea de Gobierno de Obras, Urbanismo y Equipamientos",
    "maintainer_email": null,
    "modified": "2026-09-15T06:30:00.000000",
    "modified_utc": "2026-09-15T06:30:00+00:00",
    "name": "212411-0-madrid-avisa",
    "organization": {
      "description": null,
      "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
      "image_url": null,
      "name": "ayuntamiento-de-madrid",
      "title": "Ayuntamiento de Madrid"
    },
    "resource_count": 1,
    "resources": [
      {
        "created": "2026-01-14T09:12:33.123456",
        "created_utc": "2026-01-14T09:12:33.123456+00:00",
        "dataset_id": "212411-0-madrid-avisa",
        "description": "Avisos ciudadanos tramitados (SIC). 2026",
        "download_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa/resource/212411-0-madrid-avisa-csv/download/212411-0-madrid-avisa.csv",
        "format": "CSV",
        "id": "212411-0-madrid-avisa-csv",
        "is_queryable": true,
        "is_uploaded": true,
        "mimetype": "text/csv",
        "name": "212411-0-madrid-avisa-csv",
        "position": 0,
        "resource_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa/resource/212411-0-madrid-avisa-csv",
        "size_bytes": 2516582,
        "size_label": "2.4 MB",
        "state": "active",
        "updated_at": "2026-09-15T06:30:00.000000",
        "updated_at_utc": "2026-09-15T06:30:00+00:00"
      }
    ],
    "source_url": null,
    "state": "active",
    "tags": [
      "avisos",
      "madrid-avisa",
      "servicios-urbanos"
    ],
    "title": "Avisos ciudadanos",
    "version": null
  }
}

Get a dataset's history

Read one dataset's change history, most recent first: when it was created and each time it has been updated since. This is what a workflow watches to notice that a dataset it depends on has new data.

Inputs

DatasetdatasettextRequired
The dataset's name as it appears in its web address, its id, or a link to its page.
Number of resultslimitnumber
How many results to return (1–100). Defaults to 20. Use 'Skip' alongside it to read further down the list.From 1 to 100. Default: 20.
Skipoffsetnumber
How many results to skip before returning any. Defaults to 0. Set it to the number already read to fetch the next page.From 0 to 10000. Default: 0.

Outputs

activitieslist
datasettext
offsetnumber
result_countnumber
Example output
{
  "activities": [
    {
      "activity_type": "changed package",
      "dataset_name": "212411-0-madrid-avisa",
      "dataset_title": "Avisos ciudadanos",
      "id": "0a1b2c3d-4e5f-4061-8273-8495a6b7c8d9",
      "object_id": "212411-0-madrid-avisa",
      "timestamp": "2026-09-15T06:30:00.000000",
      "timestamp_utc": "2026-09-15T06:30:00+00:00",
      "user_id": "2b3c4d5e-6f70-4812-9354-a6b7c8d9e0f1"
    }
  ],
  "dataset": "212411-0-madrid-avisa",
  "offset": 0,
  "result_count": 1
}

Get a file

Read one file's details: its format, its size, whether the portal hosts it or links out to it, and the link to download it. Takes the id 'Get a dataset' returns for each of a dataset's files, or a link to the file's page.

Inputs

FilefiletextRequired
The file's id, or a link to it. 'Get a dataset' and 'Search files' return the id of every file, such as 212411-0-madrid-avisa-csv; a file's title will not do.

Outputs

fileobject
Example output
{
  "file": {
    "created": "2026-01-14T09:12:33.123456",
    "created_utc": "2026-01-14T09:12:33.123456+00:00",
    "dataset_id": "212411-0-madrid-avisa",
    "description": "Avisos ciudadanos tramitados (SIC). 2026",
    "download_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa/resource/212411-0-madrid-avisa-csv/download/212411-0-madrid-avisa.csv",
    "format": "CSV",
    "id": "212411-0-madrid-avisa-csv",
    "is_queryable": true,
    "is_uploaded": true,
    "mimetype": "text/csv",
    "name": "212411-0-madrid-avisa-csv",
    "position": 0,
    "resource_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa/resource/212411-0-madrid-avisa-csv",
    "size_bytes": 2516582,
    "size_label": "2.4 MB",
    "state": "active",
    "updated_at": "2026-09-15T06:30:00.000000",
    "updated_at_utc": "2026-09-15T06:30:00+00:00"
  }
}

Get a file's rows

Read the data inside one of the portal's files, such as a CSV, without downloading it: search its rows for words, keep only the rows whose columns hold given values, choose the columns, order and page through them. Works on any file whose is_queryable is true, which 'Get a dataset' and 'Get a file' report and which most of Madrid's CSV files are. Every answer also lists the file's columns and how many rows matched.

Inputs

FilefiletextRequired
The file's id, or a link to it. 'Get a dataset' and 'Search files' return the id of every file, such as 212411-0-madrid-avisa-csv; a file's title will not do.
Words to search forquerytext
Only rows containing these words in any column, in the file's own order unless 'Order by column' is set. Leave blank to read every row.
Column valuesfiltersobject
Only rows whose columns hold exactly these values: a column's name, and the value it must hold. Matching is exact, capitals and accents included, so copy a value from a row rather than retyping it. A list of values keeps rows holding any of them.
Columnscolumnslist
Only these columns, in this order. Leave blank for all of them. Names must match the file's own, which every answer lists under columns.
Leave out repeated rowsdistincttrue/false
Return each different row once. With 'Columns' set to DISTRITO, this lists the districts that appear in the file. Off by default.Default: false.
Order by columnorder_bytext
The column to order the rows by. Leave blank to keep the file's own order. A column stored as text orders as text does, so 10 comes before 9. Rows that tie keep the file's own order, so reading on with 'Skip' never repeats or misses one.
Orderdirectiontext
Which way to order by that column. Defaults to ascending.One of: asc (Ascending (A to Z, lowest first)), desc (Descending (Z to A, highest first)). Default: asc.
Number of rowslimitnumber
How many rows to return (1 to 1000). Defaults to 100. Use 'Skip' alongside it to read further into the file.From 1 to 1000. Default: 100.
Skipoffsetnumber
How many matching rows to skip before returning any. Defaults to 0. Set it to the number already read to fetch the next page.From 0 to 10000000. Default: 0.

Outputs

columnslist
Every column of the file, or the chosen ones, in order. _id is each row's position in the file, and rank how well it matched when searching for words.
filetext
The id of the file the rows were read from.
offsetnumber
How many matching rows were skipped.
result_countnumber
How many rows came back in this answer.
rowslist
The rows, each a record keyed by column name.
total_countnumber
How many rows match in the whole file, which says whether there is another page to read.
total_is_estimatetrue/false
Whether the portal estimated total_count rather than counting, which it may do for a very large file.
Example output
{
  "columns": [
    {
      "name": "_id",
      "type": "int"
    },
    {
      "name": "TIPO_INCIDENCIA",
      "type": "text"
    },
    {
      "name": "CANAL_DE_ENTRADA",
      "type": "text"
    },
    {
      "name": "FECHA_DE_RECEPCION",
      "type": "text"
    },
    {
      "name": "CATEGORIA_NIVEL1",
      "type": "text"
    },
    {
      "name": "CATEGORIA_NIVEL2",
      "type": "text"
    },
    {
      "name": "DISTRITO",
      "type": "text"
    },
    {
      "name": "BARRIO",
      "type": "text"
    }
  ],
  "file": "212411-0-madrid-avisa-csv",
  "offset": 0,
  "result_count": 1,
  "rows": [
    {
      "BARRIO": "Buenavista",
      "CANAL_DE_ENTRADA": "Madrid M\u00f3vil (Android)",
      "CATEGORIA_NIVEL1": "Arboles y parques",
      "CATEGORIA_NIVEL2": "Incidencias de riego",
      "DISTRITO": "Carabanchel",
      "FECHA_DE_RECEPCION": "01/01/2026",
      "TIPO_INCIDENCIA": "Aviso",
      "_id": 1
    }
  ],
  "total_count": 488939,
  "total_is_estimate": false
}

Get a preview

Read one preview on its own by its id, as returned by 'List a file's previews': its title, its description and which kind of viewer it is.

Inputs

PreviewviewtextRequired
The preview's id, as returned by 'List a file's previews'.

Outputs

viewobject
Example output
{
  "view": {
    "description": null,
    "id": "22643bdf-4cd1-4b5a-91c4-369761a0e3b1",
    "resource_id": "212411-0-madrid-avisa-csv",
    "title": "Data Explorer",
    "view_type": "recline_view"
  }
}

Get a tag

Read one tag by name, with how many datasets carry it. Use it to check that a tag a workflow filters on still exists before searching with it.

Inputs

TagtagtextRequired
The tag's name, exactly as the portal spells it.

Outputs

tagobject
Example output
{
  "tag": {
    "dataset_count": 37,
    "display_name": "avisos",
    "id": "5f4e3d2c-1b0a-4938-8271-6a5b4c3d2e1f",
    "name": "avisos",
    "tag_url": "https://datos.madrid.es/dataset?tags=avisos"
  }
}

Get follower count

Count the people following one dataset or one category on the portal: a rough measure of how much interest it attracts, which is how a workflow picks the datasets worth reporting on.

Inputs

Count followers ofrecord_typetext
Whether the name below is a dataset or a category. Defaults to dataset.One of: dataset, category. Default: dataset.
Dataset or categoryrecordtextRequired
The name, id or link of the dataset or category to count followers for.

Outputs

follower_countnumber
recordtext
record_typetext
Example output
{
  "follower_count": 12,
  "record": "212411-0-madrid-avisa",
  "record_type": "dataset"
}

Read the datasets the portal records as related to one dataset (a parent it derives from, a version it supersedes, or one it links to) together with the kind of relationship and any note the publisher left on it.

Inputs

DatasetdatasettextRequired
The dataset's name as it appears in its web address, its id, or a link to its page.

Outputs

datasettext
relationshipslist
result_countnumber
Example output
{
  "dataset": "212411-0-madrid-avisa",
  "relationships": [
    {
      "comment": null,
      "object": "212411-1-madrid-avisa-historico",
      "subject": "212411-0-madrid-avisa",
      "type": "links_to"
    }
  ],
  "result_count": 1
}

Get the category tree

Read the categories as a tree rather than a flat list: the portal's three families of categories (its own themes, the EU's high-value datasets and the UN Sustainable Development Goals), each carrying the categories inside it. Use it to show the catalog's own structure, or to walk from a broad heading down to the narrower ones inside it.

Inputs

None.

Outputs

categorieslist
result_countnumber
Example output
{
  "categories": [
    {
      "category_url": "https://datos.madrid.es/group/categorias",
      "children": [
        {
          "category_url": "https://datos.madrid.es/group/transporte",
          "dataset_count": 109,
          "description": null,
          "id": "3ddc560e-96f3-42d1-b85b-2345b7b565fa",
          "image_url": null,
          "name": "transporte",
          "state": "active",
          "title": "Transporte"
        }
      ],
      "dataset_count": 0,
      "description": null,
      "id": "4c1d2e3f-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
      "image_url": null,
      "name": "categorias",
      "state": "active",
      "title": "Categor\u00edas"
    }
  ],
  "result_count": 1
}

List a file's previews

List the previews the portal has configured on one file (a data table, a chart, a map or an embedded viewer) each with its own id and kind. A file with no preview is not an error: it simply comes back empty.

Inputs

FilefiletextRequired
The file's id, or a link to it. 'Get a dataset' and 'Search files' return the id of every file, such as 212411-0-madrid-avisa-csv; a file's title will not do.

Outputs

filetext
result_countnumber
viewslist
Example output
{
  "file": "3b1f2c40-9a77-4e51-8f1a-2c9d0e5b7a10",
  "result_count": 1,
  "views": [
    {
      "description": null,
      "id": "22643bdf-4cd1-4b5a-91c4-369761a0e3b1",
      "resource_id": "212411-0-madrid-avisa-csv",
      "title": "Data Explorer",
      "view_type": "recline_view"
    }
  ]
}

List categories

Read every category the portal files its datasets under (transport, environment, population, urban planning and the rest) each with its title, its description and how many datasets it holds. This is the vocabulary the search filter runs on, so it is what a workflow reads to decide which category to follow.

Inputs

None.

Outputs

categorieslist
result_countnumber
Example output
{
  "categories": [
    {
      "category_url": "https://datos.madrid.es/group/ods-11",
      "dataset_count": 12,
      "description": null,
      "id": "7c8d9e0f-1a2b-4c3d-9e8f-7a6b5c4d3e2f",
      "image_url": null,
      "name": "ods-11",
      "state": "active",
      "title": "Ciudades y Comunidades Sostenibles"
    }
  ],
  "result_count": 1
}

List datasets

List the names of the datasets in the catalog, in the portal's own order. Names only, which is the cheap way to see everything the portal holds; each one goes straight into 'Get a dataset'. Use 'Search datasets' instead when you want the records themselves.

Inputs

Number of nameslimitnumber
How many dataset names to return (1–1000). Defaults to 100.From 1 to 1000. Default: 100.
Skipoffsetnumber
How many results to skip before returning any. Defaults to 0. Set it to the number already read to fetch the next page.From 0 to 10000. Default: 0.

Outputs

nameslist
offsetnumber
result_countnumber
Example output
{
  "names": [
    "212411-0-madrid-avisa"
  ],
  "offset": 0,
  "result_count": 1
}

List licenses

Read the licenses datasets in the catalog are published under, each with its name, its full text online and whether it is an open license. This is what a workflow checks against a dataset's license before reusing its data.

Inputs

None.

Outputs

licenseslist
result_countnumber
Example output
{
  "licenses": [
    {
      "id": "cc-by",
      "is_open": true,
      "title": "Creative Commons Attribution",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  ],
  "result_count": 1
}

List recently updated datasets

Read what has changed across the whole catalog lately, most recent first, each entry naming the dataset it touched and when. Run it on a schedule to find out what Madrid has published or refreshed since the last time you looked.

Inputs

Number of resultslimitnumber
How many results to return (1–100). Defaults to 20. Use 'Skip' alongside it to read further down the list.From 1 to 100. Default: 20.
Skipoffsetnumber
How many results to skip before returning any. Defaults to 0. Set it to the number already read to fetch the next page.From 0 to 10000. Default: 0.

Outputs

activitieslist
offsetnumber
result_countnumber
Example output
{
  "activities": [
    {
      "activity_type": "changed package",
      "dataset_name": "212411-0-madrid-avisa",
      "dataset_title": "Avisos ciudadanos",
      "id": "0a1b2c3d-4e5f-4061-8273-8495a6b7c8d9",
      "object_id": "212411-0-madrid-avisa",
      "timestamp": "2026-09-15T06:30:00.000000",
      "timestamp_utc": "2026-09-15T06:30:00+00:00",
      "user_id": "2b3c4d5e-6f70-4812-9354-a6b7c8d9e0f1"
    }
  ],
  "offset": 0,
  "result_count": 1
}

List tags

Read every tag used across the catalog, alphabetically. Tags are finer-grained than categories and are what the search filter matches on, so this is how a workflow finds the exact word the portal files something under.

Inputs

None.

Outputs

result_countnumber
tagslist
Example output
{
  "result_count": 1,
  "tags": [
    {
      "dataset_count": 37,
      "display_name": "avisos",
      "id": "5f4e3d2c-1b0a-4938-8271-6a5b4c3d2e1f",
      "name": "avisos",
      "tag_url": "https://datos.madrid.es/dataset?tags=avisos"
    }
  ]
}

Search datasets

Search the whole Madrid catalog by words in a dataset's title, description or tags, and narrow it by category, tag, file format or publishing body. Picking several values for one filter widens the result (any of them matches); filling in different filters narrows it (all of them must match). Leave the words blank to browse a filter on its own: every dataset tagged 'movilidad', say, or every dataset updated since a given day. Each result comes back with its files, formats, license and when it was last updated.

Inputs

Words to search forquerytext
Words to match against titles, descriptions and tags. Leave blank to return everything the filters allow.
Categoriescategorieslist
Only datasets in these categories. A dataset in any one of them is included.
Tagstagslist
Only datasets carrying these tags. A dataset with any one of them is included. Use 'List tags' or 'Suggest' to find the ones the portal uses.
File formatsformatslist
Only datasets publishing a file in these formats, such as CSV, JSON, XML or GeoJSON.
Publishing bodyorganizationtext
Only datasets published by this body, named as it appears in its web address.
Updated sinceupdated_sincedate and time
Only datasets changed at or after this moment, read as UTC. A date on its own means from midnight. Pass the time of the last run to see only what has changed since.
Order bysorttext
How to order the results. Defaults to best match, which falls back to the most recently updated when no words were given.One of: relevance (Best match), recently_updated (Recently updated), recently_added (Recently added), oldest (Oldest first), title_asc (Title A–Z), title_desc (Title Z–A). Default: relevance.
Number of resultslimitnumber
How many results to return (1–100). Defaults to 20. Use 'Skip' alongside it to read further down the list.From 1 to 100. Default: 20.
Skipoffsetnumber
How many results to skip before returning any. Defaults to 0. Set it to the number already read to fetch the next page.From 0 to 10000. Default: 0.

Outputs

offsetnumber
querytext
result_countnumber
resultslist
total_countnumber
Example output
{
  "offset": 0,
  "query": "avisos",
  "result_count": 1,
  "results": [
    {
      "author": "Ayuntamiento de Madrid",
      "author_email": null,
      "categories": [
        {
          "description": null,
          "name": "ods-11",
          "title": "Ciudades y Comunidades Sostenibles"
        }
      ],
      "created": "2026-01-14T09:12:33.123456",
      "created_utc": "2026-01-14T09:12:33.123456+00:00",
      "dataset_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa",
      "description": "Avisos comunicados por la ciudadan\u00eda a trav\u00e9s de Madrid Avisa, con su tipo, su localizaci\u00f3n y el estado en que se encuentra cada uno.",
      "extras": {
        "frecuencia_actualizacion": "Mensual"
      },
      "formats": [
        "CSV",
        "JSON",
        "PDF",
        "XML"
      ],
      "id": "212411-0-madrid-avisa",
      "is_open": true,
      "is_private": false,
      "license_id": "cc-by",
      "license_title": "Creative Commons Attribution",
      "license_url": "https://creativecommons.org/licenses/by/4.0/",
      "maintainer": "\u00c1rea de Gobierno de Obras, Urbanismo y Equipamientos",
      "maintainer_email": null,
      "modified": "2026-09-15T06:30:00.000000",
      "modified_utc": "2026-09-15T06:30:00+00:00",
      "name": "212411-0-madrid-avisa",
      "organization": {
        "description": null,
        "id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "image_url": null,
        "name": "ayuntamiento-de-madrid",
        "title": "Ayuntamiento de Madrid"
      },
      "resource_count": 1,
      "resources": [
        {
          "created": "2026-01-14T09:12:33.123456",
          "created_utc": "2026-01-14T09:12:33.123456+00:00",
          "dataset_id": "212411-0-madrid-avisa",
          "description": "Avisos ciudadanos tramitados (SIC). 2026",
          "download_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa/resource/212411-0-madrid-avisa-csv/download/212411-0-madrid-avisa.csv",
          "format": "CSV",
          "id": "212411-0-madrid-avisa-csv",
          "is_queryable": true,
          "is_uploaded": true,
          "mimetype": "text/csv",
          "name": "212411-0-madrid-avisa-csv",
          "position": 0,
          "resource_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa/resource/212411-0-madrid-avisa-csv",
          "size_bytes": 2516582,
          "size_label": "2.4 MB",
          "state": "active",
          "updated_at": "2026-09-15T06:30:00.000000",
          "updated_at_utc": "2026-09-15T06:30:00+00:00"
        }
      ],
      "source_url": null,
      "state": "active",
      "tags": [
        "avisos",
        "madrid-avisa",
        "servicios-urbanos"
      ],
      "title": "Avisos ciudadanos",
      "version": null
    }
  ],
  "total_count": 1
}

Search files

Find files across the whole catalog by one of their own fields rather than by their dataset: every file whose name mentions 'padrón', or every GeoJSON the portal publishes. Pick the field to look in and give the term to look for; one field is matched at a time, which is all the portal offers here.

Inputs

Look infieldtext
Which of the file's fields to match the term against. Defaults to the file name.One of: name (File name), description, format (Format (CSV, JSON, XML…)), url (Download link), mimetype (MIME type). Default: name.
TermtermtextRequired
What to look for in the chosen field. Cannot contain a colon.
Number of resultslimitnumber
How many results to return (1–100). Defaults to 20. Use 'Skip' alongside it to read further down the list.From 1 to 100. Default: 20.
Skipoffsetnumber
How many results to skip before returning any. Defaults to 0. Set it to the number already read to fetch the next page.From 0 to 10000. Default: 0.

Outputs

fieldtext
offsetnumber
result_countnumber
resultslist
termtext
total_countnumber
Example output
{
  "field": "name",
  "offset": 0,
  "result_count": 1,
  "results": [
    {
      "created": "2026-01-14T09:12:33.123456",
      "created_utc": "2026-01-14T09:12:33.123456+00:00",
      "dataset_id": "212411-0-madrid-avisa",
      "description": "Avisos ciudadanos tramitados (SIC). 2026",
      "download_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa/resource/212411-0-madrid-avisa-csv/download/212411-0-madrid-avisa.csv",
      "format": "CSV",
      "id": "212411-0-madrid-avisa-csv",
      "is_queryable": true,
      "is_uploaded": true,
      "mimetype": "text/csv",
      "name": "212411-0-madrid-avisa-csv",
      "position": 0,
      "resource_url": "https://datos.madrid.es/dataset/212411-0-madrid-avisa/resource/212411-0-madrid-avisa-csv",
      "size_bytes": 2516582,
      "size_label": "2.4 MB",
      "state": "active",
      "updated_at": "2026-09-15T06:30:00.000000",
      "updated_at_utc": "2026-09-15T06:30:00+00:00"
    }
  ],
  "term": "avisos",
  "total_count": 1
}

Search tags

Find the tags whose names contain a word, rather than reading the whole list. Useful when you know roughly what the portal calls something ('bici', 'aire') but not the exact tag.

Inputs

TermtermtextRequired
The word to look for in tag names.
Number of resultslimitnumber
How many results to return (1–100). Defaults to 20. Use 'Skip' alongside it to read further down the list.From 1 to 100. Default: 20.
Skipoffsetnumber
How many results to skip before returning any. Defaults to 0. Set it to the number already read to fetch the next page.From 0 to 10000. Default: 0.

Outputs

offsetnumber
result_countnumber
tagslist
termtext
total_countnumber
Example output
{
  "offset": 0,
  "result_count": 1,
  "tags": [
    {
      "dataset_count": 37,
      "display_name": "avisos",
      "id": "5f4e3d2c-1b0a-4938-8271-6a5b4c3d2e1f",
      "name": "avisos",
      "tag_url": "https://datos.madrid.es/dataset?tags=avisos"
    }
  ],
  "term": "movil",
  "total_count": 1
}

Suggest names

Complete a partly-typed name against the portal's own vocabulary: dataset names, categories, tags or file formats. Every kind comes back as the same value-and-label pair, so this is what a workflow uses to turn something a person typed into a name the other actions will accept.

Inputs

Completetargettext
What kind of name to complete. Defaults to dataset.One of: dataset, category, tag, format (File format). Default: dataset.
Partial nametermtextRequired
What has been typed so far.
Number of suggestionslimitnumber
How many suggestions to return (1–50). Defaults to 10.From 1 to 50. Default: 10.

Outputs

result_countnumber
suggestionslist
targettext
termtext
Example output
{
  "result_count": 1,
  "suggestions": [
    {
      "label": "Avisos ciudadanos",
      "value": "212411-0-madrid-avisa"
    }
  ],
  "target": "dataset",
  "term": "avis"
}

On this page