Find an API

Search public APIs with auth details & Postman guides

← All APIs

Open Government Canada CKAN API

open.canada.ca · Government

Government No Auth Free & Open Government Open Data Government Datasets

The federal Open Government Portal (open.canada.ca) exposes Canada's open datasets via the CKAN API standard. Provides access to 97,000+ government datasets from 100+ federal departments covering health, environment, geospatial, economic, demographic, and public safety data. No authentication required for read access. Supports search, filtering, and direct dataset download. CKAN is used by Canadian provincial portals as well.

Authentication

No authentication requiredFree to use with no key needed.

Sample Requests

GET Search datasets

Searches the federal open data catalog. Returns dataset metadata including title, description, publisher, and download URLs. Use q parameter for keywords.

https://open.canada.ca/data/api/3/action/package_search?q=insurance&rows=10&start=0

Hover any highlighted part to learn what it does

curl -X GET "https://open.canada.ca/data/api/3/action/package_search?q=insurance&rows=10&start=0"
import requests
params = {
    "q": "insurance",
    "rows": "10",
    "start": "0"
}
response = requests.get(
    "https://open.canada.ca/data/api/3/action/package_search",
    params=params,
)
print(response.json())
const url = new URL('https://open.canada.ca/data/api/3/action/package_search');
url.searchParams.set('q', 'insurance');
url.searchParams.set('rows', '10');
url.searchParams.set('start', '0');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://open.canada.ca/data/api/3/action/package_search")
	q := baseURL.Query()
	q.Set("q", "insurance")
	q.Set("rows", "10")
	q.Set("start", "0")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://open.canada.ca/data/api/3/action/package_search")
uri.query = URI.encode_www_form({
  "q" => "insurance",
  "rows" => "10",
  "start" => "0"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://open.canada.ca/data/api/3/action/package_search?" . http_build_query([
    "q" => "insurance",
    "rows" => "10",
    "start" => "0"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET Get dataset details

Returns full metadata and resource URLs for a specific dataset by its ID or slug.

https://open.canada.ca/data/api/3/action/package_show?id=c4b28a62-ef85-4866-a016-72e8a2948f70

Hover any highlighted part to learn what it does

curl -X GET "https://open.canada.ca/data/api/3/action/package_show?id=c4b28a62-ef85-4866-a016-72e8a2948f70"
import requests
params = {
    "id": "c4b28a62-ef85-4866-a016-72e8a2948f70"
}
response = requests.get(
    "https://open.canada.ca/data/api/3/action/package_show",
    params=params,
)
print(response.json())
const url = new URL('https://open.canada.ca/data/api/3/action/package_show');
url.searchParams.set('id', 'c4b28a62-ef85-4866-a016-72e8a2948f70');

const response = await fetch(url); 
const data = await response.json();
console.log(data);
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	baseURL, _ := url.Parse("https://open.canada.ca/data/api/3/action/package_show")
	q := baseURL.Query()
	q.Set("id", "c4b28a62-ef85-4866-a016-72e8a2948f70")
	baseURL.RawQuery = q.Encode()
	targetURL := baseURL.String()
	req, _ := http.NewRequest("GET", targetURL, nil)

	client := &http.Client{}
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require "net/http"
require "json"

uri = URI("https://open.canada.ca/data/api/3/action/package_show")
uri.query = URI.encode_www_form({
  "id" => "c4b28a62-ef85-4866-a016-72e8a2948f70"
})

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"

req = Net::HTTP::Get.new(uri)

res = http.request(req)
puts JSON.parse(res.body)
<?php
$url = "https://open.canada.ca/data/api/3/action/package_show?" . http_build_query([
    "id" => "c4b28a62-ef85-4866-a016-72e8a2948f70"
]);
$opts = ["http" => [
    "method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));

Postman Setup Guide

Get Postman ↗
  1. No API key needed for search and read — open.canada.ca data is publicly accessible
  2. Base URL: https://open.canada.ca/data/api/3/action/
  3. Search datasets: package_search?q={keyword}&rows=10&organization={org}
  4. Get specific dataset: package_show?id={dataset_id_or_slug}
  5. List organizations (departments): organization_list
  6. Download actual data via the resource.url field in the dataset response
  7. Datasets are available in CSV, JSON, XML, GeoJSON, and other formats

What can you build with Open Government Canada CKAN API?

Open Government Canada CKAN API is a Government API. Developers commonly use government APIs for:

  • surfacing public datasets in citizen-facing apps
  • building transparency and civic engagement tools
  • accessing legislation, court records, and official data
  • powering research and journalism tools
  • creating compliance and regulatory monitoring dashboards

No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Open Government Canada CKAN API is free to use, making it a low-risk choice to experiment with.

New to APIs? Read our beginner's guide · Learn about API keys · What is REST?

Open documentation ↗