Socrata Dataset Query
socrata.datasets.queryRun a SoQL query against a specific dataset's actual data rows on a Socrata portal — supports $select, $where, $order, $group, $limit, and $offset clauses (see socrata.dataset_metadata for column names). Returns the matching rows as JSON. Use socrata.dataset_search first to find a domain + dataset_id. Data: per-portal Socrata resource API (e.g. data.cityofnewyork.us), no auth required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | SoQL $group clause, e.g. "complaint_type" | |
| limit | No | Max rows to return, 1-1000 (default 50) | |
| order | No | SoQL $order clause, e.g. "created_date DESC" | |
| where | No | SoQL $where clause, e.g. "borough='BROOKLYN'" or "created_date>'2026-01-01'" | |
| domain | Yes | Socrata portal hostname, e.g. "data.cityofnewyork.us" (from socrata.dataset_search results) | |
| offset | No | Pagination offset (default 0) | |
| select | No | SoQL $select clause, e.g. "complaint_type,count(*)" (see socrata.dataset_metadata for column names) | |
| dataset_id | Yes | Socrata dataset 4x4 identifier, e.g. "erm2-nwe9" (from socrata.dataset_search results) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present only when the call failed. Includes error code, message, request_id, and any provider-specific extras. | |
| result | No | Tool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response. |