Datos Co

v0.2.1
io.github.pipeworx-io/datos-co Checked 1 day ago Published 1 month ago

datos.gov.co — Colombia's national open-data portal (Socrata platform).

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_datasets

Search datasets published on Colombia's open-data portal datos.gov.co. Returns each dataset's Socrata 4x4 id (e.g. "gt2j-8ykr"), name, and description (Spanish). Use the id with dataset_columns and query_dataset. Query terms can be Spanish or English (e.g. "covid", "presupuesto", "contratos").

ParameterTypeDescription
q *stringFull-text search query (Spanish or English).
limitnumberMax datasets to return (default 20).
offsetnumberPagination offset (default 0).

dataset_columns

List the columns of a datos.gov.co dataset: field name (used in SoQL $select/$where), human label, and data type. Call this before query_dataset so you know which fields exist. datasetId is the Socrata 4x4 code from search_datasets.

ParameterTypeDescription
datasetId *stringSocrata 4x4 id, e.g. "gt2j-8ykr".

query_dataset

Query 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).

ParameterTypeDescription
datasetId *stringSocrata 4x4 id, e.g. "gt2j-8ykr".
$groupstringGroup-by field(s) for aggregation.
$limitnumberRows to return (default 50).
$offsetnumberPagination offset (default 0).
$orderstringSort, e.g. "fecha_reporte_web desc".
$qstringFull-text search across the whole row.
$selectstringColumns or aggregates, e.g. "departamento_nom, count(*)".
$wherestringSQL-like filter, e.g. "edad > 60 AND sexo='F'".

co_fic_unit_value

Unit value (valor de la unidad) and returns (rentabilidad diaria/mensual/semestral/anual) for a Colombian collective investment fund (FIC), per participation class, with fund size and number of investors. Give the fund by name (forgiving match) or by fund_code from co_fic_search. Default is the latest published day; pass date (YYYY-MM-DD) for one day or from/to for a history. An unknown fund returns found:false with close fund names; an ambiguous name returns the candidates to choose from. Source: Superintendencia Financiera de Colombia, FIC daily series.

ParameterTypeDescription
datestringOne day, YYYY-MM-DD (the regulator publishes with a few days lag).
fromstringHistory start, YYYY-MM-DD.
fundstringFund name, e.g. "Fiducoldex Capital Inteligente". Optional if fund_code is given.
fund_codenumberFund code from co_fic_search (exact; skips name matching).
limitnumberMax rows when a range is requested (default 60, max 400).
participation_classnumberOnly this participation class (tipo de participación), e.g. 450.
tostringHistory end, YYYY-MM-DD (default latest).