Skip to main content
POST
Sgs series

Request contract

  • Method and path: POST /apis/v1/bcb-gov-br/economic-data/sgs-series
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series
Complete OpenAPI definition Effective request declaration (including authentication and referenced schemas):

Cost and request rules

Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
codigo
number
required

SGS series code (e.g. 432), or a pasted https://api.bcb.gov.br/dados/serie/bcdata.sgs./... URL; the URL's own /ultimos/N or dataInicial/dataFinal apply unless ultimos/data_inicial/data_final are given.

Provider reference: minimum 1.
data_final
string

Last observation date (inclusive), YYYY-MM-DD. Defaults to today on the server. At most 10 years after data_inicial. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

data_inicial
string

First observation date (inclusive), YYYY-MM-DD. Required by the server for daily series. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

ultimos
number

Return only the last N observations (server maximum 20). Mutually exclusive with the date window.

Provider reference: minimum 1; maximum 20.

Response

Observations of one SGS time series (Sistema Gerenciador de Séries Temporais) by numeric code from api.bcb.gov.br: either the last N observations (ultimos, 1..20, the server's maximum) or a date window (data_inicial/data_final, ISO dates; the server rejects windows longer than 10 years on daily series and requires data_inicial for them). Without either, monthly and lower-frequency series return their full history. Values are returned as the server's decimal strings in valor plus a parsed value (null when the string is not numeric). Common codes: 432 Selic target, 11 Selic daily, 12 CDI daily, 433 IPCA monthly, 13522 IPCA 12-month, 189 IGP-M, 24364 IBC-Br, 1 USD/BRL PTAX sell. An unknown code is not_found; a rejected window is invalid_input.

The response contains the tool result directly.

The provider identifies observations as the primary payload key.

These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.