socrata.query_dataset
socrata_query_datasetRetrieve data from Catalunya open data Socrata datasets by constructing SODA queries. Use field names from the describe endpoint to filter, order, and paginate results.
Instructions
Query rows from a Catalunya open data Socrata dataset. Always call socrata_describe_dataset first and use returned field_name values, not display_name values. Pass clause values only, for example where: "municipi = 'Girona'"; never pass ?$where=... URL fragments. Supply order whenever using offset for stable pagination; without it, repeated calls may return duplicate or missing rows. Prefer narrowing filters or reducing $select over raising limit. Server caps row count and response bytes; truncation is signaled explicitly. Aggregate queries combine select with aggregate functions and group.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | Raw SODA $group clause value for aggregate queries. | |
| limit | No | Rows to return. Server maximum: 100. | |
| order | No | Raw SODA $order clause value. Supply this when using offset. | |
| where | No | Raw SODA $where clause value using field_name values from describe. | |
| offset | No | Zero-based row offset for pagination. | |
| select | No | Raw SODA $select clause value using field_name values from describe. | |
| source_id | Yes | Socrata dataset identifier, such as v8i4-fa4q. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| error | No | ||
| provenance | Yes |