curl --request POST \
--url https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"codigo": 433
}'import requests
url = "https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series"
payload = { "codigo": 433 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({codigo: 433})
};
fetch('https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'codigo' => 433
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series"
payload := strings.NewReader("{\n \"codigo\": 433\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"codigo\": 433\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"codigo\": 433\n}"
response = http.request(request)
puts response.read_body{
"codigo": 433,
"count": 8,
"data_final": "2026-08-31",
"data_inicial": "2026-01-01",
"observations": [
{
"data": "01/01/2026",
"date": "2026-01-01",
"valor": "0.33",
"value": 0.33
},
{
"data": "01/02/2026",
"date": "2026-02-01",
"valor": "0.70",
"value": 0.7
},
{
"data": "01/03/2026",
"date": "2026-03-01",
"valor": "0.88",
"value": 0.88
},
{
"data": "01/04/2026",
"date": "2026-04-01",
"valor": "0.67",
"value": 0.67
},
{
"data": "01/05/2026",
"date": "2026-05-01",
"valor": "0.58",
"value": 0.58
},
{
"data": "01/06/2026",
"date": "2026-06-01",
"valor": "0.16",
"value": 0.16
},
{
"data": "01/07/2026",
"date": "2026-07-01",
"valor": "0.07",
"value": 0.07
},
{
"data": "01/08/2026",
"date": "2026-08-01",
"valor": "-0.32",
"value": -0.32
}
],
"observed_at_ms": 1790048457499,
"ultimos": null,
"url": "https://api.bcb.gov.br/dados/serie/bcdata.sgs.433/dados?formato=json&dataInicial=01/01/2026&dataFinal=31/08/2026"
}Sgs series
Get the numbers for a known SGS code. Find codes with datasets_search (CKAN codigo_sgs).
curl --request POST \
--url https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"codigo": 433
}'import requests
url = "https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series"
payload = { "codigo": 433 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({codigo: 433})
};
fetch('https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'codigo' => 433
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series"
payload := strings.NewReader("{\n \"codigo\": 433\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"codigo\": 433\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/sgs-series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"codigo\": 433\n}"
response = http.request(request)
puts response.read_body{
"codigo": 433,
"count": 8,
"data_final": "2026-08-31",
"data_inicial": "2026-01-01",
"observations": [
{
"data": "01/01/2026",
"date": "2026-01-01",
"valor": "0.33",
"value": 0.33
},
{
"data": "01/02/2026",
"date": "2026-02-01",
"valor": "0.70",
"value": 0.7
},
{
"data": "01/03/2026",
"date": "2026-03-01",
"valor": "0.88",
"value": 0.88
},
{
"data": "01/04/2026",
"date": "2026-04-01",
"valor": "0.67",
"value": 0.67
},
{
"data": "01/05/2026",
"date": "2026-05-01",
"valor": "0.58",
"value": 0.58
},
{
"data": "01/06/2026",
"date": "2026-06-01",
"valor": "0.16",
"value": 0.16
},
{
"data": "01/07/2026",
"date": "2026-07-01",
"valor": "0.07",
"value": 0.07
},
{
"data": "01/08/2026",
"date": "2026-08-01",
"valor": "-0.32",
"value": -0.32
}
],
"observed_at_ms": 1790048457499,
"ultimos": null,
"url": "https://api.bcb.gov.br/dados/serie/bcdata.sgs.433/dados?formato=json&dataInicial=01/01/2026&dataFinal=31/08/2026"
}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
{
"operationId": "bcb-gov-br.economic-data.sgs-series",
"method": "POST",
"path": "/apis/v1/bcb-gov-br/economic-data/sgs-series",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"codigo": 433,
"data_final": "2026-08-31",
"data_inicial": "2026-01-01"
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"codigo": {
"description": "SGS series code (e.g. 432), or a pasted https://api.bcb.gov.br/dados/serie/bcdata.sgs.<code>/... URL; the URL's own `/ultimos/N` or `dataInicial`/`dataFinal` apply unless `ultimos`/`data_inicial`/`data_final` are given.\n\nProvider reference: minimum 1.",
"type": "number"
},
"data_final": {
"description": "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}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"data_inicial": {
"description": "First observation date (inclusive), YYYY-MM-DD. Required by the server for daily series. Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"ultimos": {
"description": "Return only the last N observations (server maximum 20). Mutually exclusive with the date window.\n\nProvider reference: minimum 1; maximum 20.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 20,
"min": 1
}
}
},
"required": [
"codigo"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
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
Body
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.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.
| Documented field | Provider type | Description |
|---|---|---|
data | string | Observation date exactly as served (dd/MM/yyyy). |
date | string | Observation date, ISO. |
valor | string | Value exactly as served (decimal string). |
value | number | valor parsed as a number; null when the server's string is not numeric. |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.