Query Dataset
query_datasetQuery rows from a datos.gov.co dataset using SoQL. datasetId is the Socrata 4x4 code from search_datasets. SoQL clauses: $select (columns / aggregates like "count(*)"), $where (SQL-like filter, e.g. "departamento_nom='BOGOTA' AND edad > 60"), $order ("count desc"), $group, $q (full-text across the row). Use dataset_columns first to learn field names. Returns an array of row objects keyed by field name. Default $limit is 50 (Socrata max per page is 50000).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| $q | No | Full-text search across the whole row. | |
| $group | No | Group-by field(s) for aggregation. | |
| $limit | No | Rows to return (default 50). | |
| $order | No | Sort, e.g. "fecha_reporte_web desc". | |
| $where | No | SQL-like filter, e.g. "edad > 60 AND sexo='F'". | |
| $offset | No | Pagination offset (default 0). | |
| $select | No | Columns or aggregates, e.g. "departamento_nom, count(*)". | |
| datasetId | Yes | Socrata 4x4 id, e.g. "gt2j-8ykr". |