curl --request POST \
--url https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/datasets-search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"q": "codigo_sgs:432"
}
'import requests
url = "https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/datasets-search"
payload = { "q": "codigo_sgs:432" }
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({q: 'codigo_sgs:432'})
};
fetch('https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/datasets-search', 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/datasets-search",
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([
'q' => 'codigo_sgs:432'
]),
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/datasets-search"
payload := strings.NewReader("{\n \"q\": \"codigo_sgs:432\"\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/datasets-search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"q\": \"codigo_sgs:432\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/datasets-search")
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 \"q\": \"codigo_sgs:432\"\n}"
response = http.request(request)
puts response.read_bodyDatasets search
Find an SGS series code or an Olinda service name before calling sgs_series or olinda_service.
curl --request POST \
--url https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/datasets-search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"q": "codigo_sgs:432"
}
'import requests
url = "https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/datasets-search"
payload = { "q": "codigo_sgs:432" }
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({q: 'codigo_sgs:432'})
};
fetch('https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/datasets-search', 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/datasets-search",
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([
'q' => 'codigo_sgs:432'
]),
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/datasets-search"
payload := strings.NewReader("{\n \"q\": \"codigo_sgs:432\"\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/datasets-search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"q\": \"codigo_sgs:432\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/datasets-search")
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 \"q\": \"codigo_sgs:432\"\n}"
response = http.request(request)
puts response.read_bodyRequest contract
- Method and path: POST /apis/v1/bcb-gov-br/economic-data/datasets-search
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/bcb-gov-br/economic-data/datasets-search
{
"operationId": "bcb-gov-br.economic-data.datasets-search",
"method": "POST",
"path": "/apis/v1/bcb-gov-br/economic-data/datasets-search",
"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": {
"q": "codigo_sgs:432",
"rows": 2
}
}
},
"schema": {
"additionalProperties": true,
"properties": {
"q": {
"description": "Free-text query (Solr syntax accepted, e.g. `selic`, `title:IPCA`, `codigo_sgs:433`), or a pasted package_search URL (its `q` is used).",
"type": "string"
},
"rows": {
"default": 10,
"description": "rows\n\nProvider reference: minimum 1; maximum 50; default 10.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 50,
"min": 1
}
},
"start": {
"default": 0,
"description": "Offset of the first result; pass `next_start` from the previous page.\n\nProvider reference: minimum 0; default 0.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"min": 0
}
}
},
"required": [
"q"
],
"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
Response
Search the Banco Central open-data catalogue (dadosabertos.bcb.gov.br, CKAN package_search) by free text: dataset name, title, maintainer, notes, tags and, for SGS series, codigo_sgs, periodicidade, unidade_medida, inicio_periodo, fim_periodo, tipo_serie, plus the dataset's resources (API/JSON/CSV/OData URLs, including the api.bcb.gov.br SGS URL and Olinda service URLs). count is the catalogue's total for the query; rows/start page it (at most 50 per call: the portal's robots.txt asks for sparse API use).
The response contains the tool result directly.
The provider identifies datasets as the primary payload key.
| Documented field | Provider type | Description |
|---|---|---|
codigo_sgs | number | SGS series code when the dataset is an SGS series. |
fim_periodo | string | |
id | string | |
inicio_periodo | string | |
maintainer | string | |
metadata_modified | string | |
name | string | |
notes | string | Description, trimmed to 600 characters. |
organization | string | |
periodicidade | string | |
resources | object[] | |
tags | string[] | |
tipo_serie | string | |
title | string | |
unidade_medida | string | |
url | string | Dataset page on dadosabertos.bcb.gov.br. |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.