# CKAN on Onekey > 5 endpoints for CKAN (5 stable, 0 beta), 1 to 5 credits each. Category: Government & public data. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/ckan Reference (Markdown): https://onekey.dev/docs/api/ckan.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 5 mapped CKAN endpoints return each: - `entity.date` (ISO 8601 date): 5 - `entity.description` (string): 5 - `entity.id` (string): 5 - `entity.name` (string): 5 - `entity.slug` (string): 5 - `entity.category` (string): 3 - `package.license` (string): 3 - plus 1 platform-specific field under `ext.` ## Endpoints ### ckan.australia_search Search Australian open government datasets (data.gov.au, CKAN). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/ckan/australia_search?q=climate&rows=3` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search text - `rows` (string, optional, default 10): Rows (1-50) - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.slug`, `entity.category`, `entity.date`, `package.license`, `ext.resources` - Reference: https://onekey.dev/docs/api/ckan/australia_search.md ### ckan.canada_search Search Canadian open government datasets (open.canada.ca, CKAN). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/ckan/canada_search?q=climate&rows=3` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search text - `rows` (string, optional, default 10): Rows (1-50) - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.slug`, `entity.date`, `ext.resources` - Reference: https://onekey.dev/docs/api/ckan/canada_search.md ### ckan.swiss_search Search Swiss open government datasets (opendata.swiss, CKAN; titles are German). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/ckan/swiss_search?q=climate&rows=3` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search text - `rows` (string, optional, default 10): Rows (1-50) - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.slug`, `entity.date`, `ext.resources` - Reference: https://onekey.dev/docs/api/ckan/swiss_search.md ### ckan.uk_dataset One UK government dataset by name/slug (data.gov.uk). - Price: 1 credit per fresh call. Status: stable. Returns: one record. - Request: `GET https://api.onekey.dev/v1/ckan/uk_dataset?id=climate-resilience-documents` with header `x-api-key: YOUR_API_KEY` - Parameters: - `id` (string, required): Dataset id or slug - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.slug`, `entity.category`, `entity.date`, `package.license`, `ext.resources` - Reference: https://onekey.dev/docs/api/ckan/uk_dataset.md ### ckan.uk_search Search UK government open datasets (data.gov.uk, CKAN). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/ckan/uk_search?q=climate&rows=3` with header `x-api-key: YOUR_API_KEY` - Parameters: - `q` (string, required): Search text - `rows` (string, optional, default 10): Rows (1-50) - Fields returned: `entity.id`, `entity.name`, `entity.description`, `entity.slug`, `entity.category`, `entity.date`, `package.license`, `ext.resources` - Reference: https://onekey.dev/docs/api/ckan/uk_search.md ## Sample request ```bash curl "https://api.onekey.dev/v1/ckan/uk_dataset?id=climate-resilience-documents" \ -H "x-api-key: YOUR_API_KEY" ```