Skip to contents

Convenience wrapper over morie_ingest_ckan_package_search that flattens the most-useful columns into a single data.frame: id, name, title, organization, license_id, metadata_modified, num_resources, url (the canonical <portal>/dataset/<name> URL).

Usage

morie_ingest_ckan_search_packages(
  portal,
  query,
  rows = 50L,
  api_key = NULL,
  user_agent = .MORIE_CKAN_DEFAULT_UA,
  timeout = .MORIE_CKAN_DEFAULT_TIMEOUT
)

Arguments

portal

Base URL of the CKAN portal.

query

Free-text query string.

rows

Maximum rows to return (default 50).

api_key

Optional CKAN API key.

user_agent

User-Agent header sent with the request.

timeout

HTTP timeout in seconds.

Value

A base R data.frame.

Examples

try(morie_ingest_ckan_search_packages("https://open.canada.ca/data",
  query = "crime", rows = 1L))
#>                                     id                                 name
#> 1 0d439f64-3365-40ca-8015-341f78f2ed19 0d439f64-3365-40ca-8015-341f78f2ed19
#>                 title                                      organization
#> 1 International crime Global Affairs Canada | Affaires mondiales Canada
#>   license_id          metadata_modified num_resources
#> 1 ca-ogl-lgo 2026-08-20T17:42:08.085935             4
#>                                                                        url
#> 1 https://open.canada.ca/data/dataset/0d439f64-3365-40ca-8015-341f78f2ed19