Open Government, Canada API

Free to Use Varies (check documentation)

Overview

The Open Government Canada API provides free access to the Canadian federal government's open data catalog, with thousands of datasets on topics ranging from climate and agriculture to health and justice. No API key is needed to get started. The portal uses the CKAN platform, making it compatible with standard open data tooling.

💡

Beginner Tip

Canada's portal offers bilingual (English/French) metadata; use the API at https://open.canada.ca/data/en/api/3/action/package_search to search datasets in English, or replace /en/ with /fr/ for French results.

Available Data

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

Example Response

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

Field Reference

success Indicates successful processing of the API request.
result Contains count and results array for search calls.
count Total number of datasets matching the search query.
title Bilingual title with en and fr language keys.
resources List of data files or services linked to the dataset, each with its own url and format.
license_title The open license under which the dataset is published.

Implementation Example

const url = "http://open.canada.ca/en";
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

Connection refused on http:// URL The portal redirects HTTP to HTTPS but some older documentation still lists the http:// URL.
Always use https://open.canada.ca instead of the http:// variant to avoid redirect issues.
Dataset has no downloadable resource Some entries in the catalog are metadata-only or point to external services.
Check the resource_type field in each resource object; look for file or api types to find downloadable content.
Rate limiting Too many rapid requests to the search endpoint.
Add a short delay between requests and use the rows and start parameters to paginate efficiently.

Matrix Score Breakdown

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

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS NO
CORS UNKNOWN
Category Government
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →