Sign inTry it

Search Canadian open datasets.

Searches the Government of Canada Open Government portal datasets through its public CKAN catalogue API, the same search its dataset catalogue uses: dataset title, publishing organisation, description, last modified date and dataset page link. First 20 results, most relevant first, plus the total number of matches. The search page on the site itself shows no results at the moment, so this uses the catalogue API.

No reports yetRead-only, no login
Site
Open Government Portal Canada, Canada
Version
v1
Runs, last 7 days
No reports yet
sha256
9fa8b6a8f0a6…

Run it with your agent

after installing Wield

Ask in plain words. Your agent finds this recipe and calls it:

“Search Canadian open datasets.”

Read-only: it changes nothing on the site. No login needed.

{
  "tool": "run",
  "arguments": {
    "recipe_id": "open.canada.ca/search-open-data",
    "params": {
      "query": "housing"
    }
  }
}

Requests

sent from your browser, in order
  1. 1GET/data/api/3/action/package_search?q&rowsPublic CKAN catalogue API of the Open Government portal: GET /data/api/3/action/package_search?q=…&rows=20. No key, read-only. result.results holds the datasets, result.count the total.

Parameters

from your agent
querystringrequiredTopic or keyword for the dataset, e.g. 'housing', 'climate', 'census'

Returns

to your agent
datasetsobject[]description, modified, organization, resource_count, title, url
querystring
totalintegerNumber of matching datasets in the whole catalogue

Where it can send

  • open.canada.ca

Anything else is blocked by the extension.

Reads from your session

Nothing. Your browser attaches the site's cookies by itself.

Used only in requests to the addresses on the left. Never sent to wield.run or your agent.

Checks

a run passes when
  • length(output.datasets) > `0`
  • length(output.datasets[?starts_with(url, 'https://open.canada.ca/data/en/dataset/')]) == length(output.datasets)
  • length(output.datasets[?title != `null`]) == length(output.datasets)

Raw recipe

Served as canonical JSON from /api/v1/recipes/open.canada.ca/search-open-data, so its sha256 matches the ETag and the index.

Check it yourself
curl -s https://wield.run/api/v1/recipes/open.canada.ca/search-open-data | shasum -a 256
# 9fa8b6a8f0a668bd5e81d0a202ecc93d3b362efc331d443b82d9bb5b6e28f827
open.canada.ca/search-open-data.json, v1
{
  "description": "Searches the Government of Canada Open Government portal datasets through its public CKAN catalogue API, the same search its dataset catalogue uses: dataset title, publishing organisation, description, last modified date and dataset page link. First 20 results, most relevant first, plus the total number of matches. The search page on the site itself shows no results at the moment, so this uses the catalogue API.",
  "effect": "read",
  "id": "open.canada.ca/search-open-data",
  "keywords": [
    "open.canada.ca",
    "open government",
    "canada",
    "canadian",
    "datasets",
    "open data",
    "government data",
    "statistics",
    "housing",
    "climate",
    "census",
    "données ouvertes",
    "gouvernement du canada"
  ],
  "output": {
    "schema": {
      "properties": {
        "datasets": {
          "items": {
            "properties": {
              "description": {
                "description": "Dataset notes, may contain line breaks",
                "type": [
                  "string",
                  "null"
                ]
              },
              "modified": {
                "description": "Last modified timestamp, ISO 8601",
                "type": [
                  "string",
                  "null"
                ]
              },
              "organization": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "resource_count": {
                "description": "Number of files or resources in the dataset",
                "type": [
                  "integer",
                  "null"
                ]
              },
              "title": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "title",
              "url"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "query": {
          "type": "string"
        },
        "total": {
          "description": "Number of matching datasets in the whole catalogue",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "query",
        "datasets"
      ],
      "type": "object"
    },
    "value": "{query: params.query, total: steps.search.total, datasets: steps.search.datasets[?id != `null` && title != `null`].{title: title, url: join('', ['https://open.canada.ca/data/en/dataset/', id]), organization: organization.title, description: notes, modified: metadata_modified, resource_count: num_resources}}"
  },
  "params": {
    "additionalProperties": false,
    "properties": {
      "query": {
        "description": "Topic or keyword for the dataset, e.g. 'housing', 'climate', 'census'",
        "maxLength": 100,
        "minLength": 2,
        "type": "string"
      }
    },
    "required": [
      "query"
    ],
    "type": "object"
  },
  "provenance": {
    "method": "har",
    "notes": "GET /data/api/3/action/package_search?q=…&rows=20 on open.canada.ca, the public CKAN catalogue API. The HTML search page at /en/search?q= renders no results in the current response, so the API is used. Title, notes, organization title, metadata_modified and num_resources come from each result. The link is the dataset page /data/en/dataset/<id>, which returned 200 for a sample id. robots.txt does not disallow the API path.",
    "recorded_at": "2026-11-08T16:50:00.000Z",
    "recorded_by": "wield-forge (claude-haiku agent)"
  },
  "requires_login": false,
  "schema": "https://wield.run/schema/recipe/v1.json",
  "site": {
    "country": "CA",
    "id": "open.canada.ca",
    "language": "en",
    "name": "Open Government Portal Canada",
    "origin": "https://open.canada.ca",
    "origins": [
      "https://open.canada.ca"
    ]
  },
  "steps": [
    {
      "description": "Public CKAN catalogue API of the Open Government portal: GET /data/api/3/action/package_search?q=…&rows=20. No key, read-only. result.results holds the datasets, result.count the total.",
      "expect": {
        "assert": "status == `200` && body.success == `true` && type(body.result.results) == 'array'",
        "content_type": "json",
        "status": [
          200
        ]
      },
      "extract": {
        "json": {
          "datasets": "result.results",
          "total": "result.count"
        }
      },
      "id": "search",
      "request": {
        "headers": {
          "Accept": "application/json"
        },
        "method": "GET",
        "query": {
          "q": "{{params.query}}",
          "rows": 20
        },
        "url": "/data/api/3/action/package_search"
      }
    }
  ],
  "task": "Search Canadian open datasets",
  "tos": {
    "notes": "Not reviewed. One search page per call, the same page a visitor loads. The site's terms on automated access were not checked.",
    "reviewed": false
  },
  "verify": {
    "checks": [
      "length(output.datasets) > `0`",
      "length(output.datasets[?starts_with(url, 'https://open.canada.ca/data/en/dataset/')]) == length(output.datasets)",
      "length(output.datasets[?title != `null`]) == length(output.datasets)"
    ],
    "example_params": {
      "query": "housing"
    },
    "max_ms": 5000
  },
  "version": 1
}