---
title: "Query any dataset (generic form)"
method: GET
path: "/v1/datasets/{id}/query"
---

# Query any dataset (generic form)

`GET /v1/datasets/{id}/query`

## Request

- Base URL: `https://datascoop.io`
- URL: `https://datascoop.io/v1/datasets/{id}/query`
- Auth: one of:
  - none
  - HTTP bearer
  - API key in query parameter `api_key`

Filters are query parameters named after the dataset's filter keys (see GET /v1/datasets/{id}). The per-dataset operations below list them explicitly.

## Path parameters

- `id` 'cqc' | 'fsa' | 'us-food-inspections' | 'us-building-permits' | 'fhis-scotland' | 'charity-commission' | 'companies-house' | 'us-motor-carriers' | 'us-business-licenses' | 'us-liquor-licenses' | 'au-aged-care', required

## Query parameters

- `limit` integer
- `offset` integer
- `format` 'json' | 'csv'

## Response `200`

Matching rows

- QueryResult
  - `dataset` string, required
  - `plan` 'free' | 'pro'
  - `total` integer, required: Rows matching the filters
  - `returned` integer, required
  - `offset` integer
  - `truncated` boolean, required: true when fewer rows than total were returned
  - `ignored` string[]: Filter keys the dataset does not know
  - `columns` object[]
    - `key` string
    - `label` string
  - `rows` object[], required
  - `attribution` string, required: Keep this with the data
  - `licence` string
  - `next_step` object: Present when the plan capped the result: links and wording for getting every row
    - `message` string
    - `buy_export_url` string, uri
    - `signup_url` string, uri
    - `pricing_url` string, uri

## Other responses

- `404`: Unknown dataset

---

[API](https://skmtc.dev/datascoop/apis/datascoop-api.md) · [All operations](https://skmtc.dev/datascoop/apis/datascoop-api/llms.txt) · [OpenAPI document](https://skmtc.dev/datascoop/apis/datascoop-api/revisions/102c5cf316da?raw)
