query_records
Query and filter Vancouver Open Data records with ODSQL: refine by criteria, paginate results, and return GeoJSON geometry for geographic datasets.
Instructions
Query and filter records within a dataset using ODSQL (where/select/order_by/group_by/q/refine), with pagination via limit/offset. For geographic datasets, results may include a geom GeoJSON field. Call get_dataset first if you don't know the field names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Full text search within the dataset's records | |
| limit | No | ||
| where | No | ODSQL boolean expression, e.g. "category1='City projects'" | |
| offset | No | ||
| refine | No | Repeatable facet filters, each formatted as "field:value". Use get_facets to discover valid values. | |
| select | No | Comma-separated field list or ODSQL expressions to return | |
| groupBy | No | ODSQL group_by expression, used with aggregation in select | |
| orderBy | No | ODSQL order_by expression, e.g. "name asc" | |
| datasetId | Yes | The dataset_id, e.g. "greenest-city-projects" |