IBGE service data API · Agregados
servicodados-ibge-gov-br/official-statistics/agregadosGet market and financial data with IBGE service data API · Agregados from Alexandria through one Spiral API key. Find the agregado id (and then, with agregado_metadados, the variable and classification ids) before calling agregado_dados. Pass a query or at least one filter: the unfiltered catalog has ~8,000 tables. It runs in the background and returns structured JSON. Pay as you go, with no subscription.
Pricing
$0.00873 per call.
Limits
- Runs
- In the background
- Returns
- json
- Longest queue wait
- 1 hour
- Run deadline
- 5 minutes
- Longest run, end to end
- 225 minutes
- Largest inline input
- 1 MB
- Largest input file
- 2 GB
- Largest output
- 5 GB
Input
| Field | Kind | Default | Description |
|---|---|---|---|
limit | number 1 to 500 | 50 | Rows per page (default 50). |
nivel | text | — | Territorial level the table must offer: N1 Brazil, N2 macro-region, N3 UF, N6 municipality... Pattern: ^N[0-9]{1,3}$. |
query | text | — | Substring matched (case- and accent-insensitive) against the table name or the survey name, e.g. |
offset | number 0 to … | — | next_offset from the previous page. |
assunto | number 1 to … | — | Subject id (e.g. 148). See the agregados docs for the list. |
periodo | text | — | Period the table must cover (e.g. 2024 or 202401). Pattern: ^[0-9]{4,6}$. |
classificacao | number 1 to … | — | Classification id the table must carry. |
periodicidade | text | — | Periodicity code: P1 annual, P5 monthly, P8 quarterly, P13 census... Pattern: ^P[0-9]{1,2}$. |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "alexandria",
"model": "servicodados-ibge-gov-br/official-statistics/agregados",
"input": {
"limit": 50
}
}'Frequently asked questions
How much does IBGE service data API · Agregados cost?
$0.00873 per call. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.
How do I use IBGE service data API · Agregados through an API?
Send `POST /v1/runs` with `"provider": "alexandria"`, `"model": "servicodados-ibge-gov-br/official-statistics/agregados"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.
Do I need an account with Alexandria to use IBGE service data API · Agregados?
No. Spiral runs it on its own Alexandria account and charges your Spiral balance.
Can my AI agent use IBGE service data API · Agregados?
Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.