> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# Sgs series

> Get the numbers for a known SGS code. Find codes with `datasets_search` (CKAN `codigo_sgs`).

## 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](https://aisa.one/docs/openapi/bcb-gov-br.json)

Effective request declaration (including authentication and referenced schemas):

```json theme={null}
{
  "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.


## OpenAPI

````yaml openapi/bcb-gov-br.json POST /apis/v1/bcb-gov-br/economic-data/sgs-series
openapi: 3.1.0
info:
  description: ''
  title: Banco Central do Brasil open data
  version: '1'
  x-aisa-capabilities:
    idempotency: Idempotency-Key
    max_price: X-AISA-Max-Price-USD
    quote:
      header: X-AISA-Cost-Mode
      value: quote
  x-aisa-catalogs:
    bcb-gov-br:
      description: ''
      title: Banco Central do Brasil open data
      x-aisa-capabilities:
        idempotency: Idempotency-Key
        max_price: X-AISA-Max-Price-USD
        quote:
          header: X-AISA-Cost-Mode
          value: quote
      x-aisa-document:
        facts_hash: edf117a93e133da791cf67abc30c140208ddd53704a4d60fb611ef7732fc8019
        generator_version: '3'
        protocol_version: '1'
        schema_version: '1'
        seed_month: 2026-10
      x-aisa-plans:
        builder: 1
        display_plan: payg
        payg: 1
        similarweb_payg: 1
        team: 1
        version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-configured-paths:
    - /apis/v1/bcb-gov-br/economic-data/credit-rates
    - /apis/v1/bcb-gov-br/economic-data/datasets-search
    - /apis/v1/bcb-gov-br/economic-data/focus-expectations
    - /apis/v1/bcb-gov-br/economic-data/olinda-service
    - /apis/v1/bcb-gov-br/economic-data/payment-statistics
    - /apis/v1/bcb-gov-br/economic-data/pix-statistics
    - /apis/v1/bcb-gov-br/economic-data/ptax-currencies
    - /apis/v1/bcb-gov-br/economic-data/ptax-currency
    - /apis/v1/bcb-gov-br/economic-data/ptax-usd
    - /apis/v1/bcb-gov-br/economic-data/sgs-series
  x-aisa-document:
    composer_version: '31'
    document_hash: sha256:4edcea99b08503cd6d2aef834decda628d24b96c03a614ddb47811005eabf63d
    facts_hash: edf117a93e133da791cf67abc30c140208ddd53704a4d60fb611ef7732fc8019
    generator_version: '3'
    protocol_version: '1'
    response_pending: []
    schema_version: '1'
    seed_month: 2026-10
  x-aisa-plans:
    builder: 1
    display_plan: payg
    payg: 1
    similarweb_payg: 1
    team: 1
    version: e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb
  x-aisa-provider: bcb-gov-br
servers:
  - url: https://api.aisa.one
security:
  - bearerAuth: []
paths:
  /apis/v1/bcb-gov-br/economic-data/sgs-series:
    post:
      tags:
        - Banco Central do Brasil open data
      summary: Sgs series
      description: >-
        Get the numbers for a known SGS code. Find codes with `datasets_search`
        (CKAN `codigo_sgs`).
      operationId: bcb-gov-br.economic-data.sgs-series
      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.


                    Provider 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.


                    Provider reference: minimum 1; maximum 20.
                  type: number
                  x-alexandria-option-metadata:
                    in: body
                    max: 20
                    min: 1
              required:
                - codigo
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                provider:
                  description: Published by the provider on 2026-09-22.
                  summary: Official provider example
                  value:
                    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
              schema:
                not:
                  type: 'null'
                x-aisa-schema-completeness: documented-fields-only
          description: >-
            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.
        default:
          content:
            application/json:
              schema: {}
          description: >-
            Error response; upstream passthrough responses may use provider
            formats
components:
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.