# Portugal Open Data API

> dados.gov.pt: 21,000 Portuguese public datasets, from road network length onwards, searchable

- Vendor: `portugalopendataapi` · version 1.0 · category Government Data · tags dados gov pt api, dados gov pt open data api, udata api, government open data api, open datasets api, public data catalog api
- Datasource: custom HTTP routes
- Marketplace page: https://apiclay.com/api/portugalopendataapi
- This document: https://apiclay.com/docs/portugalopendataapi.md
- OpenAPI 3.1: https://apiclay.com/api/portugalopendataapi/openapi.json
- MCP: connect https://api.apiclay.com/v1/mcp (see https://apiclay.com/llms.txt), then `apiclay_describe_api` with vendor `portugalopendataapi`
- Updated: 2026-11-18

## About

## Portugal Open Data API

The national open data portal of Portugal (dados.gov.pt, run on udata): about 21,005 datasets, for example the length of the national road network. Search datasets by keyword, organisation or tag, read any dataset with its resources and download links, and list the publishing organisations.

Data comes from **dados.gov.pt** (https://dados.gov.pt). Every route calls the source's own public API and returns it unchanged.

Typical flow: `/datasets?q=&amp;page_size=5`, then `/dataset?id=` for its resources.

### Routes

#### GET `/datasets` - Datasets
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| q | query | string | no | Keyword search. |
| organization | query | string | no | Organisation `id` from `/organizations`. |
| tag | query | string | no | Tag. |
| sort | query | string | no | e.g. `-created` or `-last_update`. |
| page | query | number | no | Page, from 1. |
| page_size | query | number | no | Datasets per page (up to 100). |

Returns: `total` and `data`: datasets with `id`, `slug`, `title`, `description`, `organization`, `tags`, `license`, `last_update` and `resources` (`id`, `title`, `format`, `url`).

#### GET `/dataset` - Dataset
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Dataset `id` or `slug` from `/datasets`. |

Returns: one dataset with all its `resources` and download URLs.

#### GET `/organizations` - Organizations
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| q | query | string | no | Name search. |
| page | query | number | no | Page, from 1. |
| page_size | query | number | no | Organisations per page. |

Returns: `total` and `data`: publishing organisations with `id`, `name`, `slug` and metrics.

### Caveats

- Text is in the portal's language.
- Some datasets name individuals (licence holders, employees, drivers, arrestees) as published by the government; handle them under applicable privacy law.
- Each dataset carries its own licence (`license`); credit Portugal.
- Upstream responses can change over time. Verify fields before relying on them.
- Not affiliated with or endorsed by dados.gov.pt.

## Pricing

- Pay as you go: 0.0012 credits/request
- Trial: 1 free requests per buyer
- Billing order: trial requests -> subscribed plan requests -> pay as you go. 1 credit's USD value is shown on the marketplace page.

## HTTP routes

Only the public, buyer-facing parts of each route are listed; vendor-side credentials stay on the gateway.

### GET /datasets — Datasets
- Gateway: `GET https://api.apiclay.com/v1/api/portugalopendataapi/datasets`
- Public query params: `q` (string), `organization` (string), `tag` (string), `sort` (string), `page` (number), `page_size` (number)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /dataset — Dataset
- Gateway: `GET https://api.apiclay.com/v1/api/portugalopendataapi/dataset`
- Public query params: `id` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /organizations — Organizations
- Gateway: `GET https://api.apiclay.com/v1/api/portugalopendataapi/organizations`
- Public query params: `q` (string), `page` (number), `page_size` (number)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

## Call example

```bash
curl -X GET "https://api.apiclay.com/v1/api/portugalopendataapi/datasets" \
  -H "token: <YOUR_APICLAY_TOKEN>"
```

Index of every published API: https://apiclay.com/llms.txt
