dados.gov.pt API
Free Portuguese open data API with no key: government datasets covering health, education, environment, transport and public spending via udata. Tested.
Endpoint tested and returned HTTP 200 on 2026-08-20
What is the dados.gov.pt API?
dados.gov.pt is the free, key-free API for Portugal's national open data portal, providing government datasets across health, education, environment, transport and public administration.
Portugal's portal runs on udata, the same open source platform behind data.gouv.fr, which means the API shape is nearly identical between the two — code written for one adapts to the other with a hostname change.
Each dataset lists its resources with format and a direct download URL, so going from a search result to a usable CSV is a two-step process rather than screen-scraping a portal page.
Quick facts
- Base URL
https://dados.gov.pt/api/1- Authentication
- No API key required for reading public datasets.
- Rate limit
- No published hard limit; fair use expected.
- Pricing
- Free open data; individual datasets carry their own licences.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the dados.gov.pt API
Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.
1. Search Portuguese government datasets
GET https://dados.gov.pt/api/1/datasets/?page_size=1
curl 'https://dados.gov.pt/api/1/datasets/?page_size=1'const res = await fetch("https://dados.gov.pt/api/1/datasets/?page_size=1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://dados.gov.pt/api/1/datasets/?page_size=1", timeout=20)
res.raise_for_status()
print(res.json()){
"data": [
{
"access_audiences": [],
"access_type": "open",
"access_type_reason": null,
"access_type_reason_category": null,
"acronym": null,
"archived": null,
"authorization_request_url": null,
"badges": [],
"contact_points": [],
"created_at": "2026-08-17T18:28:20.550000+00:00",
"deleted": null,
"description": "<p>Este conjunto de dados identifica os websites dos Museus da Rede Portuguesa de Museus e de outros museus e núcleos museológicos de todo o país e fornece um link para ver o histórico preservado no Arquivo.pt, no caso de existir um.</p><p>As listas agora publicadas são as seguintes:</p><ul><li><p>Museus registados na RPM, 2025</p></li><li><p>Museus registados na RPM, 2021</p></li><li><p>Museus e núcleos museológicos (lista genérica), 2026</p></li></ul><p>O objetivo das listas de websites do Arquivo.pt é chamar a atenção para a preservação dos contéudos publicados nos sítios Web e, usando estas mesmas listas, melhorar a preservação de muitos que nem sequer se encontram ainda arquivados.</p><p>Como ponto de partida foram utilizadas listas existentes, como as da Rede Portuguesa de Museus. Quando não foi possível encontrar um website oficial indicou-se uma página Web relativa a esse museu ou núcleo museológico. Pode acontecer encontrar-se alguns links quebrados. Os endereços das páginas são mudados ao longo do tempo fazendo, por exemplo, os links que antes apontavam para um museu se quebrem. Identificou-se as páginas de Facebook por serem um canal muito usado pelas instituições. Em casos emParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
datasets/ | path | Optional | Dataset search and listing. datasets/ |
page_size | integer | Optional | Results per page. 20 |
page | integer | Optional | Page number. 2 |
q | string | Optional | Search query. saude |
organization | string | Optional | Filter by publishing organisation id. ... |
Response fields
dataarray- Matching datasets.
data[].titlestring- Dataset title, in Portuguese.
data[].descriptionstring- Description, often Markdown.
data[].organizationobject- Publishing body.
data[].resourcesarray- Downloadable files with format, URL and size.
data[].licensestring- Licence identifier.
total / page / page_sizeinteger- Pagination metadata.
What you can build with the dados.gov.pt API
- Discover Portuguese government datasets programmatically
- Automate downloads of updated public statistics
- Build civic tools for Portugal
- Compare against French data using the same udata code
Common errors and how to fix them
Portuguese-language metadata
Titles and descriptions are in Portuguese.
Fix: Expect this; there is no English layer.
Dead resource URLs
Files are hosted by the publishing body.
Fix: Resource links are not centrally validated — handle download failures.
Inconsistent formats
Publishers use CSV, XLSX, JSON and PDF.
Fix: Filter on resource format rather than assuming CSV.
dados.gov.pt API — frequently asked questions
Is dados.gov.pt free?
Yes, reading public datasets requires no API key. Publishing datasets requires an account.
Is it similar to the French open data API?
Yes — both run on udata, so the API shape is nearly identical. Code written for data.gouv.fr adapts to dados.gov.pt by changing the hostname.
Is the metadata in English?
No, it is in Portuguese, as expected from a Portuguese government portal.
How do I download a dataset?
Each dataset's resources array contains files with their format and a direct URL. Search first, then fetch the resource.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
CSV to JSON Converter
Convert CSV to a JSON array of objects online. Header-row detection, comma/semicolon/tab delimiters and pretty-printed output — 100% in your browser.
dados.gov.pt is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.