Reference
All 85 tools, one by one.
Find a tool by name, source, or task. Open only the group and detail you need.
Unified entry points2 Show
search_ecuador
Searches datasets, orgs, procedures, regulations, contracts, and risk events all at once.
Unified search across Ecuador open data, trámites, regulations, contracts and risk events. Use this as the first step for broad questions. Then drill down with get_dataset_info, query_resource_data, get_tramite_info, get_regulacion_info, get_contrato_info or search_eventos_riesgo.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | required | Search terms in Spanish (e.g. "salud", "RUC", "medicinas") |
limit | int | 5 | Max results per section (default 5, max 10) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
lookup_ubicacion
Provinces, cantons, and parishes (INEC code, region, population).
Look up Ecuador DPA geography: provinces, cantons and parroquias (INEC codes). - nivel='provincia' | 'canton' | 'parroquia' | 'auto' - For parroquias, filter with canton= and/or provincia= (recommended)
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Name or code (e.g. "Pichincha", "Cuenca", "Tumbaco", "170150") |
region | str | empty | Optional natural region for provinces/cantons |
provincia | str | empty | Optional province filter |
canton | str | empty | Optional canton filter (useful for parroquias) |
nivel | Literal['auto', 'provincia', 'canton', 'parroquia'] | auto | auto | provincia | canton | parroquia |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
Open Data8 Show
search_datasets
Search datasets by keyword. Supports filtering by category.
Search for datasets on Ecuador's open data portal (www.datosabiertos.gob.ec). This is the starting point for exploring government data from 98+ public institutions. Use short, specific queries in Spanish for best results. Typical workflow: search_datasets → list_dataset_resources → preview_resource_data
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Search keywords (e.g. "empleo", "salud", "presupuesto", "SRI recaudación") |
page | int | 1 | Page number (1-based, default: 1) |
page_size | int | 20 | Results per page (default: 20, max: 100) |
category | str | empty | Optional category filter (e.g. "sal" for Salud, "edu" for Educación). Use list_categories to see all available categories. |
sort | Literal['relevance', 'recent'] | relevance | `relevance` (default, CKAN's own ranking) or `recent` (newest first by metadata_modified; works without a query to discover new or freshly refreshed datasets). |
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec), "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal), "latacunga" (datosabiertos.latacunga.gob.ec, independent municipal portal), or "iadb" (data.iadb.org, IADB's open-data portal — NOT Ecuador-only, a regional/global catalog: Latin Macro Watch and World Bank/IADB indicators) |
compact | bool | False | Shrink each dataset in the JSON output to id, name, title, metadata_modified, organization and its resources (id, name, format, size, url). Full results can reach 100+ KB per page; the JSON is capped at ~60 KB and cut-off pages say so in metadatos.truncado. |
fields | str | empty | Comma-separated dataset keys to keep in the JSON output (e.g. "name,title,metadata_modified"); applied after compact. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_dataset_info
Detailed dataset metadata: title, description, organization, tags, license, dates.
Get detailed metadata about a specific dataset from Ecuador's open data portal. Returns title, description, organization, tags, resource count, creation/update dates, license, update frequency, the publisher's source URL (where the entity keeps the authoritative data, if any), and any custom metadata fields the publisher added.
| Parameter | Type | Default | Description |
|---|---|---|---|
dataset_id | str | required | The dataset ID or slug (e.g. "registro-estadistico-de-recursos-y-actividades-de-salud-2019") |
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec), "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal), "latacunga" (datosabiertos.latacunga.gob.ec, independent municipal portal), or "iadb" (data.iadb.org, IADB's open-data portal — NOT Ecuador-only, a regional/global catalog: Latin Macro Watch and World Bank/IADB indicators) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
list_dataset_resources
Lists all files (resources) in a dataset with format, size, URL, and creation/modification dates.
List all resources (files) in a dataset with their metadata. Returns resource ID, title, format, size, download URL, and creation/ last-modified dates for each file. The dates let you tell whether a dataset's files are periodic snapshots (compare last_modified across resources to find the most recent one) before reading any of them. Also flags groups of resources whose names look like a periodic series (e.g. weekly files) — that's only a hint that they might need combining or picking the latest one; it does not tell you which, since that depends on the dataset (some periodic files replace previous ones, others complement them). Next step: use preview_resource_data on a CSV resource to see its contents, or use get_resource_info for detailed metadata.
| Parameter | Type | Default | Description |
|---|---|---|---|
dataset_id | str | required | The dataset ID or slug |
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec), "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal), "latacunga" (datosabiertos.latacunga.gob.ec, independent municipal portal), or "iadb" (data.iadb.org, IADB's open-data portal — NOT Ecuador-only, a regional/global catalog: Latin Macro Watch and World Bank/IADB indicators) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_resource_info
Detailed information about a specific file.
Get detailed information about a specific resource (file) from Ecuador's open data portal. Returns format, size, MIME type, download URL, and dataset association. For CSV files, you can then use preview_resource_data to see the actual data.
| Parameter | Type | Default | Description |
|---|---|---|---|
resource_id | str | required | The resource UUID |
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec), "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal), "latacunga" (datosabiertos.latacunga.gob.ec, independent municipal portal), or "iadb" (data.iadb.org, IADB's open-data portal — NOT Ecuador-only, a regional/global catalog: Latin Macro Watch and World Bank/IADB indicators) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
preview_resource_data
Preview CSV/TSV, JSON/GeoJSON, Excel (XLS/XLSX/XLSB), ODS or a ZIP/tar.gz wrapping a CSV as a table (max 5 MB).
Download and preview a resource from Ecuador's open data portal. Supports CSV/TSV, JSON/GeoJSON, Excel (XLS/XLSX/XLSB), ODS, and .zip or .tar.gz wrapping a CSV/TSV/TXT. Returns the first N rows as a formatted table so the model can inspect data without a local download. Geometry/WKT columns are dropped from the table (they can be tens of KB per cell); CSV columns in European decimal notation (7.760,2) are normalized to standard notation (7760.2). Max download size: 5 MB. For large tabular DataStore resources prefer query_resource_data.
| Parameter | Type | Default | Description |
|---|---|---|---|
resource_id | str | required | The resource UUID (get it from list_dataset_resources) |
rows | int | 20 | Number of data rows to preview (default: 20, max: 100) |
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec), "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal), "latacunga" (datosabiertos.latacunga.gob.ec, independent municipal portal), or "iadb" (data.iadb.org, IADB's open-data portal — NOT Ecuador-only, a regional/global catalog: Latin Macro Watch and World Bank/IADB indicators) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
download_resource
Raw base64 bytes of a resource (max 5 MB) for formats preview_resource_data can't parse (.rar or unrecognized).
Download a resource's raw bytes from Ecuador's open data portal, base64-encoded. Use this for formats preview_resource_data can't parse into a table (.rar or anything unrecognized) — it fetches the file as-is instead of trying to read it. Max size: 5 MB (same cap as preview_resource_data). Larger files come back with an error and the direct URL instead, since they'd be too big to embed in a response. Call with format="json" to get the actual file content — the default format="text" only confirms the download and never includes content_base64.
| Parameter | Type | Default | Description |
|---|---|---|---|
resource_id | str | required | The resource UUID (get it from list_dataset_resources) |
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec), "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal), "latacunga" (datosabiertos.latacunga.gob.ec, independent municipal portal), or "iadb" (data.iadb.org, IADB's open-data portal — NOT Ecuador-only, a regional/global catalog: Latin Macro Watch and World Bank/IADB indicators) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
query_resource_data
Tabular query via the CKAN DataStore (filters, text, pagination) without downloading the file.
Query a tabular resource via CKAN DataStore without downloading the full file. Prefer this over preview_resource_data when the resource is in the DataStore (most CSV resources on the portal). Supports full-text query, JSON filters, sorting and pagination.
| Parameter | Type | Default | Description |
|---|---|---|---|
resource_id | str | required | Resource UUID (from list_dataset_resources) |
query | str | empty | Optional full-text search across datastore fields |
filters_json | str | empty | Optional JSON object of exact field filters, e.g. '{"provincia":"Pichincha"}' |
rows | int | 20 | Number of records to return (default 20, max 100) |
offset | int | 0 | Pagination offset (default 0) |
sort | str | empty | Optional sort expression, e.g. "anio desc" |
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec), "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal), "latacunga" (datosabiertos.latacunga.gob.ec, independent municipal portal), or "iadb" (data.iadb.org, IADB's open-data portal — NOT Ecuador-only, a regional/global catalog: Latin Macro Watch and World Bank/IADB indicators) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
detect_series_pattern
For datasets that publish one file per period: tells whether each new file replaces the previous ones (cumulative) or complements them (incremental).
When a dataset publishes one file per period (weekly/monthly), it's not always clear whether each new file replaces the previous ones (cumulative -- only the newest file matters) or complements them (incremental -- every file must be combined). Downloads the two most recent resources from the periodic-name group list_dataset_resources already detects, finds a date/period-like column by header name (fecha, mes, año, periodo, semana, ...), and compares which period values appear in both files. High overlap → cumulative; near-zero overlap → incremental; if no period column is found or the overlap is ambiguous, returns indeterminado rather than guessing. A heuristic over a sample of up to 500 rows per file -- confirm with preview_resource_data if the result is close to the threshold.
| Parameter | Type | Default | Description |
|---|---|---|---|
dataset_id | str | required | The dataset ID or slug |
resource_id_new | str | None | none | Optional -- newer resource ID to compare (auto-detected from the dataset's periodic-name group if omitted) |
resource_id_old | str | None | none | Optional -- older resource ID to compare (auto-detected if omitted). Both resource_id_new/resource_id_old must be given together, or neither. |
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec), "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal), "latacunga" (datosabiertos.latacunga.gob.ec, independent municipal portal), or "iadb" (data.iadb.org, IADB's open-data portal — NOT Ecuador-only, a regional/global catalog: Latin Macro Watch and World Bank/IADB indicators) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
Government procedures5 Show
search_tramites
Search Ecuadorian government procedures (ID card, passport, RUC, driver's license, etc.).
Search for government procedures (trámites) on Ecuador's official portal gob.ec. Best approach: provide an institution_id to get that institution's trámites. Add a query to filter results by keyword (filters by name and description). When query is provided with institution_id, ALL pages of that institution's trámites are fetched and filtered, so you always get the most relevant results. Common institution IDs: - "8" = SRI (Servicio de Rentas Internas) — impuestos, RUC, facturación - "23" = Registro Civil — cédula, partidas de nacimiento - "48" = ANT — licencias de conducir, matriculación vehicular - "6" = Ministerio de Relaciones Exteriores — pasaportes, apostilla - "163" = IESS — seguro social, pensiones, fondos de reserva Use list_instituciones to find more institution IDs.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Keywords to filter results (e.g. "RUC", "inscripción RUC persona natural"). Each word must appear in the trámite name or description. |
institution_id | str | empty | Institution ID (strongly recommended for relevant results) |
page | int | 1 | Page number (1-based, default: 1). Ignored when query is provided (all pages are searched automatically). |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_tramite_info
Requirements, beneficiaries, cost and responsible institution of one trámite.
Get detailed information about a specific government procedure (trámite). Returns the procedure name, description, requirements, beneficiaries, cost, and the institution responsible. Get the tramite_id from search_tramites.
| Parameter | Type | Default | Description |
|---|---|---|---|
tramite_id | str | required | The procedure ID (e.g. "18009") |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_tramite_estadisticas
Monthly usage/complaint transparency series for one trámite, since 2021.
Monthly usage and complaint series (atenciones/quejas) for one specific trámite. Different from get_tramite_info: this is how many people were actually attended each month, and how many complaints were filed, since gob.ec started publishing this (mid-2021). Get tramite_id from search_tramites. There is no bulk endpoint -- this fetches one trámite's series at a time (currently a few dozen months, no pagination needed).
| Parameter | Type | Default | Description |
|---|---|---|---|
tramite_id | str | required | The procedure ID (e.g. "11752") |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
list_instituciones
List Ecuador's public institutions.
List or search public institutions registered on Ecuador's gob.ec portal. If a query is provided, searches across all institutions by name or acronym. Without a query, returns a paginated list. Common institutions: SRI (ID: 8), Registro Civil (ID: 23), ANT (ID: 48), Cancillería (ID: 6), IESS (ID: 163), Ministerio de Salud, INEC, BCE.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Optional search term (e.g. "SRI", "salud", "rentas") |
page | int | 1 | Page number (1-based, default: 1, only used without query) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_institucion_info
Detail of an institution (sector, website, description).
Get detailed information about a public institution registered on gob.ec. Returns name, acronym, sector, description, website and portal URL. Get the institucion_id from list_instituciones. Common IDs: SRI=8, IESS=163, Registro Civil=23, ANT=48, Cancillería=6.
| Parameter | Type | Default | Description |
|---|---|---|---|
institucion_id | str | required | Institution ID (e.g. "8") |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
ANDA (INEC)3 Show
search_anda
Search INEC's ANDA catalog of surveys and censuses (NADA/IHSN). Indicates whether each survey's microdata can be obtained and how (tipo_acceso).
Search INEC's ANDA catalog (anda.inec.gob.ec) of surveys and censuses. ANDA runs on NADA (World Bank/IHSN), separate from datosabiertos.gob.ec. It catalogs 437+ INEC surveys/censuses with metadata (title, year, authoring entity). Not every entry has downloadable microdata — many are aggregate-only publications (e.g. price indices); each result says so. microdatos_disponibles is checked against each study's real download page (verificar_acceso=true) and tipo_acceso says how: directo (files in ANDA), enlace_externo (ANDA only links to another site, e.g. the 2022 Census to censoecuador.gob.ec), registro (ANDA login), solicitud or ninguno. The catalog flag alone is unreliable: it marks the 2022 Census "direct" although no file is attached. If a check fails the result falls back to the catalog flag with tipo_acceso "desconocido". Follow up with get_anda_survey_info(idno) for full metadata on one survey.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Search keywords (e.g. "empleo", "REEM", "censo agropecuario") |
limit | int | 10 | Max results (default: 10, max: 50) |
page | int | 1 | Page of results, 1-based (default: 1); see total/total_pages |
verificar_acceso | bool | Literal['auto'] | auto | auto (default) = check the real download page of the first 10 results; true = check all of them (2 extra requests each, 8 in parallel); false = trust the catalog flag (fastest). Checks are cached per study (6 h memory, 7 days disk) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_anda_survey_info
Full metadata for an ANDA survey: summary, variables, confidentiality, and contact.
Get full metadata for one ANDA (INEC) survey/census by its idno. Get the idno from search_anda results — it's the string identifier (e.g. "IDD-ECU-INEC-CGTPE-DECON-ENESEM-2023-v1.3"), not the numeric id. Returns scope/abstract, variable count, whether microdata is actually obtainable and how (tipo_acceso, checked on the real download page, with any external links; see download_anda_microdata), confidentiality terms, and a contact email for requesting restricted data when it isn't.
| Parameter | Type | Default | Description |
|---|---|---|---|
idno | str | required | Survey identifier from search_anda (the "idno" field) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
download_anda_microdata
Download links for an ANDA survey's microdata, with its tipo_acceso (directo, enlace_externo, registro, solicitud, ninguno).
Links to an ANDA survey's microdata and how it is served. Automates ANDA's one-click usage-terms step (research/statistical use only, no re-identifying respondents, cite the source — see get_anda_survey_info) to reveal the list. tipo_acceso is read from the real download page, not the catalog flag: directo (files hosted by ANDA, in `archivos`), enlace_externo (ANDA only links to another site, in `enlaces_externos`; the 2022 Census points to censoecuador.gob.ec), registro (ANDA login), solicitud (request to INEC) or ninguno. A study can be flagged "direct" in the catalog and have no attached file: total_archivos 0 with enlace_externo means the data lives elsewhere; follow `siguiente_paso` (e.g. search_archivos(fuente="censo")). Returns URLs, not contents; ANDA files are usually multi-MB ZIPs.
| Parameter | Type | Default | Description |
|---|---|---|---|
idno | str | required | Survey identifier from search_anda (the "idno" field) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
Macroeconomics (BCE)2 Show
search_indicadores_bce
Search the Central Bank of Ecuador's statistical catalog (monetary/financial, public finance, external sector, real sector).
Search the Banco Central del Ecuador (BCE) statistical catalog. Covers monetary/financial statistics, public finances, external sector (foreign trade), and real sector (GDP, employment/ unemployment, consumer confidence, oil production, cement production, and more) — each result is an indicator group (id_grupo) whose time series data you fetch with get_indicador_bce. Some groups hold a single series, others dozens under a broader title (e.g. "desempleo" is a series inside the "mercado laboral" group, not a group of its own — matched here too, not just group titles). Does NOT cover Ecuador's own inflation (CPI) or poverty statistics — those are INEC's domain, try search_anda instead. First call after the cache expires (24h) takes ~10-15s: matching against series names, not just group titles, means fetching every group's metadata (~78 groups) once to build the search index. Cached after that.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text matched against the group's description, its section/subsection, and its individual series labels (accent-insensitive) |
limit | int | 20 | Max results (default 20, max 100) |
offset | int | 0 | Pagination offset over the matched set |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_indicador_bce
Time series for an indicator by id_grupo: configurable period, frequency, and unit (defaults set per group).
Time series data for one Banco Central del Ecuador (BCE) indicator group. Use search_indicadores_bce first to find the id_grupo. Frequency and unit vary by group (e.g. "Mensual"/"Millones de USD" for money supply, "Trimestral"/"Porcentaje" for GDP growth) — omit them to get the group's default, or check the error message for the valid options if you guess wrong.
| Parameter | Type | Default | Description |
|---|---|---|---|
id_grupo | int | required | The group id from search_indicadores_bce. |
desde | str | empty | Start period as YYYY-MM. Defaults to the earliest available period for the chosen frequency. |
hasta | str | empty | End period as YYYY-MM. Defaults to the latest available period for the chosen frequency. |
frecuencia | Literal['', 'Semanal', 'Mensual', 'Trimestral', 'Anual'] | empty | Semanal | Mensual | Trimestral | Anual. Defaults to the group's first available frequency. |
unidad | str | empty | Varies by group (e.g. "Millones de USD", "Indice", "Porcentaje"). Defaults to the first one available for the chosen frequency. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
Companies (Supercías)6 Show
search_companias
Search the Superintendency of Companies' directory (226k+, by name/RUC, province, legal status).
Search Ecuador's company registry (Superintendencia de Compañías). Covers 226k+ companies with legal status, incorporation date, legal representative, registered capital, economic activity (CIIU) and address. Source is a daily-refreshed government export, cached up to 6h server-side — the first call after the cache expires can take ~30-40s to download and parse (~35 MB, 226k rows).
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text matched against company name or RUC (accent-insensitive) |
provincia | str | empty | Optional province filter, e.g. "PICHINCHA" (substring match) |
situacion_legal | str | empty | Optional legal status filter, e.g. "ACTIVA", "DISOLUCIÓN" |
limit | int | 20 | Max results (default 20, max 100) |
offset | int | 0 | Pagination offset over the matched set |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_compania_info
Full company profile by RUC: legal representative, subscribed capital, CIIU code, address.
Get full registry details for a company by RUC (Superintendencia de Compañías). Returns legal status, incorporation date, legal representative, registered capital, economic activity (CIIU), address and last balance-sheet year. Use search_companias first if you don't have the exact RUC.
| Parameter | Type | Default | Description |
|---|---|---|---|
ruc | str | required | The company's 13-digit RUC |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
search_ranking
Rank/filter companies by financial indicators (year, CIIU, any column); requires the local financial database build.
Rank/filter Supercías companies by financial indicators for a fiscal year. Filter by year and/or CIIU level-1 economic activity (single letter, e.g. "C" for manufacturing), sorted by any indicator column (defaults to the dataset's own precomputed posicion_general). Each result includes the company's nombre/ruc alongside its financials. Covers every fiscal year Supercías publishes, 2008 to the latest (metadatos.base_local.anios_disponibles lists them). Older years carry fewer columns: financial ratios start in 2018 and CIIU in 2009, so sorting by a ratio or filtering by ciiu_n1 in a year without them returns an error that says so. 2008-2018 also include unranked companies (no financial statement that year), listed after the ranked ones. Use get_financials for one company's full detail, or get_compania_info for legal/registry data (address, legal representative, etc.).
| Parameter | Type | Default | Description |
|---|---|---|---|
anio | int | None | none | Fiscal year, 2008 to the latest; defaults to the latest available year (which may still be incomplete while filings arrive). A year not in the local build returns an error listing the available years. |
ciiu_n1 | str | empty | Optional CIIU level-1 filter, e.g. "C", "G", "I". |
order_by | str | posicion_general | Column to sort by (e.g. "posicion_general", "activos", "roe"). An unknown column returns an error listing the valid ones. |
descending | bool | False | Sort descending if true (default false = ascending); use it for top-N by a column such as roe. posicion_general is already ascending (1 = best), so leave it false when sorting by it. |
limit | int | 20 | Max results (default 20, max 100). |
offset | int | 0 | Pagination offset. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_financials
A company's financial history by filing number or RUC: revenue, assets, equity, ~38 ratios (liquidity, leverage, profitability).
Get a company's financial history from Supercías balance-sheet filings. Returns revenue, assets, equity, profit, employee count and financial ratios (liquidity, leverage, profitability) per fiscal year, most recent first. Covers every fiscal year Supercías publishes, 2008 to the latest (metadatos.base_local.anios_disponibles lists them; the latest may still be incomplete). Ratios start in 2018 and CIIU in 2009; earlier years only have revenue, assets, equity, profit, income tax and employees. A year with no financial statement is flagged as such. Complements get_compania_info, which has legal/registry data but no financials.
| Parameter | Type | Default | Description |
|---|---|---|---|
expediente_or_ruc | str | required | The company's Supercías "expediente" number (from search_companias/get_compania_info) or its 13-digit RUC. |
anio | int | None | none | Optional single fiscal year. A year not in the local build returns an error listing the available years. |
desde | int | None | none | Optional first fiscal year of a range (inclusive). |
hasta | int | None | none | Optional last fiscal year of a range (inclusive). Don't combine desde/hasta with anio. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
search_auditores
Search the registry of authorized external auditors (1,447 firms/individuals, by name or ID, province).
Search Ecuador's registry of authorized external auditors (Superintendencia de Compañías). Covers the 1,447 firms/individuals licensed to act as external auditors, with their authorization resolution number/date and contact details. Source is a daily-refreshed government export, cached up to 6h server-side.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text matched against auditor name or identificación (RUC/cédula), accent-insensitive |
provincia | str | empty | Optional province filter, e.g. "PICHINCHA" (substring match) |
limit | int | 20 | Max results (default 20, max 100) |
offset | int | 0 | Pagination offset over the matched set |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_auditor_info
Full profile of an external auditor by ID: authorization resolution, nationality, address, contact.
Get full registry details for an authorized external auditor by identificación (Superintendencia de Compañías). Returns authorization resolution number/date, nationality, address and contact details. Use search_auditores first if you don't have the exact identificación (RUC/cédula).
| Parameter | Type | Default | Description |
|---|---|---|---|
identificacion | str | required | The auditor's RUC or cédula |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
Regulations & contracts5 Show
search_regulaciones
Search/list regulations on gob.ec (with Official Register reference).
Search or list regulations published on Ecuador's gob.ec portal. Includes agreements, regulations and related norms with Registro Oficial references when available. With a query, scans several pages client-side (the API has no native search). Without a query, returns a paginated list.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Keywords (e.g. "datos personales", "tránsito", "LOTAIP") |
page | int | 1 | Page number when query is empty (1-based) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_regulacion_info
Detail of a regulation, plus a link to the PDF.
Get detailed information about a regulation published on gob.ec. Returns type, Registro Oficial reference, description and PDF/archivo URL when available. Get the regulacion_id from search_regulaciones.
| Parameter | Type | Default | Description |
|---|---|---|---|
regulacion_id | str | required | Regulation ID (e.g. "2990") |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
search_contratos
Search public procurement processes (SERCOP/OCDS).
Search Ecuador public procurement procedures (SERCOP / OCDS open data). Useful for journalists, researchers and citizens looking for contracts, tenders, buyers or suppliers. Requires a keyword of at least 3 characters. Year defaults to the current calendar year and falls back to prior years when year=0. Results are cached ~30 minutes; on 429 the client cools down.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | required | Keyword (min 3 chars), e.g. "medicinas", "vialidad", "software" |
year | int | 0 | Contract year (2015–current). 0 = current year + fallback |
page | int | 1 | Results page (1-based) |
buyer | str | empty | Optional buyer/institution keyword (min 3 chars) |
supplier | str | empty | Optional supplier keyword (min 3 chars) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_contrato_info
Full OCDS record: buyer, tender, awards, contracts.
Get the full OCDS record for a public procurement procedure (SERCOP). Returns buyer, tender, awards, contracts and useful links when available. Get the ocid from search_contratos.
| Parameter | Type | Default | Description |
|---|---|---|---|
ocid | str | required | Open Contracting ID, e.g. "ocds-5wno2w-001-LICO-GPLR-2020-2805" |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_resumen_compras
Summarizes one buyer's public procurement in a year: processes, amount, procedure types, months and suppliers.
Summarizes the public procurement of one buyer (institution) in a year, from SERCOP's OCDS open data. It pages through the same search search_contratos uses, filtered by buyer, and totals what it reads: number of processes, total amount (the OCDS amount, awarded or estimated value) and budget, by procedure type, by month and by supplier, with first and last dates. The buyer is a keyword, so several institutions can match ("agua" brings every water utility): each is summarized separately, largest amount first, top 10. Reads up to 300 processes (30 pages); past that the summary is marked partial with total_en_fuente. Processes without an amount are counted but add nothing (procesos_con_monto), and a page that fails is listed in paginas_fallidas. For one process's full record use get_contrato_info.
| Parameter | Type | Default | Description |
|---|---|---|---|
comprador | str | required | Buyer or institution keyword, min 3 characters (e.g. "Municipio de Quito", "IESS"). |
year | int | 0 | Year of the processes (2015 on). 0 = current year. |
query | str | empty | Optional topic keyword (min 3 characters); empty uses the buyer keyword. |
format | Literal['text', 'json'] | text | text | json |
Risk & earthquakes5 Show
search_eventos_riesgo
COE emergency/risk events (landslides, floods, etc.).
Search emergency/risk events from Ecuador's SGR COE (Gestión de Riesgos). Returns recent recorded events such as landslides, floods, structural damage, with province/canton, status (Seguimiento/Cierre), impacts and description. Data comes from the public ArcGIS COE2 service (cached ~5 minutes).
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text (sector, cause, description keywords) |
provincia | str | empty | Province filter (e.g. "Pichincha") |
canton | str | empty | Canton filter (e.g. "Quito") |
evento | str | empty | Event type filter (e.g. "Deslizamiento", "Inundación", "Aluvión") |
estado | str | empty | Status filter (e.g. "Seguimiento", "Cierre") |
limit | int | 15 | Max events to return (default 15, max 100) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
list_sat_tsunami
Tsunami early-warning stations.
List tsunami early-warning SAT stations published by SGR (Gestión de Riesgos). Returns station codes and coordinates from the public SAT MapServer.
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | int | 30 | Max stations to include in the response (default 30) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
search_sismos
Recent earthquakes from the Geophysical Institute's (IG-EPN) catalog: magnitude, depth, location, and review status.
Search recent earthquakes in Ecuador from the Instituto Geofísico (IG-EPN). Returns the IG-EPN seismic catalog feed: magnitude, depth, coordinates, local/UTC time, review status and nearest-place description, with a link to each event page. Data is cached ~2 minutes.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text over location/id (e.g. "Quito", "Esmeraldas") |
magnitud_minima | float | 0.0 | Minimum magnitude (e.g. 4.0) |
dias | int | 0 | Only events from the last N days (0 = all available) |
limit | int | 15 | Max events to return (default 15, max 100) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
search_sgr_sitreps
Historical archive of SGR adverse-event dossiers (2016-2026).
Lists SGR's SITREP ("Informes de Situación") archive of adverse-event dossiers, 2016-2026. A different source from search_eventos_riesgo, which reads a live ArcGIS snapshot of current events only. Lists about 54 multi-year dossiers — earthquakes, forest-fire seasons, rainy seasons, landslides, volcanic activity — each with a status and its own page. Follow up with get_sgr_sitrep_archivos(url).
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text matched (accent-insensitive) against the event's titulo, estado, or descripcion, e.g. "terremoto", "en curso", "manabi". Empty returns all events. |
format | Literal['text', 'json'] | text | text | json |
get_sgr_sitrep_archivos
SITREP PDF reports for one SGR adverse event.
Lists the SITREP PDF report links published on one SGR adverse-event page. Returns each report's grupo (the page's own section heading, e.g. national vs. provincial vs. cantonal), título, and direct PDF URL. A long-running event can carry 700+ PDFs; a closed single-incident event usually has far fewer.
| Parameter | Type | Default | Description |
|---|---|---|---|
evento_url | str | required | An event URL from search_sgr_sitreps' url field (must be on gestionderiesgos.gob.ec). |
format | Literal['text', 'json'] | text | text | json |
Exploration4 Show
search_organizations
Search across 98+ institutions that publish data (INEC, SRI, BCE, MSP, etc.).
Search for public institutions that publish data on Ecuador's open data portal. There are 98+ organizations including INEC, SRI, Ministerio de Salud, BCE, etc.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Optional search term (e.g. "salud", "SRI", "INEC") |
page | int | 1 | Page number (1-based, default: 1) |
page_size | int | 20 | Results per page (default: 20, max: 100) |
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec), "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal), "latacunga" (datosabiertos.latacunga.gob.ec, independent municipal portal), or "iadb" (data.iadb.org, IADB's open-data portal — NOT Ecuador-only, a regional/global catalog: Latin Macro Watch and World Bank/IADB indicators) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_organization_info
Info about an organization, with datasets filterable by text.
Get detailed information about a public institution and its published datasets — the main way to browse a CKAN organization's full package list, including large ones with no dedicated tool of their own (e.g. "sri-servicio-de-rentas-internas" —127 packages—, "ministerio-de-economia-y-finanzas" —97—, "ieps" —106—, "cosede" —88—, "ipaip" —70—, "mag" —69—; get the exact slug from search_organizations first if unsure). format=json always returns every dataset; format=text caps display and tells you how many more exist — use query to narrow a large organization down instead of scrolling past the cap.
| Parameter | Type | Default | Description |
|---|---|---|---|
organization_id | str | required | The organization slug (e.g. "sri-servicio-de-rentas-internas") |
query | str | empty | Free text matched (accent-insensitive) against each dataset's title. Empty returns all datasets. |
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec) or "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
list_categories
Topic categories with dataset counts.
List all thematic categories of Ecuador's open data portal. Categories include: Salud, Educación, Economía y Finanzas, Seguridad y Defensa, Anticorrupción, Ambiente y Agua, Transporte, Turismo, and more. Each category shows the number of datasets it contains. Use the category 'name' field as the 'category' parameter in search_datasets to filter results by topic.
| Parameter | Type | Default | Description |
|---|---|---|---|
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec), "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal), "latacunga" (datosabiertos.latacunga.gob.ec, independent municipal portal), or "iadb" (data.iadb.org, IADB's open-data portal — NOT Ecuador-only, a regional/global catalog: Latin Macro Watch and World Bank/IADB indicators) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_category_info
Detail of a category and sample datasets.
Get details for a thematic category (CKAN group) on Ecuador's open data portal. Use list_categories first to discover valid category IDs (the 'name' field, e.g. 'salud', 'educacion', 'economia-y-finanzas').
| Parameter | Type | Default | Description |
|---|---|---|---|
category | str | required | Category slug/name from list_categories |
include_datasets | bool | True | Include sample datasets in the category (default True) |
source | ckan_client.CkanSource | nacional | "nacional" (default, www.datosabiertos.gob.ec), "cuenca" (cuencaendatos.cuenca.gob.ec, independent municipal portal), "latacunga" (datosabiertos.latacunga.gob.ec, independent municipal portal), or "iadb" (data.iadb.org, IADB's open-data portal — NOT Ecuador-only, a regional/global catalog: Latin Macro Watch and World Bank/IADB indicators) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
BCE and specialized series6 Show
get_bce_iem_table
Inspect one official XLSX table from the latest BCE IEM bulletin.
Inspect one official XLSX table from the latest BCE IEM bulletin. Get table_id from search_bce_iem. Tables with the common BCE layout (periods across columns and variables down rows) return structured, date-filterable series. Other layouts return a faithful preview rather than silently guessing columns. Always includes the BCE file and bulletin URLs for verification. Pass boletin_numero to retrieve a historical version returned by search_bce_iem(historico=true).
| Parameter | Type | Default | Description |
|---|---|---|---|
table_id | str | required | A table_id from search_bce_iem. |
desde | str | empty | Earliest period to include, as YYYY, YYYY-MM or a month-year label. |
hasta | str | empty | Latest period to include, same formats as desde. |
boletin_numero | int | 0 | Past bulletin number from search_bce_iem(historico=true); 0 means the latest. |
rows | int | 20 | Max rows returned (1-100, default 20). |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_bce_indicador_diario
Fetch one BCE daily/monthly indicator's time series (e.g. Riesgo País).
Fetch one BCE daily/monthly indicator's time series (e.g. Riesgo País), bounded to a window — never the full series (some run 7,000+ observations). Get archivo/codigo from list_catalogo(fuente='bce_diarios') first — a codigo only means one thing within its own archivo. Without desde/hasta, returns the most recent ultimos_n observations (capped at 366). With desde/hasta (YYYY-MM-DD, inclusive), returns that date range instead, also capped at 366 rows (most recent within the range if it's larger). The response always includes rango_completo (the series' true full date range and row count) so the window returned is never mistaken for the whole series. Each point in "datos" has "valor" (one number) for almost every indicator, except Inflación (datos_ipc.json), which has no single value — its points carry "valores": {"Mensual":..., "Anual":..., "Acumulada":...} instead.
| Parameter | Type | Default | Description |
|---|---|---|---|
archivo | str | required | A file name from list_catalogo(fuente='bce_diarios'). |
codigo | str | required | A "Código Variable Dinámica" from that same archivo. |
ultimos_n | int | 30 | Most recent N observations when no date range is given. |
desde | str | empty | Optional start date YYYY-MM-DD. |
hasta | str | empty | Optional end date YYYY-MM-DD. |
format | Literal['text', 'json'] | text | text | json |
search_bce_iem
Search individual Excel tables in the BCE's latest IEM bulletin.
Search individual Excel tables in the BCE's latest IEM bulletin. Use this for detailed BCE tables not conveniently available through search_indicadores_bce/BCEData: trade by country, debt, public finance by government level, oil, GDP breakdowns, and more. It lists tables from the current monthly bulletin; use get_bce_iem_table with a returned table_id to inspect one official XLSX file. Set historico=true (or provide desde_anio/hasta_anio) to search across all matching monthly bulletin pages; this is slower on the first call because the archive pages must be read. Set guardar_catalogo=true to persist the complete catalog assembled by this search under IEM_CATALOG_DIR (or data/iem_catalog_snapshots by default). Pagination still keeps the MCP response bounded. Set hash_archivos=true for an operator-style SHA-256 audit of the discovered XLSX files. This downloads complete files, so it is deliberately opt-in and bounded by max_hash_archivos.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text matched against table titles and sections (accent-insensitive). Empty lists every table. |
limit | int | 20 | Max tables returned (default 20). |
offset | int | 0 | Pagination offset over the matched set. |
historico | bool | False | Also search past monthly bulletins, not just the latest. |
desde_anio | int | 0 | Earliest bulletin year to search (implies historico). |
hasta_anio | int | 0 | Latest bulletin year to search (implies historico). |
guardar_catalogo | bool | False | Save the full assembled catalog under IEM_CATALOG_DIR. |
hash_archivos | bool | False | Download each discovered XLSX and report its SHA-256 (operator audit; slow). |
max_hash_archivos | int | 5000 | Cap on files hashed when hash_archivos is set. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
search_bce_calendario
BCE's scheduled statistical-publication calendar.
Search BCE's own statistical publication calendar — scheduled release dates for IEM, Cuentas Nacionales, IMAEC, balance of payments, and more, each with category, periodicity, reference period, and a direct link to the publication's page. Distinct from search_archivos(fuente='bce_publicaciones') (a rolling window of ~30 already-published items, no future dates): this is BCE's own forward-looking release schedule for the full calendar year.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text matched against the publication name or its observations note (accent-insensitive). Empty matches all. |
categoria | str | empty | Exact category filter (accent-insensitive), e.g. "cuentas nacionales", "balanza de pagos y comercio exterior". |
periodicidad | str | empty | Exact periodicity filter, e.g. "Mensual", "Anual", "Trimestral", "Semanal". |
desde | str | empty | Restrict to release date >= this date (YYYY-MM-DD). |
hasta | str | empty | Restrict to release date <= this date (YYYY-MM-DD). |
solo_proximas | bool | False | If true, only releases scheduled today or later. |
limit | int | 50 | Max results (1-200, default 50). |
offset | int | 0 | Pagination offset over the matched set. |
format | Literal['text', 'json'] | text | text | json |
search_bce_paginas
BCE publication pages with file archives: indices or national accounts.
Lists the BCE's publication pages for one catalog: indices (sector bulletins, price and confidence indices, FX, balance of payments; some back to 2004) or cuentas_nacionales (annual, quarterly, regional accounts, input-output, IMAEC). Next: get_bce_pagina_archivos(pagina_id).
| Parameter | Type | Default | Description |
|---|---|---|---|
catalogo | Catalogo | required | indices or cuentas_nacionales. |
query | str | empty | Free text matched (accent-insensitive) against the page's title, category or id. Empty returns all pages. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_bce_pagina_archivos
Files of one BCE publication page, most recent first.
Reads the file list of one BCE page (pagina_id from search_bce_paginas): title, URL and format. For indices it also carries year and period (quarter, month or week). Returns links, not contents.
| Parameter | Type | Default | Description |
|---|---|---|---|
catalogo | Catalogo | required | indices or cuentas_nacionales. |
pagina_id | str | required | The page's `pagina_id` from search_bce_paginas. |
anio | int | 0 | Only for catalogo="indices": restrict to one year (0 = all). |
max_archivos | int | 30 | Cap on returned files, 1-200 (most recent first); use anio to reach further back. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
INEC: statistics, BIINEC, and census5 Show
get_inec_estadistica_files
List the direct file links published on one INEC statistical topic page.
List the direct file links published on one INEC statistical topic page. Get the url from search_inec_estadisticas. Returns technical bulletins, methodology, and historical series as direct PDF/XLSX/CSV/ZIP links — not the file contents. Use read_pdf on a .pdf link, or download it yourself for tabular formats. If the page lists no files itself (e.g. ENDI), files from the linked per-round landing pages are merged in and named in paginas_relacionadas.
| Parameter | Type | Default | Description |
|---|---|---|---|
url | str | required | A topic URL from search_inec_estadisticas's "url" field (must be on ecuadorencifras.gob.ec) |
year | int | None | none | Optional reference year; keeps only that year's files (each file carries a "year" parsed from its name or folder) |
format | Literal['text', 'json'] | text | text | json |
get_inec_publicacion_archivos
List the direct file links (PDF/XLSX/CSV/ZIP) embedded in one INEC publication found via search_inec_publicaciones.
List the direct file links (PDF/XLSX/CSV/ZIP) embedded in one INEC publication found via search_inec_publicaciones.
| Parameter | Type | Default | Description |
|---|---|---|---|
post | str | required | Either the numeric "id" from search_inec_publicaciones, or the publication's full ecuadorencifras.gob.ec URL. |
format | Literal['text', 'json'] | text | text | json |
search_biinec_extras
Check INEC's BIINEC ("Banco de Datos Abiertos") for data not found in search_anda or search_inec_estadisticas.
Check INEC's BIINEC ("Banco de Datos Abiertos") for data not found in search_anda or search_inec_estadisticas. Last resort for INEC queries: BIINEC (aplicaciones3.ecuadorencifras.gob.ec) mostly duplicates ANDA and Ecuador en Cifras, so this does NOT scrape or search BIINEC live — it's a small, manually-verified list of the handful of registries confirmed to exist only there (environmental/administrative modules, e.g. hazardous waste in health facilities, ENEMDU/ECV environmental modules). If your query matches nothing here, that does NOT mean BIINEC has nothing — it means it wasn't worth automating; search the site's own search box directly instead.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text matched against the registry's name/description (accent-insensitive). Empty returns the full curated list. |
format | Literal['text', 'json'] | text | text | json |
search_inec_estadisticas
Search INEC's statistical topic pages (ecuadorencifras.gob.ec).
Search INEC's statistical topic pages (ecuadorencifras.gob.ec). Covers ~75 topics INEC publishes (IPC, ENEMDU, ENSANUT, pobreza, comercio exterior, cuentas nacionales, construcción, censos...), separate from both search_datasets (CKAN) and search_anda (INEC's microdata archive). This is where the actual published aggregate series live — technical bulletins, methodology, and full historical series in Excel/CSV — for operations that ANDA only catalogs as metadata with no downloadable microdata (e.g. price indices). Follow up with get_inec_estadistica_files(url) for one topic's file links.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text matched against the topic name (accent-insensitive), e.g. "precios", "empleo", "pobreza". Empty returns all topics. |
limit | int | 30 | Max results (default 30, max 100) |
offset | int | 0 | Pagination offset over the matched set |
format | Literal['text', 'json'] | text | text | json |
search_inec_publicaciones
Search every post INEC has published on Ecuador en Cifras, via its public WordPress REST API -- always current, newest first.
Search every post INEC has published on Ecuador en Cifras, via its public WordPress REST API -- always current, newest first. Complements search_inec_estadisticas: that tool's topic pages are curated landing pages that can go stale for months or years even while INEC keeps publishing the same operation (confirmed live: ENEMDU's old "Empleo" topic page stopped at April 2023 while INEC kept releasing it monthly under dated posts this tool finds). Use this tool for "what's the latest bulletin/release for X" questions. Use search_inec_estadisticas/get_inec_estadistica_files instead when you want one operation's fixed overview page rather than a specific dated release. Follow up with get_inec_publicacion_archivos(id) for one publication's file links.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text matched against title/content (e.g. "ENEMDU anual 2025", "inflación julio", "censo"). Empty returns the most recent posts regardless of topic. |
limit | int | 20 | Max results (default 20, max 100). |
offset | int | 0 | Pagination offset over the matched set. |
format | Literal['text', 'json'] | text | text | json |
SRI: RUC and tax collection2 Show
get_sri_ruc_info
Look up a taxpayer's public record by RUC in the SRI.
Look up a taxpayer's public record by RUC in the SRI. Returns legal name, status, type, economic activity, registration dates, and registered public establishments. Does not return individual tax declarations or amounts.
| Parameter | Type | Default | Description |
|---|---|---|---|
ruc | str | required | Exact 13-digit Ecuadorian RUC |
include_establecimientos | bool | True | include registered establishments |
format | Literal['text', 'json'] | text | text | json |
search_sri_ruc
Search SRI's RUC registry by legal name or trade name (partial text), without needing the exact RUC upfront.
Search SRI's RUC registry by legal name or trade name (partial text), without needing the exact RUC upfront. Complements get_sri_ruc_info (which requires the exact RUC) for the "I know the company name, not its RUC" case. Each result includes status, taxpayer type, régimen, economic activity, legal representatives, and whether it's a withholding agent/special taxpayer/ghost taxpayer — no declarations or individual tax amounts. The SRI caps this search at 100 matches per query; if total_reportado comes back as 100, there may be more taxpayers than are actually being returned — use more specific text to narrow it down.
| Parameter | Type | Default | Description |
|---|---|---|---|
razon_social | str | required | Text to search for (minimum 4 characters), e.g. "BANANERA" |
max_resultados | int | 25 | How many full-detail results to return (max 100) |
format | Literal['text', 'json'] | text | text | json |
SIPA, Contraloría, and Superbancos2 Show
get_contraloria_informe
Download and preview one Contraloría document (Datos Abiertos or Plan Anual de Control).
Download and preview one Contraloría document (Datos Abiertos or Plan Anual de Control). Get informe_id from list_catalogo(fuente='contraloria'). Quarterly "Datos Abiertos" documents return one row per audit report approved that quarter, across every public institution in the country. "Plan Anual de Control" documents are PDFs (one per year); this returns their metadata and points you at read_pdf instead of a table.
| Parameter | Type | Default | Description |
|---|---|---|---|
informe_id | str | required | An id from list_catalogo(fuente='contraloria') |
rows | int | 50 | Number of data rows to preview (default: 50, max: 200) |
format | Literal['text', 'json'] | text | text | json |
get_sipa_resumen_indicadores
Monthly "Resumen de Indicadores" PDFs from SIPA (Ministry of Agriculture), by year.
Lists the direct monthly PDF links for one year of SIPA's "Resumen de Indicadores" report, reached from the Ministry of Agriculture's "Indicadores Sectoriales" dashboard page. Confirmed live 2018-2026; each year is a separate page and filename conventions differ across years. Other items on the same dashboard are Tableau Server embeds or JS flipbooks with no direct file — none of those are covered by this tool.
| Parameter | Type | Default | Description |
|---|---|---|---|
anio | int | required | Year, e.g. 2025. Earliest confirmed live: 2018. |
format | Literal['text', 'json'] | text | text | json |
CENACE, SUT, IG-EPN, and power cuts9 Show
get_cenace_tablero
Fetch one tablero (tab) of CENACE's live grid-operations snapshot (Ecuador's national electricity operator) — generation mix and demand, always as-of-now.
Fetch one tablero (tab) of CENACE's live grid-operations snapshot (Ecuador's national electricity operator) — generation mix and demand, always as-of-now. Tableros: - produccion_tiempo_real: current instant. - demanda_tiempo_real: current instant, plus a per-distributor (empresa eléctrica/CNEL) MW breakdown. - operativa_diaria: yesterday's full day total. - acumulada_mensual: month-to-date total (MWh). - acumulada_anual: year-to-date total (GWh). Each returns "resumen" (produccion total/exportación/importación/ hidráulica/térmica/renovable no convencional, or the demand equivalent). There is no historical query here — CENACE's page has no date picker, only these 5 as-of-now views.
| Parameter | Type | Default | Description |
|---|---|---|---|
tablero | Literal['produccion_tiempo_real', 'demanda_tiempo_real', 'operativa_diaria', 'acumulada_mensual', 'acumulada_anual'] | required | One of the 5 names above. |
format | Literal['text', 'json'] | text | text | json |
get_cenace_boletin
CENACE's monthly electricity-market bulletin (2019 onward): production, demand by distributor, prices and trade with Colombia and Peru.
Reads CENACE's "Boletín y Estadística Mensual de Transacciones Comerciales", the monthly report of Ecuador's electricity market (January 2019 onward, about a month behind). Each issue covers the month and the year to date: production by resource (hydro, thermal by fuel, non-conventional renewables, imports), commercial demand by distributor (CNEL units and empresas eléctricas), self-generators, average prices in USD¢/kWh and the international transactions with Colombia and Peru. None of this is in CENACE's CKAN datasets. CENACE publishes the issues only as FlipHTML5 flipbooks; the tool reads the flipbook's text index, so tables come back as text rows ("CNEL GUAYAQUIL 3 036.06 39.1%", thousands separated by a space) rather than columns, and charts carry only their labels.
| Parameter | Type | Default | Description |
|---|---|---|---|
mes | str | empty | Empty to list the issues; YYYY-MM (e.g. 2026-07) or "ultimo" for one issue's text. |
anio | int | None | none | With an empty `mes`, list only that year's issues. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_informe_igepn
Download and extract text from one IG-EPN report found via search_informes_igepn.
Download and extract text from one IG-EPN report found via search_informes_igepn. IG-EPN has no stable per-report URL (each download is a session-bound form submit), so this re-locates the report by exact name/year/group and streams its PDF directly -- pass `volcan` to disambiguate when two reports share the same name on the same day (happens for volcanic daily reports).
| Parameter | Type | Default | Description |
|---|---|---|---|
nombre | str | required | Exact report name from search_informes_igepn (e.g. "Informe Diario 2022-071") |
volcan | str | empty | Volcano name, only needed to disambiguate a duplicate nombre |
grupo | Literal['sismico', 'volcanico', ''] | empty | "sismico" | "volcanico" | "" (both) -- same value used to find it |
anio | int | 0 | Report year (0 = current year) -- same value used to find it |
pages | str | empty | Page range, 1-indexed (e.g. "3", "1-5"). Empty = whole document, capped at 20 pages/call |
format | Literal['text', 'json'] | text | text | json |
get_sut_indicador_schema
List the queryable columns/measures/date-levels for one SUT or Judicatura Power BI dashboard (fuente), discovered from the report's own layout definition, not by guessing.
List the queryable columns/measures/date-levels for one SUT Power BI dashboard, discovered from the report's own layout definition (every visual's underlying query), not by guessing. A field like "public contratos.nombre_padre_activ_econ_empresa" is a plain column usable in query_sut_indicador's campos or filtros; one ending in "[medida]" is an aggregate measure (only valid in campos, never filtros); one ending in "[Año]"/"[Mes]" is a date-hierarchy level. denuncias_publico and encuentra_empleo use an older report layout where visuals don't expose their query this way at all — their fields come from a small manually-captured set instead (recovered by driving the live dashboard and reading the queries it actually sent), not from this automatic discovery, but they show up here the same as any other field. Judicatura dashboards (fuente="judicatura") expose aggregate fields as "[suma]"/"[promedio]" (e.g. "CUB EST_CUB_AUDIENCIAS.Contador [suma]"), valid only in campos, like "[medida]" fields.
| Parameter | Type | Default | Description |
|---|---|---|---|
indicador | str | required | A key from list_catalogo(fuente=<fuente>). |
fuente | Literal['sut', 'judicatura', 'cfn'] | sut | sut (default) | judicatura |
format | Literal['text', 'json'] | text | text | json |
query_sut_indicador
Run a live query against one SUT or Judicatura Power BI dashboard's underlying data model (fuente) — any combination of its fields, e.g. month and industry together.
Run a live query against one SUT Power BI dashboard's underlying data model — any combination of its fields, e.g. month AND industry together for "contratos" (a real monthly time series since 2015 by CIIU industry, province, gender, contract status — none of this is in the ministerio-del-trabajo CKAN datasets, which are a single current-snapshot stock count with no time dimension). Get valid campos from get_sut_indicador_schema(indicador) first — an unrecognized field name raises an error naming the tool to call instead of guessing. filtros only accepts plain-column fields (not "[medida]"/hierarchy-level fields) and matches exact text equality, e.g. {"public contratos.Estado contrato": "Vigente"}. Rows can run into the thousands for a wide breakdown (e.g. every month x every industry) — narrow with filtros or fewer campos rather than raising limite past what's actually needed; format "json" is exact but still subject to the same limite cap. fuente="judicatura" queries the Consejo de la Judicatura dashboards (e.g. hearings by year and province: campos "CUB EST_CUB_AUDIENCIAS.Periodo [Año]" and "CUB EST_CUB_AUDIENCIAS.Contador [suma]"). With fuente cfn it queries the CFN report, e.g. guarantees by province with fields "Garantias FNG.nombre_provincia" and "Medidas FNG.Monto Garantizado (USD) [medida]".
| Parameter | Type | Default | Description |
|---|---|---|---|
indicador | str | required | A key from list_catalogo(fuente=<fuente>). |
campos | list[str] | required | Field labels exactly as returned by get_sut_indicador_schema. |
filtros | dict[str, str] | None | none | Optional {campo: valor} equality filters, plain columns only. |
limite | int | 500 | Row cap applied server-side by the query itself. |
fuente | Literal['sut', 'judicatura', 'cfn'] | sut | sut (default) | judicatura |
format | Literal['text', 'json'] | text | text | json |
search_informes_igepn
Search the IG-EPN PDF report archive (Instituto Geofísico): daily/weekly/monthly/special seismic bulletins, volcanic "IG Al Instante" alerts, field/annual reports, etc.
Search the IG-EPN PDF report archive (Instituto Geofísico): daily/weekly/monthly/special seismic bulletins, volcanic "IG Al Instante" alerts, field/annual reports, etc. Different from search_sismos, which reads the raw earthquake catalog feed -- this searches the narrative/PDF report archive instead. Use get_informe_igepn afterwards to download and read one report's text.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text over report name/volcano (e.g. "cotopaxi", "trimestral") |
grupo | Literal['sismico', 'volcanico', ''] | empty | "sismico" | "volcanico" | "" (both) |
anio | int | 0 | Report year (0 = current year) |
limit | int | 15 | Max reports to return (default 15, max 30) |
format | Literal['text', 'json'] | text | text | json |
search_cortes
Scheduled power cuts: crisis PDFs (EEQ, CentroSur) or maintenance notices (Emelnorte, ElecGalápagos, EEASA).
Lists one distributor's scheduled power cuts: the crisis PDFs of eeq (Quito, 2023-2024) and centrosur (Azuay, Cañar, Morona Santiago, 2023 onward), or the current maintenance notices of emelnorte (Imbabura, Carchi, north of Pichincha, latest 100), elecgalapagos (by island, latest 100) and eeasa (Tungurahua and Pastaza, the coming days, no history). Regional, not national. Next: get_cortes_horarios with the `archivo`.
| Parameter | Type | Default | Description |
|---|---|---|---|
distribuidora | Distribuidora | required | eeq, centrosur, emelnorte, elecgalapagos or eeasa. |
query | str | empty | Free text matched, accent-insensitive, against the file's period, date, title or URL (emelnorte/elecgalapagos: the notice's title and text; eeasa: date and sectors). Empty returns all. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_cortes_horarios
Turns a power-cut PDF or notice into rows: date, time blocks, location, sectors and motive.
Turns a power-cut schedule or notice (`archivo` from search_cortes) into rows with date, time blocks without power, sectors and the location the utility publishes (EEQ: substation; CentroSur: province/canton/zone; ElecGalápagos: island). Maintenance notices add `motivo`; Emelnorte notices published only as images return the links in `imagenes`. query filters by place.
| Parameter | Type | Default | Description |
|---|---|---|---|
distribuidora | Distribuidora | required | eeq, centrosur, emelnorte, elecgalapagos or eeasa. |
archivo | str | required | The `archivo` from search_cortes (EEQ: slug or URL; CentroSur: PDF URL; emelnorte/elecgalapagos: notice id; eeasa: vigentes). |
query | str | empty | Free text matched (accent-insensitive) against location and sectors, e.g. "La Floresta", "Gualaceo". Empty returns every row. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_arconel_reporte
Run one ARCONEL report (e.g. "Balance Energía" for a year) and return its rows.
Runs one report from ARCONEL's builder and returns its rows, e.g. "Balance Energía" 2023: energy received, sold and lost per month and distributor, with technical and non-technical loss percentages. Slow (about 50 rows per page): max_paginas caps the work and `completo` says whether everything was read.
| Parameter | Type | Default | Description |
|---|---|---|---|
tipo | str | required | Report name as listed by list_catalogo(fuente='arconel') (accent/case-insensitive), e.g. "Balance Energía", "Pérdidas". |
anio | int | required | Year, 1998-current. |
grupo | Literal['todos', 'cnel', 'empresas_electricas'] | todos | todos | cnel | empresas_electricas. |
mes | int | None | none | 1-12, only for report types with a month filter; others already break down by month. |
max_paginas | int | 10 | Maximum pages to read (1-40). |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
Research utilities4 Show
investigate_dataset
One-shot research shortcut: search for a dataset, list its resources, and preview the most promising one's actual data -- the search_datasets -> list_dataset_resources -> preview_resource_data workflow in a single call, for the common case of "find me data about X and show me what's in it"
One-shot research shortcut: search for a dataset, list its resources, and preview the most promising one's actual data -- the search_datasets -> list_dataset_resources -> preview_resource_data workflow in a single call, for the common case of "find me data about X and show me what's in it". Picks the top-ranked search result and, among its resources, the first one in a format this server can actually parse into a table (CSV/JSON/XLS/XLSX/XLSB/ODS/ZIP/TARGZ), skipping unreadable ones (.rar, unrecognized formats) rather than previewing whichever resource happens to be listed first. Not a replacement for the individual tools: if the top search result isn't the right dataset, or you need a specific resource within it, use search_datasets/list_dataset_resources/ preview_resource_data directly instead of re-running this.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | required | Search keywords (e.g. "empleo", "SRI recaudación") |
source | ckan_client.CkanSource | nacional | "nacional" (default), "cuenca" (Cuenca municipal portal), "latacunga" (Latacunga municipal portal), or "iadb" (IADB's portal, not Ecuador-only) |
preview_rows | int | 10 | Data rows to preview from the chosen resource (default: 10, max: 50) |
format | Literal['text', 'json'] | text | text | json |
list_zip_contents
List a .zip archive's member files (name, size) from a direct URL, without downloading the archive.
List a .zip archive's member files (name, size) from a direct URL, without downloading the archive. Reads only the End Of Central Directory record and the central directory via HTTP Range requests, so it works for archives far larger than the 5 MB preview_resource_data/download_resource cap -- e.g. INEC or censo microdata ZIPs of multiple hundred MB. Requires the server to honor Range requests; fails with a clear error otherwise. ZIP64 archives (past 4 GB or 65535 entries) are supported. Listing names is cheap this way, but previewing a specific member's rows is not (still needs decompressing from that member's offset onward) -- this tool only lists metadata; to read one member's rows use read_zip_member, which fetches only that file's bytes.
| Parameter | Type | Default | Description |
|---|---|---|---|
url | str | required | Direct URL to a .zip file (from another tool's result, e.g. get_inec_publicacion_archivos, search_archivos). |
limit | int | 200 | Max members returned (default 200, max 1000). |
offset | int | 0 | Pagination offset over the member list. |
format | Literal['text', 'json'] | text | text | json |
read_zip_member
Read one file (CSV/TSV/TXT or XLSX/XLS/XLSB/ODS) inside a remote .zip as a table, fetching only that member's bytes.
Reads the rows of ONE file inside a remote .zip without downloading the .zip. Run list_zip_contents first to get the member's exact name. It reads the archive's central directory, then fetches only that member's local header and compressed bytes via HTTP Range requests, so it works inside archives far larger than the 5 MB cap of preview_resource_data/download_resource -- e.g. the 90 CSV tables of INEC's ENDI R3. Limits: the server must honor HTTP Range (answer 206); the member must be at most 5 MB compressed; CSV/TSV/TXT output stops at 5 MB decompressed (marked truncated) and spreadsheets must fit in 20 MB decompressed since they can't be opened partially; only stored or deflate members, no encryption; ZIP64 is supported. Formats: .csv, .tsv, .txt, .xlsx, .xls, .xlsb, .ods (first sheet). The CRC32 is checked whenever the member is read in full. Matching tries the exact name, then a unique case-insensitive or basename match; otherwise the error suggests close names. For report tables with a title block on top (INEC, BCE) it detects the real header row (the first at least half as full as the fullest of the first 30), returns the title rows as preamble and drops empty columns; skip_rows=0 keeps row 1 and skip_rows=n skips n rows.
| Parameter | Type | Default | Description |
|---|---|---|---|
url | str | required | Direct URL to the .zip (the same one given to list_zip_contents). |
member | str | required | Member path inside the zip, as listed by list_zip_contents. |
rows | int | 50 | Data rows to return (default 50, max 500). |
offset | int | 0 | Data rows to skip before returning, for pagination. |
skip_rows | int | -1 | Rows above the column header; -1 (default) detects them, 0 keeps row 1. |
format | Literal['text', 'json'] | text | text | json |
read_pdf
Extract text from a PDF document at a direct URL.
Extract text from a PDF document at a direct URL. Useful for PDFs linked from other tools' results, e.g. get_regulacion_info's Registro Oficial file, or a dataset resource that turned out to be a PDF bulletin instead of a tabular file. No OCR: a scanned PDF with no embedded text layer will come back empty. Max download size: 5 MB (larger files return an explicit error instead of a partial read -- PDFs can't be parsed from a truncated download); max 20 pages extracted per call (call again with a different `pages` range for the rest).
| Parameter | Type | Default | Description |
|---|---|---|---|
url | str | required | Direct URL to the PDF file |
pages | str | empty | Page range, 1-indexed (e.g. "3", "1-5", "1,4,9"). Empty means the whole document, still capped at 20 pages per call. |
format | Literal['text', 'json'] | text | text | json |
IESS: documents and employer compliance2 Show
get_iess_archivos
Documents in one IESS collection.
Lists one IESS document collection's actual documents, each resolved to a direct download URL, título, and formato. Call list_catalogo(fuente='iess') first to see what years/counts each collection has.
| Parameter | Type | Default | Description |
|---|---|---|---|
coleccion | Literal['boletines', 'estudios_actuariales', 'informes_auditoria'] | required | "boletines" (annual, 1978-2024 confirmed), "estudios_actuariales" (per fund, only a handful of years), or "informes_auditoria" (2007-2026 confirmed, by year). |
anio | int | None | none | Filter to one year. Required for "informes_auditoria". Optional for the other two collections. |
query | str | empty | Free text matched (accent-insensitive) against título and, where available, descripción/grupo. |
format | Literal['text', 'json'] | text | text | json |
get_certificado_cumplimiento_patronal
Checks whether an employer is current on IESS contributions.
Queries the IESS's public Employer Obligations Compliance Certificate (no login) and reports whether the employer has contributions in arrears. If the certificate text can't be parsed, the status is reported as NO DETERMINADO (undetermined). It does not return employee counts: the IESS doesn't publish that per company; use the n_empleados field from get_financials/search_ranking (self-reported to Supercías).
| Parameter | Type | Default | Description |
|---|---|---|---|
identificacion | str | required | A 10-digit cédula or 13-digit RUC. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
Civil aviation (DGAC)3 Show
get_aviso_aeronautico
Live aeronautical notices from DGAC: METAR, NOTAM or SIGMET for Ecuador.
Queries DGAC's IFIS site (ais.aviacioncivil.gob.ec), public with no login. metar: latest METAR/SPECI reports of an aerodrome (type, UTC time, raw ICAO text; usually hourly). notam: active NOTAMs of an aerodrome with series number (e.g. A1784/26), the Q)/A)/B)/C)/D)/E) text and DGAC's decoded fields; for the fixed data sheet use get_aip_aerodromo. sigmet: active SIGMETs (volcanic ash, turbulence, icing, storms) for Ecuador's single FIR (SEFG); zero results means none are active. An unknown designador returns an empty result, not an error.
| Parameter | Type | Default | Description |
|---|---|---|---|
tipo | Literal['metar', 'notam', 'sigmet'] | required | metar, notam or sigmet. |
designador | str | empty | ICAO code of the aerodrome, e.g. SEQM (Quito), SEGU (Guayaquil), SECU (Cuenca). Required for metar and notam; ignored by sigmet. |
format | Literal['text', 'json'] | text | text | json |
list_aip_aerodromos
Aerodromes/helipads with a published AIP data sheet.
Lists the ICAO designators and names of every aerodrome/helipad with a published AIP AD 2.x page, from DGAC's public eAIP — no login required. Use get_aip_aerodromo with one of these designators to fetch its full data sheet (coordinates, runway, operating hours, fees, ATS frequencies, etc.).
| Parameter | Type | Default | Description |
|---|---|---|---|
format | Literal['text', 'json'] | text | text | json |
get_aip_aerodromo
Full AIP AD 2.x data sheet for an Ecuadorian aerodrome.
Fetches the published AIP AD 2.x data sheet for an Ecuadorian aerodrome or helipad, from DGAC's public eAIP — no login required. Returns every numbered field the AIP publishes, grouped by ICAO Annex 15 subsection: location and administrative data, operating hours, rescue-and-firefighting services, apron/taxiway data, radio navigation aids, runway physical characteristics, declared distances, lighting, flight procedures, and supplementary information. Use list_aip_aerodromos to see which designators are published.
| Parameter | Type | Default | Description |
|---|---|---|---|
designador | str | required | ICAO code of the aerodrome/helipad, e.g. SEQM (Quito), SEGU (Guayaquil), SECU (Cuenca). |
format | Literal['text', 'json'] | text | text | json |
Additional sector sources3 Show
search_infomies_bases_mensuales
Monthly infoMIES databases (economic and social inclusion).
Lists infoMIES's (statistics portal of the former MIES) monthly database files for one program: "anc" or "is". Richer than this project's existing CKAN coverage for the same programs, which only has quarterly snapshots. Confirmed live: only the current year has one file per month so far; every closed year (2019-2025) has exactly one file, the December/year-end snapshot. Files are .rar (outside this project's supported-format list) — only metadata and the direct URL are returned.
| Parameter | Type | Default | Description |
|---|---|---|---|
serie | Literal['anc', 'is'] | required | "anc" (non-contributory insurance / economic inclusion) or "is" (SIIMIES users / social inclusion). |
anio | int | None | none | Specific year to fetch, e.g. 2024. Omit to fetch every known year and aggregate (multiple cold-cache requests). |
query | str | empty | Free text matched (accent-insensitive) against the file's label, year, or URL, e.g. "julio", "2023". Empty returns all files for the selected year(s). |
format | Literal['text', 'json'] | text | text | json |
search_infomies_boletines_zonales
infoMIES zonal bulletins, by zone or consolidated by year.
Lists infoMIES's zonal bulletin files. Two distinct series live under this name: modo="zonal" (default), the original "Boletín Zonal" series (one .rar per zone per month), discontinued (2017-2021, nothing since); modo="consolidado", the newer "Reporte Boletines Zonales" successor (one consolidated XLSX per year, 2021-2026, still being updated). Both return metadata and direct URLs only — the .rar files are additionally outside this project's supported-format list.
| Parameter | Type | Default | Description |
|---|---|---|---|
modo | Literal['zonal', 'consolidado'] | zonal | "zonal" or "consolidado". |
zona | str | empty | Required for modo="zonal": one of "zona-1-bz".."zona-9-bz". Ignored for modo="consolidado". Leave empty with modo="zonal" to get the list of valid zone keys. |
anio | int | None | none | Specific year to fetch. For "zonal", omit to fetch every year found (typically 2017-2021). For "consolidado", omit to fetch 2021-2026. |
query | str | empty | Free text matched (accent-insensitive) against the file's label, year, or URL. |
format | Literal['text', 'json'] | text | text | json |
search_siniestros_ant
Ecuador road-crash (siniestros de tránsito) data from ANT records: INEC releases and CKAN datasets.
Finds road-crash data for Ecuador. ant.gob.ec is unreachable, so it combines INEC's quarterly and annual releases (XLSX tabulations and microdata, built from ANT records) with CKAN datasets (SPPAT deaths, ANT). If one source is down the other still answers and the failure appears in `avisos`.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Optional words that must appear in the title (e.g. "trimestre") |
anio | int | 0 | Year filter on the title (0 = all years) |
limit | int | 10 | Max items per source (default 10, max 30) |
con_archivos | int | 2 | Attach file links to this many newest INEC releases (default 2, max 5; 0 = none) |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
International sources3 Show
search_cepalstat_indicadores
Search CEPAL/ECLAC's CEPALSTAT regional indicator catalog.
Search CEPALSTAT (CEPAL/ECLAC's public statistics API) for an indicator by name — 2,059 indicators across Demográficos y sociales, Económicos, Ambientales, and Temas transversales (incluye los ODS). NOT an Ecuador-only source: CEPALSTAT is CEPAL's regional catalog for all of Latin America and the Caribbean. Use this to find the indicator_id, then get_cepalstat_indicador to fetch Ecuador's observations specifically.
| Parameter | Type | Default | Description |
|---|---|---|---|
query | str | empty | Free text matched (accent-insensitive) against the indicator's name or its thematic-area breadcrumb, e.g. "poblacion", "pobreza", "comercio exterior". Empty returns the full catalog (large — prefer a query). |
lang | Literal['es', 'en'] | es | "es" (default) or "en" |
format | Literal['text', 'json'] | text | text | json |
get_cepalstat_indicador
One CEPALSTAT indicator's observations, filtered to a country (Ecuador by default).
Fetch one CEPALSTAT indicator's observations, filtered to one country (Ecuador by default) so the response stays small — CEPAL's raw API returns every country in the region (and often the world) per indicator otherwise, confirmed live at ~2.5 MB unfiltered vs. ~85 KB filtered to one country. Each returned record decodes CEPALSTAT's raw dimension ids into readable labels (e.g. "Sexo": "Mujeres", "Años": "1975") using that same indicator's own dimension catalog — not every indicator has the same dimensions.
| Parameter | Type | Default | Description |
|---|---|---|---|
indicator_id | int | required | An "indicator_id" from search_cepalstat_indicadores. |
pais | str | Ecuador | Country to filter to (accent-insensitive, e.g. "Ecuador", "Peru"). Empty string fetches every country the indicator covers — can be a few MB for a rich indicator. |
lang | Literal['es', 'en'] | es | "es" (default) or "en" |
format | Literal['text', 'json'] | text | text | json |
get_serie_internacional
International series with Ecuador data: World Bank WDI, IRENA, XM power flows, UN Comtrade bilateral trade, IMF series, WHO health, ILO labour and UNHCR displacement.
Fetches a series from an international source, filtered to Ecuador. wdi: World Bank World Development Indicators (1,400+ yearly series); with indicador (e.g. EG.ELC.ACCS.ZS access to electricity) returns the series, with only query (English) searches the catalog; years without a value are dropped and counted. irena: IRENASTAT installed capacity (MW) and generation (GWh) by technology, 2000 on, on/off-grid. xm: XM's hourly energy on the Colombia-Ecuador interconnection, summed by day or month since 2003; needs desde and hasta (at most 366 days); days without flow show as 0 GWh, so the October 2024 suspension appears as zeros. comtrade: Ecuador's merchandise trade with one partner in USD (UN Comtrade public preview, no key): one period per call (periodo), capped at 500 rows, a ~1 call per 2 s rate limit that is retried automatically, and codes only (no names); socio 0 = World, cmd = TOTAL or an HS code. imf: IMF statistics via SDMX (190 flows: prices, balance of payments, exchange rates, fiscal, monetary and banking); indicador is the flow id (empty with query lists flows) and clave the SDMX key, whose dimension order differs per flow and is returned in the response; without clave it returns the whole country, latest observations. who: WHO Global Health Observatory (~3,000 yearly indicators by sex and age, e.g. WHOSIS_000001 life expectancy at birth); empty with query searches indicators. ilo: ILOSTAT labour statistics (1,200+ flows, e.g. UNE_DEAP_SEX_AGE_RT unemployment by sex and age); short keys are padded with wildcards. unhcr: refugees and asylum seekers hosted in Ecuador by year, from desde/hasta; socio = origin country (VEN) or 'todos' for one row per origin. Source ember: Ember's electricity data via Our World in Data (CC BY 4.0), yearly or monthly from 2019: generation and share by source, per capita, demand, net imports and carbon intensity; indicador = metric/source (generation/hydro, by_source/total, carbon_intensity).
| Parameter | Type | Default | Description |
|---|---|---|---|
fuente | Fuente | required | wdi, irena, xm, comtrade, imf, who, ilo or unhcr. |
indicador | str | empty | wdi/who: indicator code. imf/ilo: dataflow id. Empty with query searches (wdi/who) or lists flows (imf/ilo). |
query | str | empty | wdi/who/imf/ilo: catalog search text (English), used when indicador is empty. |
pais | str | ECU | wdi/irena/who/imf/ilo/unhcr: ISO3 code (irena also accepts the English name). comtrade: ISO3 or numeric M49 reporter. Ignored by xm. Default ECU. |
desde | str | empty | Start: a year (YYYY) for wdi/irena/who/unhcr, a date (YYYY-MM-DD) for xm, a period (YYYY, YYYY-MM) for imf/ilo. |
hasta | str | empty | End, same format as desde. xm allows at most 366 days. |
tecnologia | str | empty | irena only: technology label substring (solar, hydro, Total Renewable...). Empty returns all. |
tipo | Literal['ambos', 'generacion', 'capacidad'] | ambos | irena only: generacion (GWh), capacidad (MW) or ambos. |
conexion | Literal['All', 'On-grid', 'Off-grid'] | All | irena only: All, On-grid or Off-grid. |
sentido | Literal['exportaciones', 'importaciones'] | exportaciones | xm only: exportaciones (Colombia to Ecuador) or importaciones (Ecuador to Colombia). |
agregacion | Literal['dia', 'mes'] | dia | xm only: dia or mes. |
limit | int | 30 | Catalog or flow listings only: maximum rows (1-200). |
periodo | str | empty | comtrade only: a single period, YYYY (frecuencia A) or YYYYMM (frecuencia M). Required. |
socio | str | empty | comtrade: partner as ISO3 (USA, CHN, COL, PER, PAN, ESP, NLD, ITA...) or M49 number; empty = 0 (World). unhcr: origin ISO3 or 'todos'. |
cmd | str | TOTAL | comtrade only: TOTAL or an HS code of 2, 4 or 6 digits. |
flujo | str | ambos | comtrade only: X (exports), M (imports) or ambos. |
frecuencia | Literal['A', 'M'] | A | comtrade only: A (annual) or M (monthly). |
clave | str | empty | imf/ilo only: dot-separated SDMX key (ECU.CPI._T.IX.M). Empty = pais. |
ultimos | int | 0 | imf/ilo only: last N observations per series. Default 5 (imf) / 3 (ilo) when no desde/hasta. |
format | Literal['text', 'json'] | text | text | json |
Institutional file archives4 Show
search_archivos
File links published by one institution (SRI, MEF, SENAE, INEC, MINEDEC, etc.).
Searches one institution's catalog of published files and returns direct links (title, URL, format), not contents. Sources: sri_datasets, sri_recaudacion, mef, senae, censo, minedec, senescyt, msp, cnig, trabajo_boletin, salarios, arcotel_boletines and arcotel_mensuales. Source censo (censoecuador.gob.ec): ~100 files with `tipo` tabulado, microdatos, diccionario or documento; the results tabulados by theme (population, housing, household) as XLSX or CSV-in-ZIP — the household ICT one (cellphone, internet, computer, tablet by province and cantón) comes up with query "internet" or "tic" —, the microdata bases by cantón, sector and city block (CSV, SPSS, REDATAM) and the dictionaries. Download with download_resource or read_pdf (5 MB cap). Source turismo: the monthly tourism figures bulletins (November 2025 on), now published by the Ministry of Production; PDF only, read_pdf extracts the tables. Source fedexpor: FEDEXPOR's monthly Expordata foreign-trade report from January 2026, on Google Drive (~30 MB, over read_pdf's cap; descarga_directa is the direct link). Source aeade: AEADE's monthly vehicle-sales bulletins (tipo boletin_ventas) and sector yearbooks (tipo anuario). New sources: arcotel_series (the newest XLSX of each of ARCOTEL's 25 statistical series, each with full history), msp_precios (medicine ceiling prices, every revision since 2016), mit_vias (MIT's daily state-road status report) and minedec_bases (AMIE registers by school year 2009-2010 to 2024-2025, start and end cuts, XLSX and CSV, plus thematic files).
| Parameter | Type | Default | Description |
|---|---|---|---|
fuente | Fuente | required | Catalog to search; see the list of sources. |
query | str | empty | Free text matched (accent-insensitive) against each file's title and source fields. Empty returns all files. |
limit | int | 50 | Max files returned (1-100, default 50). |
offset | int | 0 | Pagination offset over the matched files. |
formato | str | empty | Optional exact file format (PDF, XLSX, CSV, ZIP...); not for sri_datasets, sri_recaudacion or censo. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
list_archivo_secciones
Sections of one institution's document archive (ARCSA, Superbancos, SEPS, INEVAL, SGR, SENESCYT, SIPA, Petroecuador, Energy Ministry, CNE, BVG, BVQ, CENACE).
Lists the sections of one institution's document archive: the ARCSA sanitary registry, Superbancos and SEPS statistics, INEVAL evaluation datasets, the SGR, Higher Education and CENACE libraries, SIPA agricultural statistics, EP Petroecuador's Cifras Institucionales, the Energy Ministry's hydrocarbon and mining statistics, CNE election datasets, or the Guayaquil and Quito stock exchanges' statistics. Next: get_archivo_seccion(fuente, seccion).
| Parameter | Type | Default | Description |
|---|---|---|---|
fuente | Fuente | required | One of arcsa, superbancos, seps, ineval, sgr, senescyt, sipa, petroecuador, energia, cne, bvg, bvq, cenace. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_archivo_seccion
Downloadable files of one section of a document archive (title, URL, format).
Lists the files in one section returned by list_archivo_secciones. Each file has title, URL and format, plus source-specific context (group, period, subgroup, description). Returns links, not contents; download large files directly (the preview and download tools cap at 5 MB).
| Parameter | Type | Default | Description |
|---|---|---|---|
fuente | Fuente | required | One of arcsa, superbancos, seps, ineval, sgr, senescyt, sipa, petroecuador, energia, cne, bvg, bvq, cenace. |
seccion | str | required | A section `id` from list_archivo_secciones. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
list_catalogo
List one source's catalog that has no search filters: ARCONEL, BCE daily indicators, Contraloría, IESS, SUT or Consejo de la Judicatura.
List the catalog of one source that has no filters, the step before its get tool. arconel: electricity report types by section, years (1998 on) and company groups; then get_arconel_reporte. bce_diarios: BCE daily/monthly indicator widgets outside BCEData (daily riesgo país since 2004, gold, WTI, bonds, payments, reserves, fiscal and external series); a codigo only means one thing within its archivo; then get_bce_indicador_diario(archivo, codigo). contraloria: quarterly CSVs of approved audit reports and annual control plans; then get_contraloria_informe. iess: IESS document collections (statistical bulletins, actuarial studies, audit reports) with years and counts; then get_iess_archivos(coleccion, anio). sut: Ministerio del Trabajo Power BI dashboards (contracts since 2015, labor demand, gender policy); then get_sut_indicador_schema and query_sut_indicador. judicatura: Power BI dashboards of the Consejo de la Judicatura's Portal de Estadística Judicial (hearings, arrest warrants, training, dismissals, filings, mediation, notaries, judge productivity, judicial auctions, SUPA child-support); then get_sut_indicador_schema(indicador, fuente="judicatura") and query_sut_indicador. Source cfn: the Corporación Financiera Nacional statistics Power BI report (credit lines, disbursements and operations by province, financial inclusion, monthly financial statements, investments, Fondo Nacional de Garantías guarantees).
| Parameter | Type | Default | Description |
|---|---|---|---|
fuente | Fuente | required | Catalog to list: arconel, bce_diarios, contraloria, iess, sut or judicatura. |
format | Literal['text', 'json'] | text | text | json |
Geoportals (INAMHI and MAG)2 Show
search_capas_geo
Geoportal layers: INAMHI and MAG (rainfall, land cover, agriculture) and electricity-sector ArcGIS (ARCONEL, CELEC).
Searches one geoportal's layer catalog: inamhi (precipitation normals, anomalies, WRF grids, watersheds), mag (agro-ecological zoning, land cover, agricultural censuses, rural cadastre), arconel (energy balance and losses by distributor and month 1999-Apr 2024, billing, collection, subsidies and customers 1999-2025, plants, lines, substations, service areas) or celec (CELEC's plants and the March 2025 SNT transmission network; Survey123 layers are excluded on purpose). Each layer carries `capa`, the id get_capa_geo_datos takes. Source igm: 737 WFS layers of official cartography from the Military Geographic Institute (68 national 1:1M from 2024, 505 at 1:50,000 and 164 at 1:25,000; the reserved igm_reservada workspace is left out); categoria picks the scale (nacional, 50k or 25k). Source msp: 9 ArcGIS Online layers of the Ministry of Public Health (6,411 public-network facilities, MSP facilities, 18 sexual and reproductive health indicators by canton 2018-2026, visits and discharges by facility since 2019, fertility, COVID vaccination by canton, EAIS areas, districts).
| Parameter | Type | Default | Description |
|---|---|---|---|
fuente | Fuente | required | inamhi, mag, arconel or celec. |
query | str | empty | Free text matched (accent-insensitive) against the layer's id, name, title or abstract. Empty returns all layers. |
solo_wfs | bool | False | Only return layers with WFS (attribute data). Ignored for arconel and celec. |
categoria | str | empty | Only for fuente="mag": one of its 8 categories. Ignored for inamhi. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
get_capa_geo_datos
Attributes of a geoportal layer: a sample of up to 20 features (WFS) or up to 500 filtered rows (ArcGIS).
Fetches the attributes of a layer from search_capas_geo, geometry coordinates dropped. For inamhi and mag it is a WFS GetFeature sample with no filters; layers without WFS return an error. For arconel and celec it is an ArcGIS REST query: `filtro` is a SQL where clause on the layer's fields (listed in `campos`), e.g. "Anio = 2024 AND IdMes = 4" or "Empresa LIKE 'CNEL%'"; `total_features_en_capa` counts the rows matching it and `hay_mas` says whether to page on with `offset`. Dates come back as ISO dates. For igm the sample carries attributes only (DescribeFeatureType then GetFeature with propertyName), no geometry: one province weighs ~1.5 MB.
| Parameter | Type | Default | Description |
|---|---|---|---|
fuente | Fuente | required | inamhi, mag, arconel or celec. |
capa | str | required | The layer's `capa` from search_capas_geo (INAMHI: "geonode:..." name; MAG: "categoria/store/name"; ArcGIS: the short id, e.g. balance_energia). |
count | int | 5 | Features to fetch: 1-20 for inamhi/mag, 1-500 for arconel/celec (default 5). |
filtro | str | empty | arconel/celec only: SQL where clause; empty for all rows. |
offset | int | 0 | arconel/celec only: rows to skip when paging. |
agrupar | str | empty | arconel/celec/msp only: comma-separated fields to group by; needs `sumar`. |
sumar | str | empty | arconel/celec/msp only: comma-separated numeric fields to sum. |
format | Literal['text', 'json'] | text | Output format: `text` (default) or `json`. |
Missing a tool you need? Propose it.
Contribute