{
  "components": {
    "callbacks": {},
    "examples": {},
    "headers": {},
    "links": {},
    "parameters": {},
    "pathItems": {},
    "requestBodies": {},
    "responses": {},
    "schemas": {},
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "",
    "title": "CNPJá (Brazilian company registry / CNPJ)",
    "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": {
      "cnpja": {
        "description": "",
        "title": "CNPJá (Brazilian company registry / CNPJ)",
        "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": "7902aca01742f50a011ae8ad568f2a7a312ad5685b1751738ffd879a4d9b4a2f",
          "generator_version": "3",
          "protocol_version": "1",
          "schema_version": "1"
        },
        "x-aisa-plans": {
          "builder": 1.0,
          "display_plan": "payg",
          "payg": 1.0,
          "similarweb_payg": 1.0,
          "team": 1.0,
          "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
        }
      }
    },
    "x-aisa-configured-paths": [
      "/apis/v1/cnpja/office/{taxId}"
    ],
    "x-aisa-document": {
      "composer_version": "31",
      "document_hash": "sha256:3377414946e61943f27a958b14b843532ac4baf84bc5c49b42d6d76c8717bcb2",
      "facts_hash": "7902aca01742f50a011ae8ad568f2a7a312ad5685b1751738ffd879a4d9b4a2f",
      "generator_version": "3",
      "protocol_version": "1",
      "response_pending": [],
      "schema_version": "1"
    },
    "x-aisa-plans": {
      "builder": 1.0,
      "display_plan": "payg",
      "payg": 1.0,
      "similarweb_payg": 1.0,
      "team": 1.0,
      "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
    },
    "x-aisa-provider": "cnpja"
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "openapi": "3.1.0",
  "paths": {
    "/apis/v1/cnpja/office/{taxId}": {
      "get": {
        "description": "Look up the registered profile of a Brazilian company office (establishment) by its 14-digit CNPJ tax ID. Returns the office's legal/company name, trade name (`alias`), registration status, founding date, full address, shareholder/member structure, and primary/secondary economic activities (CNAE).\n\n A \"company not found\" result returns HTTP 404 with a valid JSON body and is still billed; only 429, 5xx, and network errors are not billed.",
        "operationId": "get_cnpja_office_lookup",
        "parameters": [
          {
            "description": "The 14-digit Brazilian CNPJ number of the office to look up (digits only, no punctuation). Punctuated input fails routing. Example: `06990590000123`.",
            "in": "path",
            "name": "taxId",
            "required": true,
            "schema": {
              "example": "06990590000123",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "geocoding",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "links",
            "required": false,
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "maxAge",
            "required": false,
            "schema": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "maxStale",
            "required": false,
            "schema": {
              "maximum": 9223372036854775807,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "registrations",
            "required": false,
            "schema": {
              "maxLength": 256,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "simples",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "simplesHistory",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "strategy",
            "required": false,
            "schema": {
              "maxLength": 32,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "suframa",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "address": {
                    "city": "São Paulo",
                    "country": {
                      "id": 76,
                      "name": "Brasil"
                    },
                    "details": "Andar 17A20 Tsul 2 17A20",
                    "district": "Itaim Bibi",
                    "municipality": 3550308,
                    "number": "3477",
                    "state": "SP",
                    "street": "Avenida Brig Faria Lima",
                    "zip": "04538133"
                  },
                  "alias": null,
                  "company": {
                    "equity": 200000000,
                    "id": "06990590",
                    "members": [
                      {
                        "agent": {
                          "person": {
                            "age": "51-60",
                            "country": {
                              "id": 76,
                              "name": "Brasil"
                            },
                            "id": "1cf6c284-8400-5c85-89e3-b20e0093be5a",
                            "name": "Yun Ki Lee",
                            "taxId": "***746608**",
                            "type": "NATURAL"
                          },
                          "role": {
                            "id": 17,
                            "text": "Procurador"
                          }
                        },
                        "person": {
                          "country": {
                            "id": 840,
                            "name": "Estados Unidos"
                          },
                          "id": "f172f1f6-46f5-5a10-9fb9-8d7c2dbdc2f9",
                          "name": "GOOGLE LLC",
                          "taxId": "06947284000104",
                          "type": "LEGAL"
                        },
                        "role": {
                          "id": 37,
                          "text": "Sócio Pessoa Jurídica Domiciliado no Exterior"
                        },
                        "since": "2004-09-01"
                      },
                      {
                        "person": {
                          "age": "61-70",
                          "country": {
                            "id": 76,
                            "name": "Brasil"
                          },
                          "id": "dc20e638-a27c-547c-bb7d-5ee7cbd917b7",
                          "name": "Fabio Jose Silva Coelho",
                          "taxId": "***133807**",
                          "type": "NATURAL"
                        },
                        "role": {
                          "id": 5,
                          "text": "Administrador"
                        },
                        "since": "2014-08-26"
                      }
                    ],
                    "name": "GOOGLE BRASIL INTERNET LTDA.",
                    "nature": {
                      "id": 2062,
                      "text": "Sociedade Empresária Limitada"
                    },
                    "size": {
                      "acronym": "DEMAIS",
                      "id": 5,
                      "text": "Demais"
                    }
                  },
                  "emails": [
                    {
                      "address": "googlebrasil@google.com",
                      "domain": "google.com",
                      "ownership": "CORPORATE"
                    }
                  ],
                  "founded": "2004-09-01",
                  "head": true,
                  "mainActivity": {
                    "id": 6319400,
                    "text": "Portais, provedores de conteúdo e outros serviços de informação na Internet"
                  },
                  "phones": [
                    {
                      "area": "11",
                      "number": "23958400",
                      "type": "LANDLINE"
                    }
                  ],
                  "sideActivities": [
                    {
                      "id": 4751201,
                      "text": "Comércio varejista especializado de equipamentos e suprimentos de informática"
                    },
                    {
                      "id": 6201501,
                      "text": "Desenvolvimento de programas de computador sob encomenda"
                    },
                    {
                      "id": 6202300,
                      "text": "Desenvolvimento e licenciamento de programas de computador customizáveis"
                    },
                    {
                      "id": 6311900,
                      "text": "Tratamento de dados, provedores de serviços de aplicação e serviços de hospedagem na Internet"
                    },
                    {
                      "id": 6462000,
                      "text": "Holdings de instituições não financeiras"
                    },
                    {
                      "id": 7319004,
                      "text": "Consultoria em publicidade"
                    },
                    {
                      "id": 8299799,
                      "text": "Outras atividades de serviços prestados principalmente às empresas não especificadas anteriormente"
                    }
                  ],
                  "status": {
                    "id": 2,
                    "text": "Ativa"
                  },
                  "statusDate": "2004-09-01",
                  "taxId": "06990590000123",
                  "updated": "2026-09-08T20:11:15.000Z"
                },
                "schema": {
                  "properties": {
                    "address": {
                      "description": "Registered address of the office.",
                      "properties": {
                        "city": {
                          "type": "string"
                        },
                        "country": {
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "details": {
                          "description": "Address complement (complemento).",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "district": {
                          "type": "string"
                        },
                        "municipality": {
                          "description": "IBGE municipality code.",
                          "type": "integer"
                        },
                        "number": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        },
                        "street": {
                          "type": "string"
                        },
                        "zip": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "alias": {
                      "description": "Trade name (nome fantasia) of the office, when registered. Returns `null` for offices without a registered trade name.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "company": {
                      "description": "The parent legal entity.",
                      "properties": {
                        "equity": {
                          "description": "Registered share capital.",
                          "type": "number"
                        },
                        "id": {
                          "description": "Company identifier (8 digits, may include leading zeros).",
                          "type": "string"
                        },
                        "members": {
                          "description": "Shareholder / partner structure (quadro societário). Each entry describes a member and, when applicable, their legal representative (agent).",
                          "items": {
                            "properties": {
                              "agent": {
                                "description": "Legal representative of the member, when the member is a foreign or legal entity.",
                                "properties": {
                                  "person": {
                                    "properties": {
                                      "age": {
                                        "type": [
                                          "string",
                                          "null"
                                        ]
                                      },
                                      "country": {
                                        "properties": {
                                          "id": {
                                            "type": "integer"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "type": "object"
                                      },
                                      "id": {
                                        "type": "string"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "taxId": {
                                        "type": "string"
                                      },
                                      "type": {
                                        "type": "string"
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "role": {
                                    "properties": {
                                      "id": {
                                        "type": "integer"
                                      },
                                      "text": {
                                        "type": "string"
                                      }
                                    },
                                    "type": "object"
                                  }
                                },
                                "type": [
                                  "object",
                                  "null"
                                ]
                              },
                              "person": {
                                "properties": {
                                  "age": {
                                    "description": "Age band for natural persons.",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "country": {
                                    "properties": {
                                      "id": {
                                        "type": "integer"
                                      },
                                      "name": {
                                        "type": "string"
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  },
                                  "taxId": {
                                    "description": "Partially masked for natural persons.",
                                    "type": "string"
                                  },
                                  "type": {
                                    "description": "LEGAL or NATURAL.",
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "role": {
                                "properties": {
                                  "id": {
                                    "type": "integer"
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "since": {
                                "description": "Date the member joined (YYYY-MM-DD).",
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "name": {
                          "description": "Legal name (razão social) of the company.",
                          "type": "string"
                        },
                        "nature": {
                          "description": "Legal nature (natureza jurídica) of the company.",
                          "properties": {
                            "id": {
                              "type": "integer"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "size": {
                          "description": "Company size classification (porte).",
                          "properties": {
                            "acronym": {
                              "type": "string"
                            },
                            "id": {
                              "type": "integer"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    "emails": {
                      "description": "Registered email addresses.",
                      "items": {
                        "properties": {
                          "address": {
                            "type": "string"
                          },
                          "domain": {
                            "type": "string"
                          },
                          "ownership": {
                            "description": "e.g. CORPORATE / PERSONAL.",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "founded": {
                      "description": "Registration/opening date of the office (YYYY-MM-DD).",
                      "type": "string"
                    },
                    "head": {
                      "description": "Whether this office is the company headquarters (matriz).",
                      "type": "boolean"
                    },
                    "mainActivity": {
                      "description": "Primary economic activity (CNAE) of the office.",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "text": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "phones": {
                      "description": "Registered phone numbers.",
                      "items": {
                        "properties": {
                          "area": {
                            "description": "Area code (DDD).",
                            "type": "string"
                          },
                          "number": {
                            "type": "string"
                          },
                          "type": {
                            "description": "e.g. LANDLINE / MOBILE.",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "sideActivities": {
                      "description": "Secondary economic activities (CNAE).",
                      "items": {
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "text": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "status": {
                      "description": "Registration status of the office (e.g. Ativa / Baixada).",
                      "properties": {
                        "id": {
                          "type": "integer"
                        },
                        "text": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "statusDate": {
                      "description": "Date of the current registration status (YYYY-MM-DD).",
                      "type": "string"
                    },
                    "taxId": {
                      "description": "The 14-digit CNPJ of this office.",
                      "type": "string"
                    },
                    "updated": {
                      "description": "Timestamp of the last update of this record at the revenue service (ISO 8601).",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "The registered office profile for the given CNPJ."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {}
              }
            },
            "description": "Error response; upstream passthrough responses may use provider formats"
          }
        },
        "summary": "CNPJ Office Lookup",
        "tags": [
          "cnpja"
        ],
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "mpp": false,
          "mpp_methods": [],
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          },
          "x402": false
        },
        "x-aisa-catalog-id": "cnpja",
        "x-aisa-category": "data",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/cnpja/get_cnpja-office-lookup",
        "x-aisa-passthrough": true,
        "x-aisa-pricing": {
          "cost_contract": "response_units",
          "customer_multiplier": 1.0,
          "customer_pricing": "provider_cost_multiplier",
          "default_request_estimate_usd": 0.0288,
          "estimate_source": "profile_seed",
          "evidence_source": "response_header"
        },
        "x-aisa-query-policy": {
          "ignore_undeclared": false,
          "request_wins": false
        },
        "x-aisa-response-source": {
          "content_hash": "sha256:babf9b03c815bacddc38366e2f29ce5a9c097044e56f8d2c69b0eef5acfd552e",
          "kind": "upstream_success_contract",
          "source": {
            "content_hash": "sha256:4251ce815278099052edf66798464074e2a9bd81e612468054d822fc299f2269",
            "converter": "scripts/import_existing_contracts.py@1",
            "fetched_at": "2026-09-29T21:25:55+08:00",
            "kind": "manual",
            "owner": "AIsa-team/docs",
            "path_space": "public",
            "policy_revision": "sha256:2df02751e2bc006a173ed512c32ddbf9a1f58b24f6e01de32797e880072178de",
            "refresh_policy": "manual",
            "review_period_days": 30,
            "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/cnpja.json"
          }
        },
        "x-aisa-revision": {
          "customer_pricing_ref": "21240e8f5d67",
          "plan_policy_version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb",
          "profile_ref": "5ec8d5027949"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_cnpja_office_lookup",
          "path": "/apis/v1/cnpja/office/{taxId}"
        },
        "x-aisa-source": {
          "content_hash": "sha256:4251ce815278099052edf66798464074e2a9bd81e612468054d822fc299f2269",
          "converter": "scripts/import_existing_contracts.py@1",
          "fetched_at": "2026-09-29T21:25:55+08:00",
          "kind": "manual",
          "owner": "AIsa-team/docs",
          "path_space": "public",
          "policy_revision": "sha256:2df02751e2bc006a173ed512c32ddbf9a1f58b24f6e01de32797e880072178de",
          "refresh_policy": "manual",
          "review_period_days": 30,
          "url": "https://github.com/AIsa-team/docs/blob/7783840e4710bb00886143feab84606f8aaea67c/openapi/cnpja.json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-upstream-path": "/office/{taxId}",
        "x-aisa-validation": "mixed",
        "x-codeSamples": [
          {
            "label": "Reference example",
            "lang": "text",
            "source": "# Fixed reference example. Playground inputs do not update this sample.\ncurl --request GET \\\n  --url https://api.aisa.one/apis/v1/cnpja/office/06990590000123 \\\n  --header 'Authorization: Bearer <token>'"
          }
        ]
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ]
}
