{"components":{"responses":{"InvalidApiKey":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`X-API-Key` malformada, desconhecida ou revogada (`invalid_api_key`). Nunca cacheado (`no-store`)."},"RateLimited":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Limite de pedidos atingido (`rate_limited`): por endereço sem chave, por chave com ela. Nunca cacheado (`no-store`).","headers":{"Retry-After":{"description":"Segundos até o próximo pedido aceito","schema":{"type":"integer"}}}}},"schemas":{"AlertCreated":{"description":"`202` of `POST /v1/alerts`: nothing is active until the e-mail link or the Telegram `Start`.","properties":{"channel":{"type":"string"},"detail":{"description":"PT-BR: what happens next.","type":"string"},"status":{"description":"Always `pending`.","type":"string"},"telegram_link":{"description":"Telegram: the `t.me` link that ties the chat to the alert (`null` for e-mail).","type":["string","null"]}},"required":["status","channel","detail","telegram_link"],"type":"object"},"AlertRequest":{"additionalProperties":false,"description":"`POST /v1/alerts`.","properties":{"channel":{"description":"`email` | `telegram`.","type":"string"},"consent":{"description":"Must be `true`: the person ticked the consent box.","type":"boolean"},"consent_version":{"description":"The `consent_version` of `GET /v1/alerts/config` the form showed.","type":"string"},"email":{"description":"Required for `email`.","type":["string","null"]},"series":{"description":"Series slug (or a former slug).","type":"string"},"threshold":{"description":"In the series' unit; required for `above` and `below`, absent for `release`.","format":"double","type":["number","null"]},"trigger":{"description":"`release` (every new data) | `above` | `below` (a crossing of `threshold`).","type":"string"}},"required":["channel","series","trigger","consent","consent_version","email","threshold"],"type":"object"},"AlertState":{"description":"Answer of the confirmation and the cancellation.","properties":{"cancelled":{"description":"Cancelamento: quantos alertas esta chamada encerrou (0 se já estavam cancelados);\n`null` na confirmação.","format":"int64","minimum":0,"type":["integer","null"]},"series":{"description":"The series of the alert (`null` once cancelled: nothing is kept).","type":["string","null"]},"status":{"description":"`active` | `unsubscribed`.","type":"string"},"threshold":{"format":"double","type":["number","null"]},"trigger":{"type":["string","null"]}},"required":["status","cancelled","series","threshold","trigger"],"type":"object"},"AlertToken":{"description":"Body of `POST /v1/alerts/confirm` and (optionally) of `POST /v1/alerts/unsubscribe`.","properties":{"all":{"description":"Cancelamento: `true` encerra todos os alertas do mesmo endereço (e canal), não só o do\nlink, e apaga o endereço de todos eles.","type":"boolean"},"token":{"type":"string"}},"required":["token"],"type":"object"},"AlertsConfig":{"description":"`GET /v1/alerts/config`: which channels are on, and the consent the form must show.","properties":{"consent_text":{"description":"The consent text the sign-up must show next to its checkbox, and its version (sent back\nin `consent_version`).","type":"string"},"consent_version":{"type":"string"},"email":{"type":"boolean"},"telegram":{"type":"boolean"},"telegram_bot":{"description":"The bot's `@username` when Telegram is on.","type":["string","null"]},"triggers":{"description":"`release` | `above` | `below`.","items":{"type":"string"},"type":"array"}},"required":["email","telegram","consent_text","consent_version","triggers","telegram_bot"],"type":"object"},"ApiKeyCreated":{"description":"Answer of `POST /v1/keys` (201): the only time the key is shown.","properties":{"created_at":{"format":"date-time","type":"string"},"header":{"description":"Request header that carries the key.","example":"X-API-Key","type":"string"},"key":{"description":"The key: `brk_` + 40 hex digits. The API keeps only its hash, so a lost key cannot be\nshown again; generate another.","example":"brk_3f9a1c0d5e7b2a4c6d8e0f1a2b3c4d5e6f7a8b9c","type":"string"},"prefix":{"description":"The first 12 characters, which name the key (support, revocation) without revealing it.","example":"brk_3f9a1c0d","type":"string"},"rate_per_minute":{"description":"Requests per minute with this key (burst of the same size); `null` = no limit.","example":600,"format":"int32","minimum":0,"type":["integer","null"]}},"required":["key","prefix","header","created_at","rate_per_minute"],"type":"object"},"BacktestCandidate":{"description":"Backtest errors of one statistical method.","properties":{"coverage":{"description":"Share of the actual values inside the 80 % interval (0 to 1).","format":"double","type":"number"},"label":{"type":"string"},"mae":{"description":"Mean absolute error, in the unit of the series.","format":"double","type":"number"},"method":{"description":"`ets` | `theta` | `seasonal_naive`.","type":"string"},"smape":{"description":"Symmetric MAPE, in percent.","format":"double","type":"number"}},"required":["method","label","smape","mae","coverage"],"type":"object"},"BacktestDto":{"description":"Rolling-origin backtest of the statistical model: `origins` cut points in the past, each\nforecasting `horizon` steps that were then compared with what happened.","properties":{"candidates":{"description":"Every method compared, the chosen one included (lowest sMAPE wins).","items":{"$ref":"#/components/schemas/BacktestCandidate"},"type":"array"},"coverage":{"format":"double","type":"number"},"horizon":{"minimum":0,"type":"integer"},"mae":{"format":"double","type":"number"},"origins":{"minimum":0,"type":"integer"},"smape":{"description":"Errors of the chosen method (same fields as one candidate).","format":"double","type":"number"}},"required":["origins","horizon","smape","mae","coverage","candidates"],"type":"object"},"Calendar":{"properties":{"from":{"description":"First São Paulo day of the window (inclusive).","format":"date","type":"string"},"releases":{"description":"Releases of the window, by instant.","items":{"$ref":"#/components/schemas/ReleaseDto"},"type":"array"},"to":{"description":"Last São Paulo day of the window (inclusive).","format":"date","type":"string"}},"required":["from","to","releases"],"type":"object"},"Compare":{"properties":{"freq":{"description":"Grouping applied (`d|w|m|q|a`, period mean); `null` when every series keeps its own.","type":["string","null"]},"from":{"description":"Requested start, or the earliest point when absent.","format":"date","type":["string","null"]},"series":{"description":"In the order of `s`.","items":{"$ref":"#/components/schemas/CompareSeries"},"type":"array"},"to":{"description":"Requested end, or the latest point when absent.","format":"date","type":["string","null"]}},"required":["series","freq","from","to"],"type":"object"},"CompareRegional":{"description":"Response of `/v1/compare/regional` (Fase 1.8): UFs (or Grandes Regiões) plus Brazil in one\ncall, same definition as the regional data (not the series' national value).","properties":{"areas":{"description":"Brazil first (when `brazil` is on), then the areas in the order of `cmp`.","items":{"$ref":"#/components/schemas/CompareRegionalArea"},"type":"array"},"decimals":{"format":"int32","minimum":0,"type":"integer"},"direction":{"enum":["higher_is_better","lower_is_better","neutral"],"type":"string"},"frequency":{"enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"from":{"description":"Requested start, or the earliest point when absent.","format":"date","type":["string","null"]},"level":{"description":"`uf` | `grande_regiao` (the level of the areas in `cmp`).","enum":["uf","grande_regiao"],"type":"string"},"name":{"type":"string"},"note":{"type":"string"},"short_name":{"description":"Short name (same as `/v1/series/{slug}`): fits a legend.","type":"string"},"slug":{"type":"string"},"to":{"description":"Requested end, or the latest point when absent.","format":"date","type":["string","null"]},"unit":{"type":"string"}},"required":["slug","name","short_name","level","frequency","unit","decimals","direction","note","areas","from","to"],"type":"object"},"CompareRegionalArea":{"description":"One area of `/v1/compare/regional`: a UF, a Grande Região or Brazil, with its full time\nseries on the regional source (same definition as `RegionalSnapshot::brazil`).","properties":{"code":{"description":"`BR-SP`, `BR-REG-NE` or `BRA`.","type":"string"},"ibge_code":{"description":"IBGE code: 11–53 for a UF, 1–5 for a Grande Região, `0` for Brazil.","format":"int32","minimum":0,"type":"integer"},"is_brazil":{"description":"`true` only for the Brazil row (`code = \"BRA\"`), so the chart can draw it in bold.","type":"boolean"},"name":{"type":"string"},"points":{"items":{"$ref":"#/components/schemas/PointDto"},"type":"array"},"sigla":{"description":"`SP`, `NE` or `BR` (for Brazil).","type":"string"},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SourceDto","description":"Provenance of the most recent point; `null` without data."}]}},"required":["code","sigla","name","ibge_code","is_brazil","points","source"],"type":"object"},"CompareSeries":{"description":"One series of `/v1/compare`, with its own transformation and frequency.","properties":{"catalog_frequency":{"enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"catalog_unit":{"description":"Unit of the series in the catalogue, before the transformation.","type":"string"},"decimals":{"format":"int32","minimum":0,"type":"integer"},"direction":{"enum":["higher_is_better","lower_is_better","neutral"],"type":"string"},"frequency":{"description":"Frequency of `points` (coarser than `catalog_frequency` when `freq` grouped them).","enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"name":{"type":"string"},"peer":{"description":"Country of a `[series.countries]` column (`USA`), only in `/v1/views/{code}/data`; absent\nfor the national series and in `/v1/compare`.","example":"USA","type":"string"},"points":{"items":{"$ref":"#/components/schemas/PointDto"},"type":"array"},"publisher":{"type":"string"},"short_name":{"type":"string"},"slug":{"description":"Current slug (an alias in `s` resolves to it).","type":"string"},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SourceDto","description":"Provenance of the newest point; `null` when the series has no data."}]},"theme":{"type":"string"},"transform":{"description":"`none|mom|yoy|ytd|acc12|ma3|ma6|ma12|rebase:AAAA-MM|diff|log|deflate|annualize`.","type":"string"},"transforms":{"description":"Kinds of transformation the series takes, as in [`SeriesDetail`].","items":{"type":"string"},"type":"array"},"uf":{"description":"UF of a `slug@SP` row (`SP`, #107): the series by state, from its `[series.regional]`\nblock; absent for the national series.","example":"SP","type":"string"},"unit":{"description":"Unit of `points`, after the transformation (as in `/observations`).","type":"string"}},"required":["slug","name","short_name","theme","unit","catalog_unit","frequency","catalog_frequency","direction","decimals","publisher","transform","transforms","points","source"],"type":"object"},"ComponentInfo":{"description":"One part of a series' total (`[series.components]`, ADR-011).","properties":{"code":{"description":"Code of the part: the source's category (`7170` in SIDRA's c315).","example":"7170","type":"string"},"name":{"example":"Alimentação e bebidas","type":"string"}},"required":["code","name"],"type":"object"},"ComponentValueDto":{"description":"One part on one date.","properties":{"code":{"type":"string"},"contribution":{"description":"`value × weight ÷ 100`, in `contribution_unit`, rounded to 4 decimals: how much of the\ntotal comes from this part; `null` without a value or a weight.","format":"double","type":["number","null"]},"value":{"description":"Value in the series' unit (the group's monthly variation, in %); `null` when the source\nhas none for the date.","format":"double","type":["number","null"]},"weight":{"description":"Share of the total on the date, in % of the whole (the parts of a date add up to 100);\n`null` when the source publishes none.","format":"double","type":["number","null"]}},"required":["code","contribution","value","weight"],"type":"object"},"Components":{"description":"The parts of a series' total over time (`GET /v1/series/{slug}/components`, ADR-011).","properties":{"components":{"description":"The parts in the catalogue's order.","items":{"$ref":"#/components/schemas/ComponentInfo"},"type":"array"},"contribution_unit":{"description":"Unit of `contribution`: `p.p.` for a series in %, else the series' unit.","type":"string"},"decimals":{"format":"int32","minimum":0,"type":"integer"},"direction":{"enum":["higher_is_better","lower_is_better","neutral"],"type":"string"},"frequency":{"enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"from":{"description":"Requested start, or the earliest date when absent.","format":"date","type":["string","null"]},"note":{"description":"How the parts make the total (PT-BR, shown next to the composition charts).","type":"string"},"points":{"description":"Dates with at least one part, oldest first.","items":{"$ref":"#/components/schemas/ComponentsPoint"},"type":"array"},"slug":{"type":"string"},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SourceDto","description":"Provenance of the most recently fetched part; `null` without data."}]},"to":{"description":"Requested end, or the latest date when absent.","format":"date","type":["string","null"]},"unit":{"description":"Unit of `value` and `total` (the series').","type":"string"}},"required":["slug","unit","contribution_unit","decimals","frequency","direction","note","components","points","from","source","to"],"type":"object"},"ComponentsPoint":{"description":"Every part on one date.","properties":{"date":{"format":"date","type":"string"},"total":{"description":"The series' own value on the date (the total the contributions add up to, give or take\nthe publisher's rounding); `null` when it is not stored.","format":"double","type":["number","null"]},"values":{"description":"One entry per part, in the order of `components`.","items":{"$ref":"#/components/schemas/ComponentValueDto"},"type":"array"}},"required":["date","values","total"],"type":"object"},"CountriesInfo":{"description":"What a series offers by country (`[series.countries]`, ADR-010 extension of Fase 1.6). Its\nfrequency may differ from the series' own (WDI is annual, GEM monthly).","properties":{"decimals":{"format":"int32","minimum":0,"type":"integer"},"frequency":{"enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"latest_date":{"description":"Latest date of the main source's peers (of any source when it has none, #144); `null`\nbefore the first collection or without a database.","example":"2024-01-01","format":"date","type":["string","null"]},"name":{"description":"What the country number is: the series' `name`, or the block's own when the measure\ndiffers (the caption of the \"Brasil vs. mundo\" line).","type":"string"},"note":{"description":"How the country number differs from the national one (PT-BR, shown next to the chart).","type":"string"},"peers":{"description":"Peer codes in catalogue order (`BTreeMap` sorted): ISO 3166-1 alpha-3 (`USA`, `DEU`) and\nWB aggregates (`WLD`, `OED`, `EUU`). Brazil is not here — it comes from the national\nseries.","items":{"type":"string"},"type":"array"},"unit":{"description":"Unit of the country values: the series' `unit`, or the block's own when it differs.","type":"string"}},"required":["peers","frequency","name","unit","decimals","note","latest_date"],"type":"object"},"CountryHistory":{"description":"History of one peer (`GET /v1/series/{slug}/countries/{code}`).","properties":{"code":{"description":"ISO 3166-1 alpha-3 or WB aggregate.","type":"string"},"decimals":{"format":"int32","minimum":0,"type":"integer"},"frequency":{"enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"from":{"format":"date","type":["string","null"]},"note":{"type":"string"},"points":{"items":{"$ref":"#/components/schemas/PointDto"},"type":"array"},"slug":{"type":"string"},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SourceDto"}]},"to":{"format":"date","type":["string","null"]},"unit":{"type":"string"}},"required":["slug","code","frequency","unit","decimals","note","points","from","source","to"],"type":"object"},"CountryPeerValue":{"description":"One peer of `/v1/series/{slug}/countries` on a given date (ADR-010 extension, Fase 1.6).","properties":{"code":{"description":"ISO 3166-1 alpha-3 (`USA`, `DEU`) or WB aggregate (`WLD`, `OED`, `EUU`).","type":"string"},"value":{"description":"`null` when the peer has no row on the date yet.","format":"double","type":["number","null"]}},"required":["code","value"],"type":"object"},"CountrySnapshot":{"description":"Every peer of a `[series.countries]` block on one date (`GET /v1/series/{slug}/countries`).\nBrazil is not here: it comes from the national series (`/observations`).","properties":{"date":{"description":"The date shown (requested or latest); `null` before the first collection.","format":"date","type":["string","null"]},"dates":{"description":"Dates with at least one peer, oldest first.","items":{"type":"string"},"type":"array"},"decimals":{"format":"int32","minimum":0,"type":"integer"},"direction":{"enum":["higher_is_better","lower_is_better","neutral"],"type":"string"},"frequency":{"description":"Frequency of the country series (`[series.countries].frequency`, may differ from the\nnational one).","enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"note":{"type":"string"},"peers":{"description":"Peers in catalogue order (`BTreeMap` sorted by ISO code).","items":{"$ref":"#/components/schemas/CountryPeerValue"},"type":"array"},"slug":{"type":"string"},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SourceDto","description":"Provenance of the most recently fetched peer; `null` without data."}]},"unit":{"type":"string"}},"required":["slug","frequency","unit","decimals","direction","note","dates","peers","date","source"],"type":"object"},"ErrorBody":{"properties":{"detail":{"type":"string"},"error":{"description":"`not_found` | `invalid_parameter` | `database_unavailable` | `internal_error` |\n`payload_too_large` | `unsupported_media_type` | `rate_limited` | `invalid_api_key` |\n`daily_cap_reached`.","type":"string"}},"required":["error"],"type":"object"},"EventDto":{"properties":{"date":{"format":"date","type":"string"},"description":{"type":"string"},"scope":{"type":"string"},"title":{"type":"string"}},"required":["date","title","description","scope"],"type":"object"},"EventList":{"properties":{"events":{"items":{"$ref":"#/components/schemas/EventDto"},"type":"array"}},"required":["events"],"type":"object"},"FactDto":{"properties":{"date":{"format":"date","type":["string","null"]},"key":{"type":"string"},"label_pt":{"type":"string"},"text_pt":{"type":"string"},"unit":{"type":["string","null"]},"value":{"format":"double","type":["number","null"]}},"required":["key","label_pt","text_pt","date","unit","value"],"type":"object"},"Forecast":{"description":"`GET /v1/series/{slug}/forecast`: every origin of projection of the series, side by side.","properties":{"direction":{"enum":["higher_is_better","lower_is_better","neutral"],"type":"string"},"disclaimer":{"description":"\"Projeção estatística, não é recomendação de investimento.\"","type":"string"},"scenarios":{"$ref":"#/components/schemas/ScenarioLabels"},"slug":{"type":"string"},"sources":{"description":"Model first, then Focus and GEP; empty when the series has no projection (see\n`unavailable_reason`).","items":{"$ref":"#/components/schemas/ForecastSource"},"type":"array"},"unavailable_reason":{"description":"PT-BR reason why `sources` is empty: a series excluded by the catalogue (market\nexpectations, several components per date), fewer than 24 observations, or not computed\nyet; `null` when there is at least one projection.","type":["string","null"]},"unit":{"type":"string"}},"required":["slug","unit","direction","scenarios","disclaimer","sources","unavailable_reason"],"type":"object"},"ForecastPointDto":{"description":"One forecast step. `lower`/`upper` are `null` when the origin has no interval.","properties":{"date":{"format":"date","type":"string"},"lower":{"format":"double","type":["number","null"]},"max":{"format":"double","type":"number"},"min":{"description":"Focus: lowest and highest answer (absent for the other origins).","format":"double","type":"number"},"point":{"format":"double","type":"number"},"respondents":{"description":"Focus: institutions that answered for this period (absent for the other origins).","format":"int32","minimum":0,"type":"integer"},"upper":{"format":"double","type":["number","null"]}},"required":["date","point","lower","upper"],"type":"object"},"ForecastSource":{"description":"One origin of the projections: the statistical model, market expectations (Focus) or an\ninstitution (World Bank GEP).","properties":{"backtest":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BacktestDto","description":"Historical error of the statistical model; `null` for the other origins."}]},"band":{"description":"PT-BR description of the band (\"faixa de 80% de probabilidade estimada\", \"mediana ± 1\ndesvio-padrão das respostas\"); `null` without a band.","type":["string","null"]},"base_date":{"description":"Last observation the projection starts from (the statistical model).","format":"date","type":["string","null"]},"generated_at":{"format":"date-time","type":"string"},"label":{"description":"PT-BR label shown next to the numbers, e.g. \"modelo estatístico: método Theta\".","type":"string"},"level":{"description":"Coverage of the interval (`0.8`); `null` without a probabilistic interval.","format":"double","type":["number","null"]},"method":{"description":"Statistical method (`ets` | `theta` | `seasonal_naive`); `null` for the other origins.","type":["string","null"]},"note":{"description":"PT-BR note on how the origin's concept differs from the series' (the GEP measures growth\nat average 2010–19 prices and exchange rates); `null` when there is nothing to add.","type":["string","null"]},"origin":{"description":"`model` | `focus` | `wb_gep`.","type":"string"},"points":{"items":{"$ref":"#/components/schemas/ForecastPointDto"},"type":"array"},"published_on":{"description":"Date of a market or institutional projection: the Focus survey date (the Friday the\nBoletim Focus is dated with, released the following Monday) or the GEP edition date.","format":"date","type":["string","null"]},"spec":{"description":"Fitted model, e.g. `ETS(A,Ad,N) α=0.35 β=0.035 φ=0.90`; `null` for the other origins.","type":["string","null"]}},"required":["origin","label","generated_at","points","backtest","band","base_date","level","method","note","published_on","spec"],"type":"object"},"Insights":{"properties":{"computed_at":{"format":"date-time","type":"string"},"facts":{"items":{"$ref":"#/components/schemas/FactDto"},"type":"array"},"from":{"format":"date","type":["string","null"]},"narrative":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/NarrativeDto","description":"Narrative of the stored facts (layer 2, ADR-005): 3 to 5 sentences written by a language\nmodel from those facts only, every number checked against them. `null` without one: no\nkey, cap reached, text discarded, or a free `from`/`to` window (never stored)."}]},"preset":{"description":"Preset whose facts were served (the ones the collector stored, computed on the spot until\nit does); `null` for a free `from`/`to` window, always computed on the spot. No parameter\nat all means `max`.","example":"5a","type":["string","null"]},"slug":{"type":"string"},"to":{"format":"date","type":["string","null"]}},"required":["slug","facts","computed_at","from","narrative","preset","to"],"type":"object"},"Latest":{"description":"Latest stored value of a series.","properties":{"date":{"example":"2026-09-01","format":"date","type":"string"},"source_kind":{"type":"string"},"value":{"format":"double","type":"number"}},"required":["date","value","source_kind"],"type":"object"},"NarrativeDto":{"description":"Text of the narrative layer and the model that wrote it (shown as \"texto gerado\nautomaticamente\").","properties":{"model":{"example":"claude-haiku-5-5","type":"string"},"text":{"type":"string"}},"required":["text","model"],"type":"object"},"Observations":{"properties":{"from":{"format":"date","type":["string","null"]},"points":{"items":{"$ref":"#/components/schemas/PointDto"},"type":"array"},"slug":{"type":"string"},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SourceDto","description":"Provenance of the newest point; `null` when the series has no data."}]},"to":{"format":"date","type":["string","null"]},"transform":{"type":"string"},"unit":{"type":"string"}},"required":["slug","unit","transform","points","from","source","to"],"type":"object"},"PeerComparison":{"description":"Brazil against a comparison group (`GET /v1/series/{slug}/peers`, \"Brasil vs. mundo\"). Every\nnumber comes from the series' `[series.countries]` block, Brazil included (the same\nindicator as the peers, not the national series).","properties":{"aggregate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PeerValueDto","description":"The group's WDI aggregate (`LCN`, `OED`, `WLD`); `null` for a group without one (BRICS)."}]},"brazil":{"$ref":"#/components/schemas/PeerValueDto"},"brazil_rank":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PeerRankDto","description":"`null` while Brazil has no recent value."}]},"date":{"description":"The requested `date`; `null` = each country's latest value.","format":"date","type":["string","null"]},"decimals":{"format":"int32","minimum":0,"type":"integer"},"direction":{"enum":["higher_is_better","lower_is_better","neutral"],"type":"string"},"frequency":{"description":"Frequency of the country data (`[series.countries].frequency`).","enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"group":{"$ref":"#/components/schemas/PeerGroupDto","description":"The group shown."},"groups":{"description":"Every group of the series (its `compare.groups`, or all of `groups.toml`), the first\nbeing the default.","items":{"$ref":"#/components/schemas/PeerGroupDto"},"type":"array"},"latest_date":{"description":"The most recent date among Brazil, the members and the aggregate; `null` without data.","format":"date","type":["string","null"]},"members":{"description":"The group's countries (for a group without members, such as `mundo`, every\ncountry of the block), best first for the direction, then those without a recent value\nby code. Brazil goes at position `brazil_rank.rank`.","items":{"$ref":"#/components/schemas/PeerValueDto"},"type":"array"},"name":{"description":"What the country number is (the block's name or the series').","type":"string"},"note":{"type":"string"},"sentence":{"description":"Fixed PT-BR sentence with the rank and the aggregate (insights layer 1).","type":["string","null"]},"slug":{"type":"string"},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SourceDto","description":"Provenance of the most recently fetched value; `null` without data."}]},"unit":{"type":"string"}},"required":["slug","group","groups","frequency","unit","decimals","direction","name","note","brazil","members","aggregate","brazil_rank","date","latest_date","sentence","source"],"type":"object"},"PeerGroupDto":{"description":"A comparison group of `catalog/groups.toml` (`latam`, `brics`, `ocde`, `mundo`).","properties":{"id":{"type":"string"},"name":{"description":"`América Latina`, `BRICS`.","type":"string"}},"required":["id","name"],"type":"object"},"PeerRankDto":{"description":"Brazil's position among the countries with a value (`of` counts Brazil).","properties":{"of":{"minimum":0,"type":"integer"},"rank":{"description":"1 = the best for the series' direction (the highest for `higher_is_better` and\n`neutral`, the lowest for `lower_is_better`); ties share the position.","minimum":0,"type":"integer"}},"required":["rank","of"],"type":"object"},"PeerValueDto":{"description":"One country or WB aggregate of `/v1/series/{slug}/peers`.","properties":{"code":{"description":"ISO 3166-1 alpha-3 (`ARG`, `BRA`) or WB aggregate (`LCN`, `WLD`).","type":"string"},"date":{"description":"Date of `value`: each country's latest (the years may differ) or the requested `date`;\n`null` without a value, or with one older than five years before `latest_date`.","format":"date","type":["string","null"]},"name":{"description":"Name in PT-BR (`Argentina`, `América Latina e Caribe`).","type":"string"},"value":{"format":"double","type":["number","null"]}},"required":["code","name","date","value"],"type":"object"},"PointDto":{"properties":{"date":{"format":"date","type":"string"},"value":{"format":"double","type":"number"}},"required":["date","value"],"type":"object"},"RegionDto":{"description":"A UF or Grande Região of `GET /v1/regions`.","properties":{"code":{"description":"`BR-SP` (ISO 3166-2) or `BR-REG-NE`.","example":"BR-SP","type":"string"},"ibge_code":{"description":"IBGE code: 11–53 for a UF, 1–5 for a Grande Região.","example":35,"format":"int32","minimum":0,"type":"integer"},"level":{"description":"`uf` | `grande_regiao`.","enum":["uf","grande_regiao"],"type":"string"},"name":{"example":"São Paulo","type":"string"},"region":{"description":"Code of the UF's Grande Região (`BR-REG-SE`); `null` for a region.","type":["string","null"]},"sigla":{"example":"SP","type":"string"}},"required":["code","sigla","name","ibge_code","level","region"],"type":"object"},"RegionList":{"properties":{"regions":{"description":"The 27 UFs (by IBGE code), then the 5 Grandes Regiões.","items":{"$ref":"#/components/schemas/RegionDto"},"type":"array"}},"required":["regions"],"type":"object"},"RegionalAreaValue":{"description":"One area of a regional snapshot.","properties":{"code":{"type":"string"},"diff_brazil":{"description":"`value − brazil.value`, in the regional unit, rounded to `decimals`; `null` without either.","format":"double","type":["number","null"]},"ibge_code":{"format":"int32","minimum":0,"type":"integer"},"name":{"type":"string"},"rank":{"description":"Position by the series' `direction` (best first; `neutral`: largest first); ties share\na position (\"1, 2, 2, 4\"), compared at the regional `decimals`. `null` without a value.","format":"int32","minimum":0,"type":["integer","null"]},"sigla":{"type":"string"},"value":{"description":"`null` when the source has no value for the area on this date (listed last).","format":"double","type":["number","null"]}},"required":["code","ibge_code","sigla","name","diff_brazil","rank","value"],"type":"object"},"RegionalHistory":{"description":"History of one area (`GET /v1/series/{slug}/regions/{uf}`).","properties":{"area":{"$ref":"#/components/schemas/RegionDto"},"decimals":{"format":"int32","minimum":0,"type":"integer"},"frequency":{"enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"from":{"format":"date","type":["string","null"]},"note":{"type":"string"},"points":{"items":{"$ref":"#/components/schemas/PointDto"},"type":"array"},"slug":{"type":"string"},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SourceDto","description":"Provenance of the newest point; `null` without data."}]},"to":{"format":"date","type":["string","null"]},"unit":{"description":"Unit of the regional values (`RegionalInfo::unit`).","type":"string"}},"required":["slug","area","frequency","unit","decimals","note","points","from","source","to"],"type":"object"},"RegionalInfo":{"description":"What a series offers by UF (ADR-010). Its frequency may differ from the series' own.","properties":{"decimals":{"description":"Decimals of the regional values (the series', or the block's own).","format":"int32","minimum":0,"type":"integer"},"frequency":{"enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"latest_date":{"description":"Latest date with UF data; `null` before the first collection or without a database.","example":"2026-04-01","format":"date","type":["string","null"]},"levels":{"description":"Levels with data, UF first: `uf` and, when the source publishes them, `grande_regiao`.","examples":[["uf","grande_regiao"]],"items":{"enum":["uf","grande_regiao"],"type":"string"},"type":"array"},"map_scale":{"description":"Colour scale of the UF map: `sequential` (one hue, low → high) or `diverging` (two hues\naround zero, for rates of change).","enum":["sequential","diverging"],"type":"string"},"name":{"description":"What the regional number is: the series' `name`, or the block's own when the measure\ndiffers (the caption of the map and the table on /estados).","type":"string"},"note":{"description":"How the regional number differs from the national one (PT-BR, shown next to the map).","type":"string"},"unit":{"description":"Unit of the regional values: the series' `unit`, or the block's own when it differs\n(`%`: the variation by UF of a series whose national number is an index).","type":"string"}},"required":["levels","frequency","name","unit","decimals","map_scale","note","latest_date"],"type":"object"},"RegionalSnapshot":{"description":"Every area of a level on one date (`GET /v1/series/{slug}/regions`).","properties":{"areas":{"description":"Every area of the level: ranked first, then the ones without a value.","items":{"$ref":"#/components/schemas/RegionalAreaValue"},"type":"array"},"brazil":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/PointDto","description":"Brazil on the same date in the regional source's definition (`BRA`), not the national\nseries' value; `null` when the source does not publish it."}]},"date":{"description":"The date shown (the requested one, or the latest); `null` before the first collection.","example":"2026-04-01","format":"date","type":["string","null"]},"dates":{"description":"Dates with data for this level, oldest first (for a block whose values the API derives,\n`ibc-br`, only the dates whose base, 12 months earlier, the level also has).","items":{"type":"string"},"type":"array"},"decimals":{"description":"Decimals of the regional values: ranking ties and `diff_brazil` use them.","format":"int32","minimum":0,"type":"integer"},"direction":{"enum":["higher_is_better","lower_is_better","neutral"],"type":"string"},"frequency":{"description":"Frequency of the regional data (may differ from the series').","enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"level":{"enum":["uf","grande_regiao"],"type":"string"},"map_scale":{"description":"`sequential` | `diverging` (`RegionalInfo::map_scale`).","enum":["sequential","diverging"],"type":"string"},"note":{"type":"string"},"slug":{"type":"string"},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SourceDto","description":"Provenance of the most recently fetched row of the date; `null` without data. A block with\none SGS series per area (`ibc-br`) names every code in `ref` (`BR-AM=25411,…,BRA=24363`)."}]},"unit":{"description":"Unit of the regional values (`RegionalInfo::unit`).","type":"string"}},"required":["slug","level","frequency","unit","decimals","direction","map_scale","note","dates","areas","brazil","date","source"],"type":"object"},"ReleaseDto":{"description":"One release of the calendar (issue #132).","properties":{"date":{"description":"Day of the release in São Paulo.","example":"2026-11-12","format":"date","type":"string"},"product":{"description":"Short name of the product (`IPCA`, `PNAD Contínua`, `Copom`, `Focus`).","type":"string"},"publisher":{"description":"`IBGE`, `BCB`.","type":"string"},"reference_end":{"description":"Last month (first day) of the reference period.","format":"date","type":["string","null"]},"reference_pt":{"description":"The reference period in PT-BR: `out/2026`, `jul–set/2026`, `2025`.","example":"out/2026","type":["string","null"]},"reference_start":{"description":"First month (first day) of the reference period; `null` without one (Copom, Focus).","format":"date","type":["string","null"]},"release_at":{"description":"Instant of the release (UTC).","example":"2026-11-12T12:00:00Z","format":"date-time","type":"string"},"series":{"description":"Series the release updates, in `calendar.toml` order.","items":{"$ref":"#/components/schemas/ReleaseSeriesDto"},"type":"array"},"time":{"description":"Time of the release in São Paulo, `HH:MM`.","example":"09:00","type":"string"},"title":{"type":"string"},"url":{"description":"The publisher's page of the product.","type":"string"}},"required":["release_at","date","time","publisher","product","title","url","series","reference_end","reference_pt","reference_start"],"type":"object"},"ReleaseSeriesDto":{"description":"A series a release updates (`/v1/calendar`, `next_releases`).","properties":{"short_name":{"type":"string"},"slug":{"type":"string"},"theme":{"type":"string"}},"required":["slug","short_name","theme"],"type":"object"},"ScenarioLabels":{"description":"Names of the three scenarios for one series (ADR-004 §4): `lower`, `point` and `upper` are the\nlower bound, the central value and the upper bound of every forecast step.","properties":{"lower":{"description":"`otimista` (lower is better), `pessimista` (higher is better) or `baixo` (neutral).","type":"string"},"point":{"description":"`realista`, or `central` for a neutral series.","type":"string"},"upper":{"description":"`pessimista` (lower is better), `otimista` (higher is better) or `alto` (neutral).","type":"string"}},"required":["lower","point","upper"],"type":"object"},"SearchResult":{"properties":{"latest":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Latest"}]},"name":{"type":"string"},"score":{"format":"int32","minimum":0,"type":"integer"},"slug":{"type":"string"},"theme":{"type":"string"}},"required":["slug","name","theme","score","latest"],"type":"object"},"SearchResults":{"properties":{"results":{"items":{"$ref":"#/components/schemas/SearchResult"},"type":"array"}},"required":["results"],"type":"object"},"SeriesDetail":{"allOf":[{"$ref":"#/components/schemas/SeriesSummary"},{"properties":{"capabilities":{"items":{"type":"string"},"type":"array"},"description":{"type":"string"},"fallbacks":{"description":"Fallback sources in priority order (same shape plus `label`, `max_lag_hours`).","items":{"additionalProperties":true,"properties":{"kind":{"type":"string"},"label":{"type":"string"}},"required":["kind"],"type":"object"},"type":"array"},"fetched_at":{"format":"date-time","type":["string","null"]},"fetched_via":{"description":"Network that fetched the latest observation: `direct`, `vps`, `ci` or `home-proxy`.","type":["string","null"]},"first_date":{"format":"date","type":["string","null"]},"former_slugs":{"items":{"type":"string"},"type":"array"},"lag_notice":{"description":"Known publication lag of the source, as a PT-BR notice for the indicator page (e.g. the\nTesouro Direto file, about a week late); `null` when the catalogue declares none.","type":["string","null"]},"last_date":{"format":"date","type":["string","null"]},"license":{"type":["string","null"]},"next_releases":{"description":"The next releases (up to 3) of the calendar products that update the series\n(`catalog/calendar.toml`), from now on; empty without a database or a product.","items":{"$ref":"#/components/schemas/ReleaseDto"},"type":"array"},"observations_count":{"format":"int64","type":"integer"},"publisher_url":{"type":"string"},"source":{"additionalProperties":true,"description":"Primary source: `kind` plus the adapter parameters (`code`, `table`, `variable`, …).","properties":{"kind":{"type":"string"},"label":{"type":"string"}},"required":["kind"],"type":"object"},"source_kind":{"description":"Source kind that delivered the latest observation (the primary or one of the fallbacks).","type":["string","null"]},"synonyms":{"items":{"type":"string"},"type":"array"},"target":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TargetInfo"}]},"transforms":{"description":"Kinds of `?transform=` the series takes, in a fixed order (`mom`, `yoy`, `ytd`, `acc12`,\n`ma3`, `ma6`, `ma12`, `rebase`, `diff`, `log`, `deflate`, `annualize`; `rebase` stands\nfor `rebase:AAAA-MM`). They follow the frequency, the unit and the catalogue `measure`: a\nrate changes in p.p. and only a variation compounds, only a flow adds up, only nominal\nreais deflate.","example":["mom","yoy","ytd","acc12","ma3","ma6","ma12","rebase","diff","log","annualize"],"items":{"type":"string"},"type":"array"}},"required":["description","publisher_url","synonyms","source","fallbacks","former_slugs","capabilities","transforms","observations_count","next_releases","fetched_at","fetched_via","first_date","lag_notice","last_date","license","source_kind","target"],"type":"object"}]},"SeriesFreshnessDto":{"properties":{"fetched_at":{"format":"date-time","type":"string"},"last_date":{"format":"date","type":"string"},"slug":{"type":"string"},"source_kind":{"type":"string"}},"required":["slug","last_date","fetched_at","source_kind"],"type":"object"},"SeriesList":{"properties":{"series":{"items":{"$ref":"#/components/schemas/SeriesSummary"},"type":"array"}},"required":["series"],"type":"object"},"SeriesSummary":{"properties":{"countries":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CountriesInfo","description":"Data by country (`[series.countries]`); `null` for a series without it."}]},"decimals":{"format":"int32","minimum":0,"type":"integer"},"direction":{"enum":["higher_is_better","lower_is_better","neutral"],"type":"string"},"frequency":{"enum":["daily","weekly","monthly","quarterly","annual"],"type":"string"},"latest":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Latest","description":"`null` until the series has data."}]},"name":{"type":"string"},"publisher":{"type":"string"},"regional":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/RegionalInfo","description":"Data by UF (`[series.regional]`); `null` for a series without it."}]},"short_name":{"description":"Required by the catalogue validation, like `publisher` here and `description` and\n`publisher_url` in [`SeriesDetail`] (never `null`).","type":"string"},"slug":{"type":"string"},"theme":{"type":"string"},"unit":{"type":"string"}},"required":["slug","name","short_name","theme","unit","frequency","direction","decimals","publisher","countries","latest","regional"],"type":"object"},"SourceDto":{"properties":{"fetched_at":{"format":"date-time","type":"string"},"fetched_via":{"type":"string"},"kind":{"type":"string"},"ref":{"type":["string","null"]},"vintage_date":{"format":"date","type":"string"}},"required":["kind","fetched_via","vintage_date","fetched_at","ref"],"type":"object"},"SourceStatus":{"properties":{"consecutive_failures":{"format":"int32","type":"integer"},"enabled":{"type":"boolean"},"kind":{"type":"string"},"last_error":{"type":["string","null"]},"last_ok_at":{"format":"date-time","type":["string","null"]},"status":{"description":"`ok` | `degraded` | `blocked` | `disabled` | `unknown` (no database).","type":"string"}},"required":["kind","enabled","status","consecutive_failures","last_error","last_ok_at"],"type":"object"},"Status":{"properties":{"database":{"description":"`ok` | `unavailable`: whether the API could read `source_health`.","type":"string"},"generated_at":{"format":"date-time","type":"string"},"series_freshness":{"items":{"$ref":"#/components/schemas/SeriesFreshnessDto"},"type":"array"},"sources":{"items":{"$ref":"#/components/schemas/SourceStatus"},"type":"array"},"version":{"type":"string"}},"required":["version","generated_at","database","sources","series_freshness"],"type":"object"},"TargetInfo":{"properties":{"applies_to":{"type":["string","null"]},"tolerance":{"format":"double","type":"number"},"value":{"format":"double","type":"number"}},"required":["value","tolerance","applies_to"],"type":"object"},"ThemeDetail":{"properties":{"series":{"items":{"$ref":"#/components/schemas/SeriesSummary"},"type":"array"},"theme":{"$ref":"#/components/schemas/ThemeRef"}},"required":["theme","series"],"type":"object"},"ThemeList":{"properties":{"themes":{"items":{"$ref":"#/components/schemas/ThemeSummary"},"type":"array"}},"required":["themes"],"type":"object"},"ThemeRef":{"properties":{"name":{"type":"string"},"slug":{"type":"string"}},"required":["slug","name"],"type":"object"},"ThemeSummary":{"properties":{"name":{"type":"string"},"series_count":{"minimum":0,"type":"integer"},"slug":{"type":"string"}},"required":["slug","name","series_count"],"type":"object"},"ViewCreated":{"description":"Answer of `POST /v1/views`: `201` with `created: true` for a new code, `200` with\n`created: false` when the same (canonical) view already had one.","properties":{"code":{"description":"8 Crockford base32 symbols (no I, L, O, U), the last one a Luhn mod 32 check.","example":"72E9HQGG","type":"string"},"created":{"type":"boolean"},"display":{"description":"The code as shown to people: two groups of four.","example":"72E9-HQGG","type":"string"},"spec":{"$ref":"#/components/schemas/ViewSpec","description":"The canonical spec the code was derived from."},"url":{"description":"Read-only page of the view (`{PUBLIC_URL}/v/{display}`).","example":"https://brradar.com.br/v/72E9-HQGG","type":"string"},"warnings":{"description":"Adjustments made to the request (alias replaced, transformation dropped on a peer, `cmp`\nfallback).","items":{"$ref":"#/components/schemas/ViewWarning"},"type":"array"}},"required":["code","display","url","spec","warnings","created"],"type":"object"},"ViewData":{"description":"`GET /v1/views/{code}/data` (and `export.json`): the data of a view, as `/v1/compare` serves\nit, with the view's code and spec. One row per series of the spec, in its order; a\n`[series.countries]` peer carries `peer` and is served as published.","properties":{"code":{"example":"72E9HQGG","type":"string"},"display":{"example":"72E9-HQGG","type":"string"},"freq":{"description":"Grouping of the view (`d|w|m|q|a`, period mean); `null` when every series keeps its own.","type":["string","null"]},"from":{"description":"The view's start, or the earliest point when it has none.","format":"date","type":["string","null"]},"series":{"items":{"$ref":"#/components/schemas/CompareSeries"},"type":"array"},"spec":{"$ref":"#/components/schemas/ViewSpec"},"to":{"description":"The view's end, or the latest point when it has none.","format":"date","type":["string","null"]},"url":{"example":"https://brradar.com.br/v/72E9-HQGG","type":"string"},"warnings":{"items":{"$ref":"#/components/schemas/ViewWarning"},"type":"array"}},"required":["code","display","url","spec","warnings","series","freq","from","to"],"type":"object"},"ViewDetail":{"description":"Answer of `GET /v1/views/{code}`: the stored spec in the current version, read against the\ncatalogue of today.","properties":{"code":{"example":"72E9HQGG","type":"string"},"created_at":{"format":"date-time","type":"string"},"display":{"example":"72E9-HQGG","type":"string"},"spec":{"$ref":"#/components/schemas/ViewSpec","description":"The stored spec after renames and removals in the catalogue (dates never change)."},"url":{"example":"https://brradar.com.br/v/72E9-HQGG","type":"string"},"warnings":{"description":"What changed since the code was made (`series_renamed`, `series_removed`,\n`duplicate_series`, `transform_fallback`, `chart_fallback`); empty when nothing did.","items":{"$ref":"#/components/schemas/ViewWarning"},"type":"array"}},"required":["code","display","url","spec","warnings","created_at"],"type":"object"},"ViewErrorBody":{"description":"`400` of `POST /v1/views`: every problem of the body at once.","properties":{"detail":{"type":"string"},"error":{"description":"`invalid_view`.","type":"string"},"errors":{"items":{"$ref":"#/components/schemas/ViewFieldError"},"type":"array"}},"required":["error","errors"],"type":"object"},"ViewFieldError":{"description":"One problem of a `POST /v1/views` body.","properties":{"code":{"description":"`invalid_json` | `unknown_field` | `missing_field` | `invalid_value` |\n`unsupported_version` | `too_few_series` | `too_many_series` | `invalid_slug` |\n`unknown_series` | `duplicate_series` | `invalid_peer` | `unknown_peer` | `invalid_uf` |\n`unknown_uf` | `invalid_transform` | `incompatible_transform` | `date_too_early` | `date_too_late` |\n`invalid_period` | `incompatible_chart` | `invalid_geo`.","example":"unknown_series","type":"string"},"field":{"description":"Path of the field (`s[1].id`, `from`, `body`).","example":"s[1].id","type":"string"}},"required":["field","code"],"type":"object"},"ViewSeriesRef":{"description":"One series of a shareable view (ViewSpec `s[]`); `slug[@PEER|@UF][:t]` in the URL of the page.","properties":{"id":{"description":"Catalogue slug. On input a former slug (alias) is accepted and answered as the current one\n(warning `series_renamed`).","example":"ipca-12m","type":"string"},"peer":{"description":"ISO 3166-1 alpha-3 (or World Bank aggregate) code of a `[series.countries]` peer, the series\nas measured for that country (`USA`, `WLD`); absent = Brazil (`BRA` is refused).","example":"USA","type":"string"},"t":{"description":"Transformation in the `?transform=` grammar, never `none`; absent = original values.\nDropped on a peer (warning `transform_dropped`), which the page draws untransformed.","example":"acc12","type":"string"},"uf":{"description":"Sigla of a UF (`SP`): the series by state, from its `[series.regional]` block; never\ntogether with `peer`.","example":"SP","type":"string"}},"required":["id"],"type":"object"},"ViewSpec":{"description":"ViewSpec v1 (docs/anexos/visualizacoes-compartilhaveis.md §2): only enums, dates and catalogue\nslugs, never free text; an unknown field is a 400. The request body of `POST /v1/views` and the\n`spec` of its answers, which is the canonical form: absolute dates (no `p`), current slugs,\ndefaults omitted (`chart` `line`, `scale` `linear`, `ann` `true`, `fc` `false`) and `cmp`\nalways explicit with two or more series (the automatic mode is frozen when the code is made).","properties":{"ann":{"description":"Events on the chart; `true` by default (omitted), so only `false` appears.","type":"boolean"},"chart":{"description":"`line` (default, omitted) | `area` | `bar` | `stacked` | `candlestick` | `heatmap` |\n`treemap` | `gauge` | `table`, coherent with the series (candlestick: one daily series with\n`ohlc`; heatmap: one monthly series; stacked/treemap: `components`; gauge: a target).","example":"bar","type":"string"},"cmp":{"description":"Axes of two or more series: `rebase` | `dual` | `panels` | `none`. Absent on input =\nautomatic (by unit: one → `none`, two → `dual`, three or more → `panels`), and that mode is\nwhat gets stored; `rebase` over a rate or a variation and `dual` over three or more units\nfall back to it (warning `cmp_fallback`). With one series only `rebase` is kept.","example":"dual","type":"string"},"fc":{"description":"Forecast scenarios (Phase 3); `false` by default (omitted), so only `true` appears.","type":"boolean"},"freq":{"description":"Downsampling: `d|w|m|q|a` (`m` = monthly mean of daily and weekly series).","example":"m","type":"string"},"from":{"description":"First date shown (AAAA-MM-DD, from 1900-01-01); absent = from the first observation.","example":"2015-01-01","format":"date","type":"string"},"geo":{"description":"`uf`: the view is the map by state of `s[0]` (a series with data by state) on the snapshot\ndated `to`, not a chart. Only `s` (one plain series), `to` and `uf` may accompany it: `p`,\n`from`, `chart`, `cmp`, `scale`, `ann`, `fc`, `freq` and `s[0].t` are refused\n(`invalid_geo`). The server does not check `to` against the dates the series has by state.\nIts exports by code are refused too (`400 invalid_geo`): the map has no time series.","example":"uf","type":"string"},"p":{"description":"Input only: `1m|6m|ytd|1a|5a|10a|max`, used when `from` and `to` are absent and resolved\ninto them, ending on the latest observation of the series (today in São Paulo without data).","example":"5a","type":"string"},"s":{"description":"1 to 4 series, in display order, without repeating a (series, peer) pair.","items":{"$ref":"#/components/schemas/ViewSeriesRef"},"type":"array"},"scale":{"description":"`linear` (default, omitted) | `log`.","example":"log","type":"string"},"to":{"description":"Last date shown (AAAA-MM-DD, up to today + 366 days); absent = up to the latest observation.","example":"2025-12-31","format":"date","type":"string"},"uf":{"description":"Sigla of the state highlighted on the map (`SP`); only with `geo`. Upper-cased on input.","example":"SP","type":"string"},"v":{"description":"Grammar version: `1`.","example":1,"format":"int32","minimum":0,"type":"integer"}},"required":["v","s"],"type":"object"},"ViewWarning":{"description":"A non-fatal note about a view: the request or the stored spec was adjusted.","properties":{"code":{"description":"`series_renamed` | `series_removed` | `duplicate_series` | `transform_dropped` |\n`transform_fallback` | `chart_fallback` | `cmp_fallback`.","example":"series_renamed","type":"string"},"detail":{"description":"`old -> new` for a rename, `slug[@PEER]` for a removal, the dropped transformation or chart,\n`rebase_not_levels` | `dual_too_many_units` for `cmp_fallback`.","example":"dolar-ptax -> dolar","type":"string"},"field":{"description":"Path of the field (`s[1].id`, `s[0].t`, `chart`, `cmp`).","example":"s[0].id","type":"string"}},"required":["field","code"],"type":"object"}},"securitySchemes":{"api_key":{"description":"Chave gratuita e opcional (página /api do site ou `POST /v1/keys`): troca o limite por endereço (60 pedidos por minuto) pelo limite da chave (600 pedidos por minuto).","in":"header","name":"X-API-Key","type":"apiKey"}}},"info":{"description":"Indicadores do Brasil a partir de dados públicos oficiais: catálogo, observações, transformações, insights determinísticos, comparação de até 4 séries, exportação, visualizações compartilháveis por código e status das fontes.\n\nUso livre, sem cadastro. Sem chave, cada endereço tem um limite de pedidos por minuto; com uma chave gratuita (`POST /v1/keys`, cabeçalho `X-API-Key`) o limite passa a ser o da chave. A Cloudflare responde a maior parte dos `GET` do cache dela, e esses pedidos não contam no limite. Acima dele, `429` com `Retry-After`. Guia em português e chave na página /api do site.","license":{"name":"Dados: a licença de cada série (campo `license`)","url":"https://brradar.com.br/sobre#license-title"},"title":"BRradar API","version":"0.7.3"},"openapi":"3.1.0","paths":{"/v1/alerts":{"post":{"description":"Nada é ativado nesta chamada: o e-mail só recebe alertas depois do link de confirmação, e o\nTelegram depois do `Start` no bot. Sem cache (`no-store`); ~3 pedidos por minuto por cliente.","operationId":"create_alert","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRequest"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertCreated"}}},"description":"Pedido registrado; falta confirmar. A mesma resposta quando o endereço está num teto ou já tem o alerta ativo (nada é guardado nem enviado)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Pedido inválido ou sem consentimento"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Navegador vindo de outro site (`Origin`)"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Corpo acima de 4 KB"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Corpo sem `Content-Type: application/json`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Muitos pedidos deste cliente"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Canal desligado (`alerts_unavailable`) ou banco indisponível"}},"security":[{}],"summary":"Pede um alerta: por e-mail (confirmação em dois passos) ou pelo Telegram (o link `t.me`\nliga o chat ao alerta).","tags":["alerts"]}},"/v1/alerts/config":{"get":{"operationId":"alerts_config","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertsConfig"}}},"description":"Canais ligados e consentimento"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"}},"summary":"Canais de alerta disponíveis e o texto de consentimento que o formulário deve mostrar.","tags":["alerts"]}},"/v1/alerts/confirm":{"post":{"operationId":"confirm_alert","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertToken"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertState"}}},"description":"Alerta ativo"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Link inválido, expirado ou já usado"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Alertas desligados ou banco indisponível"}},"security":[{}],"summary":"Confirma um alerta por e-mail (o link do e-mail de confirmação, por um botão da página).","tags":["alerts"]}},"/v1/alerts/telegram/webhook":{"post":{"operationId":"telegram_webhook","responses":{"200":{"description":"Atualização processada (o Telegram não reenvia)"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Sem o segredo do webhook"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Telegram desligado"}},"security":[{}],"summary":"Webhook do bot do Telegram (`setWebhook` com `secret_token`): `/start <token>` liga o chat\nao alerta, `/parar` cancela todos os alertas do chat, e bloquear o bot (`my_chat_member`)\nencerra os alertas do chat e apaga o seu identificador. Toda atualização que o bot ignora\n(grande demais, ilegível, de outro tipo) recebe `200`, para o Telegram não reenviar.","tags":["alerts"]}},"/v1/alerts/unsubscribe":{"get":{"operationId":"unsubscribe_page","parameters":[{"description":"O token do link de cancelamento (alternativa ao corpo JSON; o `POST` de um clique dos\nclientes de e-mail, RFC 8058, manda o token só aqui).","in":"query","name":"token","required":false,"schema":{"type":["string","null"]}}],"responses":{"303":{"description":"Redireciona para `/alertas/cancelar` com o token"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"}},"summary":"Abre num navegador o link de cancelamento do cabeçalho `List-Unsubscribe` (clientes de e-mail\nsem o `POST` de um clique): redireciona para a página que pede a confirmação. Um `GET` nunca\ncancela, porque leitores de link e pré-carregamentos também o abrem.","tags":["alerts"]},"post":{"operationId":"unsubscribe_alert","parameters":[{"description":"O token do link de cancelamento (alternativa ao corpo JSON; o `POST` de um clique dos\nclientes de e-mail, RFC 8058, manda o token só aqui).","in":"query","name":"token","required":false,"schema":{"type":["string","null"]}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertToken"}}},"description":"Opcional quando o token vem na URL","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertState"}}},"description":"Alerta(s) cancelado(s); `cancelled` diz quantos"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Link inválido"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Alertas desligados ou banco indisponível"}},"security":[{}],"summary":"Cancela o alerta do link e apaga a cópia do endereço guardada nele; com `\"all\": true` no\ncorpo, encerra todos os alertas do mesmo endereço (e canal) e o apaga de todos. Idempotente.","tags":["alerts"]}},"/v1/calendar":{"get":{"operationId":"calendar","parameters":[{"description":"Primeiro dia (AAAA-MM-DD, horário de São Paulo), inclusive. Padrão: hoje.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Último dia (AAAA-MM-DD), inclusive. Padrão: `from` + 30 dias. Até 400 dias de janela.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Calendar"}}},"description":"Divulgações da janela"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Divulgações previstas (IBGE pela API de calendário; Copom e Focus por regra fixa) entre dois\ndias, com as séries que cada uma atualiza. Datas e horários de São Paulo. Sem `from`, a janela\ncomeça hoje e a resposta fica no cache até a meia-noite de São Paulo, no máximo uma hora.","tags":["calendar"]}},"/v1/compare":{"get":{"operationId":"compare","parameters":[{"description":"De 1 a 4 séries separadas por vírgula, cada uma `slug`, `slug@UF` (a série num estado, sigla\nde uma das 27 UFs, só para séries com dado por UF) ou qualquer delas com `:transformação`\n(`ipca-12m,selic-meta`, `ipca:acc12,dolar`, `desemprego@SP:yoy,desemprego`), sem repetir o\nmesmo par série/UF. Numa UF, frequência, unidade e transformações são as do dado por UF.","in":"query","name":"s","required":false,"schema":{"type":["string","null"]}},{"description":"Data inicial (AAAA-MM-DD), inclusive.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}},{"description":"Agrupa as séries mais finas que `d|w|m|q|a` pela média do período (`m` = média mensal).","in":"query","name":"freq","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Compare"}}},"description":"Séries no intervalo"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida ou sem dado por UF"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Compara até 4 séries: metadados e observações de cada uma, com transformação própria.","tags":["series"]}},"/v1/compare/export.csv":{"get":{"operationId":"compare_export_csv","parameters":[{"description":"Mesma gramática de `/v1/compare`.","in":"query","name":"s","required":false,"schema":{"type":["string","null"]}},{"description":"Data inicial (AAAA-MM-DD), inclusive.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}},{"description":"Agrupa as séries mais finas que `d|w|m|q|a` pela média do período.","in":"query","name":"freq","required":false,"schema":{"type":["string","null"]}},{"description":"`pt-BR` (padrão: `;` e vírgula decimal) ou `en` (`,` e ponto).","in":"query","name":"locale","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"text/csv":{}},"description":"CSV"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida ou sem dado por UF"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Exporta a comparação em CSV: uma coluna de data e uma coluna por série (vazia sem dado).","tags":["series"]}},"/v1/compare/export.xlsx":{"get":{"operationId":"compare_export_xlsx","parameters":[{"description":"Mesma gramática de `/v1/compare`.","in":"query","name":"s","required":false,"schema":{"type":["string","null"]}},{"description":"Data inicial (AAAA-MM-DD), inclusive.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}},{"description":"Agrupa as séries mais finas que `d|w|m|q|a` pela média do período.","in":"query","name":"freq","required":false,"schema":{"type":["string","null"]}},{"description":"`pt-BR` (padrão: `;` e vírgula decimal) ou `en` (`,` e ponto).","in":"query","name":"locale","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}},"description":"XLSX"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida ou sem dado por UF"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Exporta a comparação em XLSX: uma coluna de data e uma coluna numérica por série.","tags":["series"]}},"/v1/compare/regional":{"get":{"operationId":"compare_regional","parameters":[{"description":"Slug da série (ou slug antigo).","in":"query","name":"s","required":false,"schema":{"type":["string","null"]}},{"description":"De 1 a 4 UFs separadas por vírgula (sigla, `SP,RS,CE`) ou códigos de área\n(`BR-SP,BR-RS,BR-REG-NE`), sem repetir.","in":"query","name":"cmp","required":false,"schema":{"type":["string","null"]}},{"description":"Data inicial (AAAA-MM-DD), inclusive.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}},{"description":"Incluir o Brasil (`BRA`) como mais uma linha (padrão `true`).","in":"query","name":"brazil","required":false,"schema":{"type":["boolean","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareRegional"}}},"description":"Áreas pedidas (Brasil primeiro, quando `brazil` está ligado)"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida, sem dado por UF, UF desconhecida ou nível não entregue"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Compara até 4 UFs no mesmo indicador, com o Brasil (BRA) incluso por padrão.","tags":["regions"]}},"/v1/compare/regional/export.csv":{"get":{"operationId":"compare_regional_export_csv","parameters":[{"in":"query","name":"s","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"cmp","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"to","required":false,"schema":{"type":["string","null"]}},{"in":"query","name":"brazil","required":false,"schema":{"type":["boolean","null"]}},{"description":"`pt-BR` (padrão: `;` e vírgula decimal) ou `en` (`,` e ponto).","in":"query","name":"locale","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"text/csv":{}},"description":"CSV"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida, sem dado por UF, UF desconhecida ou nível não entregue"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Exporta a comparação por UF em CSV: uma coluna de data e uma coluna por área (vazia sem dado).","tags":["regions"]}},"/v1/events":{"get":{"operationId":"events","parameters":[{"description":"Data inicial (AAAA-MM-DD), inclusive.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}},"description":"Eventos no intervalo"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"}},"summary":"Eventos anotados nos gráficos (escopo `all`, um tema ou um slug), ordenados por data.","tags":["events"]}},"/v1/keys":{"post":{"description":"Sem cadastro: não pede nada e não guarda nada sobre quem pediu. A chave aparece só nesta\nresposta (a API guarda apenas um hash dela) e vai no cabeçalho `X-API-Key` de cada pedido.\nCom ela, o limite passa a ser por chave (600 pedidos por minuto, salvo outro valor na\nconfiguração) em vez de por endereço (60). Até 3 chaves por endereço de uma vez, depois uma a\ncada 20 minutos, e um teto diário de chaves novas (`API_KEYS_DAILY_CAP`); nada disso é\ncacheado (`no-store`).","operationId":"create_key","responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}},"description":"Chave nova (mostrada só agora)"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Muitas chaves pedidas do mesmo endereço","headers":{"Retry-After":{"description":"Segundos até o próximo pedido aceito","schema":{"format":"int64","minimum":0,"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível (`database_unavailable`) ou teto diário de chaves novas (`daily_cap_reached`)"}},"security":[{}],"summary":"Gera uma chave gratuita da API.","tags":["keys"]}},"/v1/regions":{"get":{"operationId":"list_regions","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionList"}}},"description":"As 27 UFs e as 5 Grandes Regiões"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"}},"summary":"UFs e Grandes Regiões, com código (`BR-SP`, `BR-REG-NE`), sigla, nome e código IBGE.","tags":["regions"]}},"/v1/search":{"get":{"operationId":"search","parameters":[{"description":"Texto buscado (nome, nome curto, sinônimos, slug; sem acentos e sem distinguir caixa).","in":"query","name":"q","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResults"}}},"description":"Resultados ordenados por relevância"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"}},"summary":"Busca séries por nome, nome curto, sinônimos ou slug.","tags":["search"]}},"/v1/series":{"get":{"operationId":"list_series","parameters":[{"description":"Filtra por tema (`inflacao`, `juros`, `cambio`, …).","in":"query","name":"theme","required":false,"schema":{"type":["string","null"]}},{"description":"Busca textual (nome, sinônimos, descrição; sem acentos/caixa).","in":"query","name":"q","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesList"}}},"description":"Séries do catálogo"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"}},"summary":"Lista as séries do catálogo com o último valor de cada uma.","tags":["series"]}},"/v1/series/{slug}":{"get":{"operationId":"get_series","parameters":[{"description":"Slug da série (ou slug antigo)","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeriesDetail"}}},"description":"Metadados da série"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida"},"429":{"$ref":"#/components/responses/RateLimited"}},"summary":"Metadados completos de uma série, com cobertura e proveniência (aceita slugs antigos).","tags":["series"]}},"/v1/series/{slug}/components":{"get":{"operationId":"components","parameters":[{"description":"Slug da série (ou slug antigo)","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Data inicial (AAAA-MM-DD), inclusive.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Components"}}},"description":"Componentes no intervalo"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida ou sem componentes"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Componentes de uma série (os grupos do IPCA): valor, peso e contribuição de cada um, data a data.","tags":["series"]}},"/v1/series/{slug}/countries":{"get":{"operationId":"countries_snapshot","parameters":[{"description":"Slug da série (ou slug antigo)","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Data (AAAA-MM-DD) entre as `dates` da resposta; padrão: a mais recente da fonte\nprincipal do bloco (uma fonte extra, como o Eurostat, pode ter um ano a mais).","in":"query","name":"date","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountrySnapshot"}}},"description":"Pares do bloco na data"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`date` inválida"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida, sem dado por país ou data sem dado"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Todos os pares de um `[series.countries]` numa data, com as datas disponíveis.","tags":["countries"]}},"/v1/series/{slug}/countries/export.csv":{"get":{"operationId":"countries_export_csv","parameters":[{"description":"Slug da série","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Data (AAAA-MM-DD); padrão: a mais recente da fonte principal do bloco.","in":"query","name":"date","required":false,"schema":{"type":["string","null"]}},{"description":"`pt-BR` (padrão: `;` e vírgula decimal) ou `en` (`,` e ponto).","in":"query","name":"locale","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"text/csv":{}},"description":"CSV"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida, sem dado por país ou data sem dado"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Exporta a tabela de uma data em CSV (UTF-8, comentários `#` com fonte, nota, unidade e peers).","tags":["countries"]}},"/v1/series/{slug}/countries/{code}":{"get":{"operationId":"countries_history","parameters":[{"description":"Slug da série (ou slug antigo)","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"ISO 3166-1 alpha-3 (`USA`) ou agregado WB (`WLD`, `OED`, `EUU`)","in":"path","name":"code","required":true,"schema":{"type":"string"}},{"description":"Data inicial (AAAA-MM-DD), inclusive.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountryHistory"}}},"description":"Pontos do país no intervalo"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido (`BRA` em /countries, `from > to`)"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida, sem dado por país ou país fora de `peers`"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Histórico de um país (`USA`, `DEU`) ou agregado WB (`WLD`, `OED`, `EUU`) do `[series.countries]`.","tags":["countries"]}},"/v1/series/{slug}/export.csv":{"get":{"operationId":"export_csv","parameters":[{"description":"Slug da série","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Data inicial (AAAA-MM-DD), inclusive.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}},{"description":"`none|mom|yoy|ytd|acc12|ma3|ma6|ma12|rebase:AAAA-MM|diff|log|deflate|annualize`, entre\nas que a série aceita (`transforms` em `/v1/series/{slug}`).","in":"query","name":"transform","required":false,"schema":{"type":["string","null"]}},{"description":"`pt-BR` (padrão: `;` e vírgula decimal) ou `en` (`,` e ponto).","in":"query","name":"locale","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"text/csv":{}},"description":"CSV"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Exporta as observações em CSV (UTF-8, linhas de comentário `#` com fonte e unidade).","tags":["series"]}},"/v1/series/{slug}/export.xlsx":{"get":{"operationId":"export_xlsx","parameters":[{"description":"Slug da série","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Data inicial (AAAA-MM-DD), inclusive.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}},{"description":"`none|mom|yoy|ytd|acc12|ma3|ma6|ma12|rebase:AAAA-MM|diff|log|deflate|annualize`, entre\nas que a série aceita (`transforms` em `/v1/series/{slug}`).","in":"query","name":"transform","required":false,"schema":{"type":["string","null"]}},{"description":"`pt-BR` (padrão: `;` e vírgula decimal) ou `en` (`,` e ponto).","in":"query","name":"locale","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}},"description":"XLSX"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Exporta as observações em XLSX (planilha única com datas e valores numéricos).","tags":["series"]}},"/v1/series/{slug}/forecast":{"get":{"operationId":"forecast","parameters":[{"description":"Slug da série (ou slug antigo)","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forecast"}}},"description":"Projeções gravadas (lista vazia quando não há)"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Projeções da série em três cenários: modelo estatístico (com o erro do backtest) e, quando\nhouver, expectativas de mercado e projeções institucionais.","tags":["series"]}},"/v1/series/{slug}/insights":{"get":{"operationId":"insights","parameters":[{"description":"Slug da série (ou slug antigo)","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Data inicial (AAAA-MM-DD), inclusive. Não combina com `preset`.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive. Não combina com `preset`.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}},{"description":"Período pré-definido, ancorado na última observação: `1m|6m|ytd|1a|5a|10a|max`. Serve os\nfatos gravados pelo coletor; sem nenhum parâmetro, vale `max`.","in":"query","name":"preset","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Insights"}}},"description":"Fatos do período"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Fatos determinísticos (camada 1) do período, com textos em PT-BR. Com `preset` (ou sem\nparâmetros, que equivale a `max`), devolve os fatos que o coletor gravou depois da última\ncoleta; com `from`/`to`, calcula o intervalo livre na hora.","tags":["series"]}},"/v1/series/{slug}/observations":{"get":{"operationId":"observations","parameters":[{"description":"Slug da série (ou slug antigo)","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Data inicial (AAAA-MM-DD), inclusive.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}},{"description":"`none|mom|yoy|ytd|acc12|ma3|ma6|ma12|rebase:AAAA-MM|diff|log|deflate|annualize`, entre\nas que a série aceita (`transforms` em `/v1/series/{slug}`).","in":"query","name":"transform","required":false,"schema":{"type":["string","null"]}},{"description":"Reamostragem (só para frequências mais grossas que a da série): `d|w|m|q|a`.","in":"query","name":"freq","required":false,"schema":{"type":["string","null"]}},{"description":"Agregação da reamostragem: `last` (padrão, níveis) | `mean` | `sum`.","in":"query","name":"agg","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Observations"}}},"description":"Pontos no intervalo"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Observações de uma série com transformação e reamostragem opcionais.","tags":["series"]}},"/v1/series/{slug}/peers":{"get":{"operationId":"peers","parameters":[{"description":"Slug da série (ou slug antigo)","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Grupo de comparação (`latam`, `brics`, `ocde`, `mundo`, entre os `groups` da resposta);\npadrão: o primeiro grupo da série.","in":"query","name":"group","required":false,"schema":{"type":["string","null"]}},{"description":"Data (AAAA-MM-DD) com dado por país; padrão: o último dado de cada país.","in":"query","name":"date","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeerComparison"}}},"description":"Brasil, membros e agregado do grupo"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`group` fora dos grupos da série ou `date` inválida"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida, sem dado por país ou data sem dado"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"O Brasil diante de um grupo de comparação (América Latina, BRICS, OCDE, Mundo): o último dado de cada país, a posição do Brasil e a frase do ranking.","tags":["countries"]}},"/v1/series/{slug}/regions":{"get":{"operationId":"regions_snapshot","parameters":[{"description":"Slug da série (ou slug antigo)","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"`uf` (padrão) ou `grande_regiao`.","in":"query","name":"level","required":false,"schema":{"type":["string","null"]}},{"description":"Data (AAAA-MM-DD) entre as `dates` da resposta; padrão: a mais recente.","in":"query","name":"date","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionalSnapshot"}}},"description":"Áreas do nível na data"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"`level` ou `date` inválidos"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida, sem dado por UF ou no nível pedido, ou data sem dado"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Todas as áreas de um nível numa data, com posição, diferença para o Brasil e datas disponíveis.","tags":["regions"]}},"/v1/series/{slug}/regions/export.csv":{"get":{"operationId":"regions_export_csv","parameters":[{"description":"Slug da série","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"`uf` (padrão) ou `grande_regiao`.","in":"query","name":"level","required":false,"schema":{"type":["string","null"]}},{"description":"Data (AAAA-MM-DD); padrão: a mais recente.","in":"query","name":"date","required":false,"schema":{"type":["string","null"]}},{"description":"`pt-BR` (padrão: `;` e vírgula decimal) ou `en` (`,` e ponto).","in":"query","name":"locale","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"text/csv":{}},"description":"CSV"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida, sem dado por UF ou no nível pedido, ou data sem dado"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Exporta a tabela de uma data em CSV (UTF-8, comentários `#` com fonte, nota e unidade).","tags":["regions"]}},"/v1/series/{slug}/regions/{uf}":{"get":{"operationId":"regions_history","parameters":[{"description":"Slug da série (ou slug antigo)","in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"description":"Sigla da UF (`SP`) ou código de área (`BR-SP`, `BR-REG-NE`)","in":"path","name":"uf","required":true,"schema":{"type":"string"}},{"description":"Data inicial (AAAA-MM-DD), inclusive.","in":"query","name":"from","required":false,"schema":{"type":["string","null"]}},{"description":"Data final (AAAA-MM-DD), inclusive.","in":"query","name":"to","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegionalHistory"}}},"description":"Pontos da área no intervalo"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Série desconhecida, sem dado por UF ou no nível da área, ou UF desconhecida"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Histórico de uma UF (pela sigla, `SP`) ou de uma área de `/v1/regions` (pelo código, `BR-REG-NE`).","tags":["regions"]}},"/v1/status":{"get":{"operationId":"status","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}},"description":""},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"}},"summary":"Saúde dos coletores: estado de cada fonte e último dado de cada série.","tags":["status"]}},"/v1/themes":{"get":{"operationId":"list_themes","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeList"}}},"description":"Temas"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"429":{"$ref":"#/components/responses/RateLimited"}},"summary":"Temas do catálogo com a contagem de séries.","tags":["search"]}},"/v1/themes/{slug}":{"get":{"operationId":"get_theme","parameters":[{"description":"Slug do tema (`inflacao`, `juros`, …)","in":"path","name":"slug","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThemeDetail"}}},"description":"Tema e suas séries"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Tema desconhecido"},"429":{"$ref":"#/components/responses/RateLimited"}},"summary":"Séries de um tema, com o último valor de cada uma.","tags":["search"]}},"/v1/views":{"post":{"description":"Idempotente: a mesma visualização (depois de canonizada) devolve sempre o mesmo código, `201`\nna primeira vez e `200` com `created: false` nas seguintes. Limite de ~10 pedidos por minuto\npor cliente (rajada de 5) e teto diário de códigos novos (`VIEWS_DAILY_CAP`); nada disso é\ncacheado (`no-store`).","operationId":"create_view","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewSpec"}}},"description":"ViewSpec v1 (até 4 KB). `p` só na entrada; sem texto livre.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewCreated"}}},"description":"A mesma visualização já tinha código"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewCreated"}}},"description":"Código novo","headers":{"Location":{"description":"`/v1/views/{code}`","schema":{"type":"string"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewErrorBody"}}},"description":"Visualização inválida (todos os problemas em `errors`)"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Corpo acima de 4 KB"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Corpo sem `Content-Type: application/json`"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Muitos pedidos do mesmo cliente","headers":{"Retry-After":{"description":"Segundos até o próximo pedido aceito","schema":{"format":"int64","minimum":0,"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível (`database_unavailable`) ou teto diário de códigos novos (`daily_cap_reached`)"}},"security":[{}],"summary":"Cria (ou reencontra) o código curto de uma visualização.","tags":["views"]}},"/v1/views/{code}":{"get":{"description":"Séries renomeadas ou removidas, transformação ou gráfico que deixaram de servir viram\n`warnings` (nunca erro). Código inválido, inexistente ou sem nenhuma série restante: 404\ngenérico. Imutável na CDN por um dia (`s-maxage=86400`, `stale-while-revalidate` de 7 dias).","operationId":"get_view","parameters":[{"description":"Código de 8 símbolos; aceita minúsculas, hífen (`72E9-HQGG`), O no lugar de 0 e I/L no lugar de 1","in":"path","name":"code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewDetail"}}},"description":"Visualização"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Visualização não encontrada"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Visualização de um código: o spec guardado, lido contra o catálogo de hoje.","tags":["views"]}},"/v1/views/{code}/data":{"get":{"description":"Uma linha por série do spec, na ordem dele, com a transformação, a janela e o agrupamento da\nvisualização; um par de país vem com `peer` e como publicado. Segue os dados do coletor\n(`s-maxage=3600`), não o spec imutável.","operationId":"data","parameters":[{"description":"Código de 8 símbolos (mesma leitura tolerante de `/v1/views/{code}`)","in":"path","name":"code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewData"}}},"description":"Dados da visualização"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Mapa por estado (`geo`): não tem série no tempo (`invalid_geo`)"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Visualização não encontrada"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Dados de uma visualização: o spec e as séries como `/v1/compare` as serve.","tags":["views"]}},"/v1/views/{code}/export.csv":{"get":{"description":"As mesmas séries, transformações, janela e agrupamento da visualização (como\n`/v1/compare/export.csv`); um par de país sai como publicado. Comentários `#` no topo com o\ncódigo, o link e, por série, fonte, unidade e data da coleta. Segue os dados do coletor\n(`s-maxage=3600`), não o spec imutável.","operationId":"export_view_csv","parameters":[{"description":"Código de 8 símbolos (mesma leitura tolerante de `/v1/views/{code}`)","in":"path","name":"code","required":true,"schema":{"type":"string"}},{"description":"`pt-BR` (padrão: `;` e vírgula decimal) ou `en` (`,` e ponto).","in":"query","name":"locale","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"text/csv":{}},"description":"CSV"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido, ou mapa por estado (`geo`: `invalid_geo`)"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Visualização não encontrada"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Exporta os dados de uma visualização em CSV: uma coluna de data e uma por série.","tags":["views"]}},"/v1/views/{code}/export.json":{"get":{"operationId":"export_json","parameters":[{"description":"Código de 8 símbolos (mesma leitura tolerante de `/v1/views/{code}`)","in":"path","name":"code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewData"}}},"description":"JSON (`ViewData`) para baixar"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Mapa por estado (`geo`): não tem série no tempo (`invalid_geo`)"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Visualização não encontrada"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Exporta os dados de uma visualização em JSON: o corpo de `/v1/views/{code}/data` como arquivo.","tags":["views"]}},"/v1/views/{code}/export.xlsx":{"get":{"description":"A planilha de `/v1/compare/export.xlsx`, com o código, o link, o período e, por série, fonte,\nunidade, transformação e data da coleta no topo.","operationId":"views_export_xlsx","parameters":[{"description":"Código de 8 símbolos (mesma leitura tolerante de `/v1/views/{code}`)","in":"path","name":"code","required":true,"schema":{"type":"string"}},{"description":"`pt-BR` (padrão: `;` e vírgula decimal) ou `en` (`,` e ponto).","in":"query","name":"locale","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{}},"description":"XLSX"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Parâmetro inválido, ou mapa por estado (`geo`: `invalid_geo`)"},"401":{"$ref":"#/components/responses/InvalidApiKey"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Visualização não encontrada"},"429":{"$ref":"#/components/responses/RateLimited"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}},"description":"Banco indisponível"}},"summary":"Exporta os dados de uma visualização em XLSX: uma coluna de data e uma numérica por série.","tags":["views"]}}},"security":[{},{"api_key":[]}],"servers":[{"description":"BRradar (pela Cloudflare)","url":"https://brradar.com.br"}],"tags":[{"description":"Catálogo e dados das séries","name":"series"},{"description":"Dados por UF e Grande Região (Fase 1.5)","name":"regions"},{"description":"Busca e temas","name":"search"},{"description":"Eventos anotados nos gráficos","name":"events"},{"description":"Calendário de divulgações (IBGE, Copom, Focus)","name":"calendar"},{"description":"Visualizações compartilháveis por código curto (Fase 2)","name":"views"},{"description":"Chave gratuita da API (opcional)","name":"keys"},{"description":"Alertas por e-mail e Telegram, com consentimento (Fase 3; fora do cache)","name":"alerts"},{"description":"Saúde do serviço e das fontes","name":"status"}]}