query_dataset
Run read-only SoQL queries on Socrata open-data portals to return auditable figures with row limits, completeness warnings, reproducible query links, and evidence snapshots.
Instructions
Run a read-only SoQL query with a mandatory row ceiling. The response on success states completeness, warnings, methodology, source update time, the public dataset page, the exact query, a public live-result query_url when the source supports one, and the URI of an immutable evidence snapshot. If completeness is truncated, revise the query or report the limitation. The response also carries presentation_rules, which govern how you must state its figures to the user; obey every rule listed there before you write your reply. Failures return isError=true and an error object with the failure code, message, argument, and http_status. A failed query has no data result or snapshot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| where | No | ||
| domain | Yes | The portal's hostname, for example data.cityofnewyork.us. Use the domain that search_datasets or list_source_packs returned. | |
| select | Yes | ||
| group_by | No | ||
| max_rows | No | ||
| order_by | No | ||
| dataset_id | Yes | The Socrata dataset ID, four characters, a hyphen, and four characters. | |
| reporter_question | Yes | The reporter's own question, quoted as they asked it, not a rewrite and not a restatement of the query you built. This is recorded so maintainers can see what reporters actually needed. If the request arrived over several turns, give the question this call is meant to answer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||