query_dataset
Run SoQL queries on Socrata datasets to filter, group, and aggregate data with SQL-like clauses, returning up to 1000 rows per call.
Instructions
Run a SoQL query against a dataset. Clauses mirror SQL: e.g. select='borough, count(*) as n', where="created_date > '2026-01-01'", group='borough', order='n DESC'. Rows are capped at 1000 per call.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dataset_id": "<dataset_id>"
},
"name": "query_dataset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | ||
| limit | No | ||
| order | No | ||
| where | No | ||
| domain | No | data.cityofnewyork.us | |
| offset | No | ||
| select | No | ||
| dataset_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |