Query a Nova Scotia Open Dataset
query_datasetRun a SoQL query against a Nova Scotia Open Data dataset. SoQL is SQL-like.
Key clauses (combine with &): $select=col1,col2 — choose columns $where=field='value' — filter rows (use single quotes for strings) $where=field like '%val%' — partial match $order=field DESC — sort $limit=50 — row count (default 25, max 50000) $offset=50 — pagination $group=field — group by (use with aggregate functions) $q=search term — full-text search
Aggregates: count(*), sum(col), avg(col), min(col), max(col)
Examples: $where=year='2024'&$order=total DESC&$limit=10 $select=department,count()&$group=department&$order=count() DESC $where=area like '%Halifax%'&$limit=5
Always call get_dataset_metadata first to find exact field names.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| soql | No | SoQL query string. Multiple clauses joined with '&'. String values in $where must use single quotes: field='value'. Do NOT URL-encode — pass the raw string. | |
| limit | No | Max rows to return (1–1000, default 25). Ignored if $limit is in soql. | |
| dataset_id | Yes | 8-character Socrata dataset identifier (e.g. '3nka-59nz') |