curl --request GET \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro \
--header 'apikey: <api-key>'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro', 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://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
"<unknown>"
],
"meta": {
"resource": "<string>",
"kind": "<string>",
"request": {},
"id_known": true,
"endpoint": "<string>"
},
"next_page_url": "<string>"
}{
"error": {
"code": "bad_request",
"message": "<string>",
"target": "<string>",
"innererror": {
"sqlstate": "<string>",
"hint": "<string>",
"details": "<string>"
}
}
}v2 macro
silo-api.Macro series, inflation and its item tree, PTAX, Focus expectations.
Example: /v2/macro?kind=inflation
Kinds:
series: api.macro_series: one SGS series by label or code, oldest first. Refuses above 1000 rows: narrow from/to.inflation: api.inflation: the IPCA set by month with acc_12m, 3 years by default. Refuses above 1000 rows: pin id or family, or narrow from.inflation_items: api.inflation_items: IBGE’s IPCA tree (weight, monthly change, contribution, year-to-date and 12-month change), 3 years by default. With no id, the groups (level 1); with an id, that item at its own level.fx: api.ptax: one currency’s PTAX, BRL per one unit, as published. currency=all reads the api.ptax_daily view, every currency at once.expectations: api.focus_expectations: one survey and horizon across survey dates (the weekly revision path), median, mean and standard deviation. Refuses above 1000 rows.
With no from, a dated kind reads the last 12 months to to.
id per kind: series takes a label or SGS code (SELIC_META, CDI, IGPM, 432); inflation one series label (IPCA, IPCA_CORE_EX0, …; none: every series); inflation_items an IBGE structure number or SIDRA item code (none: the groups); expectations a Focus indicator (IPCA, Selic, …; none: every indicator).
BACEN’s IPCA group codes 1640-1643 are Comunicação, Saúde, Despesas pessoais, Educação, as measured against SIDRA. Focus rows are baseCalculo=0 (the trailing 30-day sample); the 12-month inflation survey is unsmoothed. Nothing is filled.
GET /v2/macro?help describes the main parameters, ?help=all adds the hidden ones.
curl --request GET \
--url https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro \
--header 'apikey: <api-key>'import requests
url = "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro', 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://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://zcjbtpxuhdekpwcxmepn.supabase.co/functions/v1/silo-api/v2/macro")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
"<unknown>"
],
"meta": {
"resource": "<string>",
"kind": "<string>",
"request": {},
"id_known": true,
"endpoint": "<string>"
},
"next_page_url": "<string>"
}{
"error": {
"code": "bad_request",
"message": "<string>",
"target": "<string>",
"innererror": {
"sqlstate": "<string>",
"hint": "<string>",
"details": "<string>"
}
}
}Authorizations
The public publishable key. It identifies the project, not you, and is the anonymous tier.
Query Parameters
series: one BACEN SGS series. inflation: the IPCA set (headline, cores, groups, diffusion) with 12-month accumulation. inflation_items: IBGE's IPCA item tree with weights. fx: BACEN PTAX buy and sell rates. expectations: the BCB Focus survey path. Default: series.
series, inflation, inflation_items, fx, expectations By kind: series takes an SGS series label or code (SELIC_META, CDI, IGPM, 432); inflation takes one series label (IPCA, IPCA_CORE_EX0, ...; none: every series); inflation_items takes an IBGE structure number or SIDRA item code (none: the groups); expectations takes a Focus indicator (IPCA, Selic, ...; none: every indicator). Required for kind series. Kind fx takes no id. Default: none.
First date of the window, YYYY-MM-DD. Default: the resource's default window, counted back from to.
Last date of the window, YYYY-MM-DD. Default: the latest complete period, from coverage.
The page size. More rows than one page come through next_page_url, never cut silently; a call stops at the tier's rows-per-call cap with meta.tier_cap_reached. Default: the tier's page maximum (10 anonymous, 100 signed in); a larger value is coerced to it.
x >= 1The opaque cursor from a previous next_page_url. It carries every other parameter: send it alone (another parameter with a different value is bad_request). Default: none: the first page.
Hidden parameter (?help=all lists it). kind inflation: headline, core, classification, diffusion or group (all: every family). kind expectations: the Focus survey, annual (the default), monthly, selic (COPOM meetings) or inflation_12m. Default: all.
all, headline, core, classification, diffusion, group, annual, monthly, selic, inflation_12m Hidden parameter (?help=all lists it). kind fx: an ISO code held (USD, EUR, GBP, JPY, ARS). all: every currency, from the api.ptax_daily view (paged with order + limit + offset). Default: USD.
Hidden parameter (?help=all lists it). kind expectations: the target horizon exactly as BACEN publishes it: a year (2027) for annual, MM/YYYY for monthly, a COPOM meeting (R6/2028) for selic. Default: family annual: the current year (UTC-3); every other survey needs one.
Was this page helpful?