Dados B3 Macro API

The Macro API from Dados B3 — 10 operation(s) for macro.

Operations 10

GET /macro Hub Macro #
GET /macro/dolar Macro Dolar #
GET /macro/euro Macro Euro #
GET /macro/selic Macro Selic #
GET /macro/ipca Macro Ipca #
GET /macro/pib Macro Pib #
GET /macro/desemprego Macro Desemprego #
GET /macro/series Macro Series Catalogo #
GET /macro/series/{codigo} Macro Serie #
GET /macro/fluxo-e-mercado Fluxo E Mercado #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dadosb3-com:dadosb3-com-macro-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dadosb3-com-macro-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Dados B3 Macro API
  description: 'Dados fundamentalistas de companhias abertas brasileiras com metodologia 100% pública e invariantes de dado publicados. Fontes: CVM (dados abertos, ODbL) e B3 (COTAHIST fim-de-dia). Todo número carrega a conta CVM de origem; valor duvidoso carrega flag, nunca estimativa escondida.'
  version: 0.1.0
tags:
- name: Macro
paths:
  /macro:
    get:
      summary: Hub Macro
      description: 'Vertical macro: séries agregadas do BCB e do IBGE (fluxo estrangeiro, PTAX, Selic, IPCA, PIB, desocupação).'
      operationId: hub_macro_macro_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
      - name: accept-language
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Accept-Language
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Macro
  /macro/dolar:
    get:
      summary: Macro Dolar
      description: Dólar PTAX de fechamento, compra e venda (BCB, SGS 1 e 10813), diário desde 1999. ABERTA.
      operationId: macro_dolar_macro_dolar_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
      - name: accept-language
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Accept-Language
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Macro
  /macro/euro:
    get:
      summary: Macro Euro
      description: Euro PTAX de fechamento, compra e venda (BCB, SGS 21619 e 21620), diário desde 1999. ABERTA.
      operationId: macro_euro_macro_euro_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
      - name: accept-language
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Accept-Language
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Macro
  /macro/selic:
    get:
      summary: Macro Selic
      description: Meta Selic (SGS 432, com as vigências do Copom) e Selic efetiva (SGS 1178), desde 1999. ABERTA.
      operationId: macro_selic_macro_selic_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
      - name: accept-language
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Accept-Language
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Macro
  /macro/ipca:
    get:
      summary: Macro Ipca
      description: IPCA no mês e em 12 meses (IBGE, SIDRA 1737), desde julho de 1995. ABERTA.
      operationId: macro_ipca_macro_ipca_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
      - name: accept-language
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Accept-Language
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Macro
  /macro/pib:
    get:
      summary: Macro Pib
      description: 'PIB trimestral (IBGE, SIDRA 5932 e 1846): variações em volume e valor a preços correntes. ABERTA.'
      operationId: macro_pib_macro_pib_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
      - name: accept-language
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Accept-Language
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Macro
  /macro/desemprego:
    get:
      summary: Macro Desemprego
      description: Taxa de desocupação da PNAD Contínua, trimestre móvel (IBGE, SIDRA 6381). ABERTA.
      operationId: macro_desemprego_macro_desemprego_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
      - name: accept-language
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Accept-Language
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Macro
  /macro/series:
    get:
      summary: Macro Series Catalogo
      description: 'O catálogo das séries macro: cada grupo com nome, unidade, cobertura na base, fonte, LICENÇA e os

        endereços (página, JSON, CSV). ABERTO. Responde 200 mesmo sem a tabela (a cobertura vem nula): é o

        código que diz o que existe, e a base diz até onde.'
      operationId: macro_series_catalogo_macro_series_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Macro
  /macro/series/{codigo}:
    get:
      summary: Macro Serie
      description: 'Uma série macro em JSON ou CSV (`formato=csv`), do mais antigo ao mais recente. `de`/`ate` recortam

        (AAAA-MM-DD nas diárias, AAAA-MM nas mensais, AAAA-Tn nas trimestrais). Diárias (dolar, euro, selic): sem

        chave, AMOSTRA dos últimos 30 pontos com `aviso` (a regra de /indices/{codigo}/precos); com chave grátis, a

        série inteira. Mensais e trimestrais (ipca, pib, desemprego): a série inteira, aberta (a regra do

        /fluxo-estrangeiro). Toda resposta leva a fonte, a licença e a `citacao`.'
      operationId: macro_serie_macro_series__codigo__get
      parameters:
      - name: codigo
        in: path
        required: true
        schema:
          type: string
          title: Codigo
      - name: de
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: De
      - name: ate
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Ate
      - name: formato
        in: query
        required: false
        schema:
          type: string
          default: json
          title: Formato
      - name: x-api-key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Macro
  /macro/fluxo-e-mercado:
    get:
      summary: Fluxo E Mercado
      description: 'A pergunta do gráfico do noticiário, medida com fonte que se sustenta.


        O gráfico do ''estrangeiro na bolsa'' quase nunca sai sozinho: vem com a

        leitura causal colada (''estrangeiro voltou, bolsa sobe''). Esta página mede

        o que dá para medir e publica o resultado inteiro, inclusive a parte que

        desmancha a leitura.'
      operationId: fluxo_e_mercado_macro_fluxo_e_mercado_get
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Lang
      - name: accept-language
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Accept-Language
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Macro
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    ChaveApiNaUrl:
      type: apiKey
      in: query
      name: chave
      description: Alternativa ao cabeçalho para clientes que só abrem URL (navegação de IA). Fica no histórico e nos logs de quem a usa.
    ChaveApi:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Chave grátis (200 consultas/dia) ou Pro em /assinar. Abertos sem chave (limite por IP): fatos, indicadores, múltiplos e dividendos de qualquer ticker, ficha e ranking de FII. WEGE3, MXRF11, /hoje, /saude e a metodologia são abertos. Exigem chave: as_of, versões, preços, screener, /dump.'