Open Government, Portugal API

Government / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

The Portugal Open Government Data API (dados.gov.pt) gives developers free access to official datasets from Portuguese government agencies, including statistics on population, economy, and public services. No authentication is required, and it supports a documented REST API. The platform is built on CKAN, making it consistent with many other European open data portals.

💡

Beginner Tip

Explore the API documentation at "https://dados.gov.pt/en/docapi/" to see all available endpoints. Use the "package_search" action to find datasets by keyword — many datasets include both Portuguese and English metadata.

Available Data

Use case: Integrate portugal government open data data into web and mobile applications
Open Government, Portugal data via REST API
JSON-formatted response data
Freely accessible without authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Open Government, Portugal",
    "description": "Portugal Government Open Data",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

success True if the API action completed without errors.
count Number of datasets returned for the query.
results Array of dataset objects matching the search criteria.
title Human-readable title of the dataset (often in Portuguese).
license_title The open license under which the dataset is published.
resources Downloadable files or data endpoints included in the dataset.

Implementation Example

const url = "https://dados.gov.pt/en/docapi/";
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

No results for English search terms Dataset titles and descriptions may only be available in Portuguese.
Try Portuguese keywords (e.g., "populacao", "saude", "transportes") or browse the web portal to find dataset identifiers.
Connection refused or timeout The server may be temporarily down for maintenance.
Retry after a few minutes and add error handling with exponential backoff in your application.
404 for dataset resource The resource URL stored in the dataset may link to a file that was moved or deleted.
Re-fetch the dataset metadata to check for updated resource URLs before attempting downloads.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 388ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Government
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →