open.canada.ca API
Free Canadian government open data API with no key: 47,000+ federal datasets with every text field mirrored in English and French. Tested curl example and live response.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the open.canada.ca API?
open.canada.ca is Canada's federal open data portal, exposing a free, key-free CKAN API. It covers more than 47,000 datasets from federal departments and agencies, and because of the Official Languages Act every human-readable field arrives as an object with `en` and `fr` keys rather than a plain string.
Canada's portal is the one to study if you want to see what bilingualism does to an API schema. Titles, notes, keywords, contributor names and data series names are not strings here — they are objects keyed `en` and `fr`, and both halves are populated for federal records because publishing in one language only is not legally an option. Client code written against Ireland's or Italy's CKAN will read `title` and get `[object Object]`.
The other thing worth knowing is what dominates the catalogue. A large share of the 47,000 records are proactive disclosure files — contracts over $10,000, travel and hospitality expenses, position reclassifications, grants and contributions — published quarterly under the Access to Information regime. They carry `collection: "primary"` and a `frequency` expressed as an ISO 8601 duration such as `P3M`, not as the words "quarterly". Filter on `jurisdiction` to separate federal records from the provincial and municipal ones that are harvested in.
Quick facts
- Base URL
https://open.canada.ca/data/en/api/3/action- Authentication
- No API key for reads. The `/data/en/` and `/data/fr/` prefixes serve the same catalogue; the language only changes the CKAN interface strings, not the bilingual data fields.
- Rate limit
- No published limit. Records carry heavy bilingual metadata, so keep `rows` small.
- Pricing
- Free. Federal datasets are released under the Open Government Licence – Canada, which permits commercial reuse with attribution.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the open.canada.ca API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Search Canadian federal datasets
GET https://open.canada.ca/data/en/api/3/action/package_search?rows=1
curl 'https://open.canada.ca/data/en/api/3/action/package_search?rows=1'const res = await fetch("https://open.canada.ca/data/en/api/3/action/package_search?rows=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://open.canada.ca/data/en/api/3/action/package_search?rows=1", timeout=20)
res.raise_for_status()
print(res.json()){
"help": "https://open.canada.ca/data/en/api/3/action/help_show?name=package_search",
"success": true,
"result": {
"count": 47792,
"facets": {},
"facet_ranges": {
"portal_release_date": {
"counts": [
"1926-08-21T00:00:00Z",
26102
],
"gap": "+100YEARS",
"start": "1926-08-21T00:00:00Z",
"end": "2126-08-21T00:00:00Z"
}
},
"results": [
{
"association_type": [],
"audience": [],
"author": null,
"author_email": null,
"collection": "primary",
"contributor": {
"en": "",
"fr": ""
},
"creator": "",
"creator_user_id": "aa584ab4-544c-4c5c-81da-d1cff9bd96fa",
"data_series_issue_identification": {
"en": "",
"fr": ""
},
"data_series_name": {
"en": "",
"fr": ""
},
"date_published": "2017-02-14 00:00:00",
"digital_object_identifier": "",
"display_flags": [],
"frequency": "P3M",
"geographic_region": [],
"id": "f132b8a6-abad-43d6-b6ad-2301e778b1b6",
"imso_approval": "true",
"isopen": false,
"jurisdiction": "federal",
"keywords": {
"en": [
"Proactive Disclosure",
"PD",
"position reclassification"
],
"fr": [
"Divulgation proactive",
"reclassification des postes"
]
},
"license_id": "ca-ogl-lgo",
"license_title": "Open Government LicParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | query | Optional | Free-text Solr query across titles, notes and keywords in both languages. census |
rows | query | Optional | Datasets per page. Defaults to 20. 1 |
start | query | Optional | Pagination offset, used with `rows`. 0 |
fq | query | Optional | Filter query. `jurisdiction:federal` and `collection:primary` are the two most useful narrowing filters here. jurisdiction:federal |
sort | query | Optional | Sort order, for example most recently changed first. metadata_modified desc |
Response fields
successboolean- Whether the CKAN action succeeded. Check it — CKAN answers HTTP 200 with `success: false` when it rejects your parameters.
result.countinteger- Total datasets matching the query. 47,792 for an unfiltered search at the time of testing.
results[].title / notes / keywordsobject- Bilingual objects keyed `en` and `fr`, not strings. This is the single biggest difference from other CKAN portals.
results[].jurisdictionstring- `federal`, `provincial` or `municipal` — the portal harvests beyond the federal government.
results[].collectionstring- `primary` for ordinary datasets, and separate values for proactive disclosure and publication records.
results[].frequencystring- Update cadence as an ISO 8601 duration such as `P3M` (three months) or `P1Y`, not as an English word.
results[].imso_approvalstring- Whether the Information Management Senior Official signed off. A Canadian government workflow field with no equivalent elsewhere.
result.facet_rangesobject- Date histogram over `portal_release_date`, returned even when you requested no facets.
What you can build with the open.canada.ca API
- Pull Canadian federal contract and travel expense disclosures on a schedule
- Build a bilingual dataset search that shows French titles to French users
- Harvest federal metadata into a catalogue that also indexes other CKAN portals
- Track which departments publish most, using the `organization` field
- Locate direct CSV and shapefile URLs from the `resources` array
Common errors and how to fix them
HTTP 200 with success false
CKAN accepted the request but rejected the parameters.
Fix: Read `error.message` in the body. A malformed `fq` is the usual culprit.
400
Broken Solr syntax in `q` or `fq`.
Fix: Unbalanced quotes and stray colons break the parser. Test the query in the portal's own search box first.
Titles render as [object Object]
You treated a bilingual field as a string.
Fix: Read `title.en` or `title.fr`, and fall back to the other language when one side is empty.
Slow responses
Large `rows` values pulling full bilingual metadata for every record.
Fix: Keep `rows` at 20 or below and page with `start`.
open.canada.ca API — frequently asked questions
Is the open.canada.ca API free?
Yes. All read operations are free and need no API key or registration. Only publishing datasets requires a departmental account.
Why are the titles objects instead of strings?
Canada's Official Languages Act requires federal information in both English and French, so CKAN's text fields were extended into `{en, fr}` objects. Any client written for a single-language CKAN portal needs a small shim to pick a language and fall back when one side is blank.
What licence covers Canadian open data?
Federal datasets use the Open Government Licence – Canada, which allows commercial reuse with attribution. Harvested provincial and municipal records may carry different licences, so read `license_id` on each dataset.
Does the /data/fr/ path return different data?
No. It serves the same catalogue with the CKAN interface strings in French. The bilingual data fields are identical either way, so pick whichever prefix you like and read the language you need from the field itself.
Tools that pair with this API
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.
JSON to CSV Converter
Convert a JSON array of objects to CSV online. Automatic column headers from the union of all keys, delimiter choice and proper quoting — all in-browser.
JSON Path Finder
Evaluate a dot/bracket path against your JSON and list every leaf path for discovery. Free online JSON path finder that runs 100% in your browser.
open.canada.ca is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.