How to Use IBGE locality details in opencode
Returns the geographic record associated with an IBGE locality identifier. Use it to identify a place before joining Brazilian statistics or labeling a map.
Prompts to try with IBGE locality details in opencode
Copy an example into opencode, or ask in your own words.
Use IBGE locality details to look this up and give me the result as a table. Save the result in ./assets.
Pull the latest numbers from IBGE locality details and tell me what changed since last week.
Check IBGE locality details and summarize what you find in three bullet points.
Pull the newest data from IBGE locality details and give me the result as a table.
Check IBGE locality details every morning and tell me only when something changed.
How to set up IBGE locality details in opencode
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
- Sign in
Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.
opencode mcp auth spiral
- Check it
Spiral shows as connected.
opencode mcp list
Use the Spiral skill
- Send opencode this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run IBGE locality details
One request; the result comes back by polling or a webhook.
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/localidade", "input": { "ids": [ "<ids>" ], "nivel": "regioes" } }'
Then paste one of the prompts above: opencode finds IBGE locality details on Spiral, shows the price and runs it.
IBGE locality details providers and prices
Spiral runs IBGE locality details through Alexandria. Open a card for today's price, with every fee included.
Settings you can ask for
Ask opencode for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Nivel | regioes, estados, mesorregioes, microrregioes, regioes-intermediarias, regioes-imediatas, regioes-metropolitanas, municipios and 2 more | Level of the ids. |
Every API field of IBGE service data API · Localidade is on its tool page: open its card above.
What can you do with IBGE locality details in opencode?
Build a Brazil reference dashboard with statistical comparisons, geographic maps, industry definitions, and historical name charts. A coding agent can turn IBGE results into project data files and expose table coverage beside the charts.
Regional economic atlas
Find regional economic tables, inspect their coverage, and map published observations. Add CNAE definitions beside sector comparisons and publication dates beside the indicators.
Sector research briefing
Prepare a briefing on Brazilian manufacturing or services using suitable statistical tables, their definitions, and CNAE labels. Identify the places being compared, map their boundaries, and show upcoming publications.
Public statistics reference portal
Build a portal with separate sections for economic indicators, industry definitions, geographic references, publication schedules, and historical name statistics. Let readers inspect the table definitions behind each statistical comparison.
Newsroom data research desk
Support economic reporting with table discovery, definitions, observations, sector labels, geographic references, and release dates. Use historical name frequencies and rankings for separate census features.
Brazilian place reference map
List municipalities within a selected state, retrieve locality records, and draw their boundaries. Use the result as a geographic reference for regional reporting.
More on IBGE locality details and opencode
Overview
IBGE locality details in other agents
Questions about IBGE locality details in opencode
Can opencode use IBGE locality details?
Yes. Add Spiral to opencode as an MCP server, and opencode can find and run IBGE locality details like any built-in tool.
How much does IBGE locality details cost in opencode?
$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.
Do I need an Alexandria account to use IBGE locality details in opencode?
No. Spiral runs IBGE locality details on its own Alexandria account. You sign in to Spiral once and never paste a key.
How long does it take to set up IBGE locality details in opencode?
About two minutes: add the server, then sign in, then check it.
Does opencode wait while IBGE locality details runs?
IBGE locality details runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.
Does every IBGE statistic cover every municipality?
No. Each statistical table supports its own geographic levels, so a table available nationally or by state may not offer municipal results. Its metadata defines that boundary.
How often does IBGE publish new data?
IBGE sets publication intervals separately for each statistical operation, including monthly, quarterly, and annual schedules. There is no single update schedule for all IBGE data.
How far back can an IBGE statistical series go?
History depends on the selected table. Table metadata specifies the valid period range, so two tables about the same subject can offer different starting dates.
Are IBGE publication dates fixed?
Dates can change. IBGE's 2025 work plan explicitly describes publication dates being changed up to 30 days before the release.
What limits a large IBGE statistical query?
The ibger documentation reports a documented ceiling of 100,000 values per request and observed failures above about 50,000. Split broad statistical requests into smaller periods or geographic selections.
Start using IBGE locality details in opencode
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into opencode:
set up https://spiral.ai/SKILL.md


