Read values from a SIDRA table
ibge_get_table_dataReads values from one SIDRA table for chosen variables, periods, territorial level, localities and breakdowns. The query is validated against the table's metadata first, so an invalid variable, period, level or category comes back naming the field and the valid options instead of IBGE's bare error. Values are numbers; IBGE's symbols are kept (- is a true zero, X is withheld, .. not applicable). Up to 20,000 values per call. Concise returns the first 40 values plus totals; detailed adds every value as rows. Each answer carries the SIDRA link and a citation line. Read-only; reads IBGE's public API live through Kyrodata (cached up to an hour). An identical call within 10 minutes is served from memo at 0 credits. Result status is ok, denied or error, with the reason in text. Credit class: comex (up to 2 comex tools per 60-second session = 1 credit).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"table": "<table>"
},
"name": "ibge_get_table_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | No | Territorial level of the rows (default N1, Brazil). Must be one the table publishes. | |
| table | Yes | SIDRA table (aggregate) id, e.g. 1612. ibge_search_tables returns ids. | |
| within | No | Keeps only localities inside one parent, as 'LEVEL:id': 'N3:51' returns every municipality of Mato Grosso when level is N6. | |
| periods | No | Period ids as the table publishes them: '2022' (year), '202403' (month or quarter). Overrides lastPeriods. | |
| variables | No | Variable ids from ibge_describe_table. Omitted: every variable except the percentage-of-total ones. | |
| localities | No | Locality ids at `level` (state 35, municipality 3550308 — ibge_find_places returns them). Omitted: all. | |
| lastPeriods | No | How many of the most recent periods to return when periods is omitted (default 1). | |
| classifications | No | Breakdowns. A classification left out is returned at its total, as IBGE does by default. | |
| response_format | No | How much of the answer to return. `concise` (the default) carries the headline figures; `detailed` adds the row-level series behind them and counts against the export quota. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Raw numbers behind the text. | |
| memo | Yes | true = identical call in the last 10 min, served again: 0 credits. | |
| rows | No | Table rows; detailed only, capped per tool. | |
| error | No | Failure message when status = error. | |
| links | Yes | screen = product page with these numbers. | |
| denied | No | When status = denied: reason, feature, upgradeUrl. | |
| status | Yes | ok = data; denied = plan; error = failure or timeout. | |
| window | No | Like-for-like window: from, to (YYYY-MM), label, months, crossesSeason. | |
| caveats | Yes | Reading caveats. | |
| credits | Yes | charged, balance (null = unlimited), resetAt, session {charged, endsAt} of the 60-s billing session. | |
| sources | Yes | Per source: label, nameable, asOf. | |
| dataVersion | Yes | Identity of the data that answered. |