{"openapi":"3.1.0","info":{"title":"Brasil IO (BYOK) API","version":"0.1.0","description":"Brasil IO (BYOK) lets an AI assistant read your own Brasil IO data through the Brasil IO API with a key you supply (Brasil.IO API token). Read-only: 5 tools (query_dataset_table, search_companies, search_election_candidates, search_deputy_expenses, search_federal_spending). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-brasilio.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-brasilio/docs"},"termsOfService":"https://connectorbay.com/byok-brasilio/terms"},"servers":[{"url":"https://byok-brasilio.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-brasilio/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/query_dataset_table":{"post":{"operationId":"query_dataset_table","summary":"Read rows of any Brasil.IO dataset table with optional full-text search and paging; dataset and table names come from th","description":"Read rows of any Brasil.IO dataset table with optional full-text search and paging; dataset and table names come from the dataset list on brasil.io/datasets. Use for \"Show the COVID-19 case rows matching Sao Paulo\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"dataset_slug":{"description":"Dataset slug such as covid19, eleicoes-brasil, gastos-diretos, gastos-deputados or socios-brasil.","maxLength":200,"title":"Dataset Slug","type":"string"},"table_name":{"description":"Table name inside the dataset, for example caso, candidatos, gastos, cota_parlamentar or empresas.","maxLength":200,"title":"Table Name","type":"string"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Optional full-text search words.","title":"Search"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Rows per page (1 to 100 here; the service allows up to 10000).","title":"Page Size"}},"required":["dataset_slug","table_name"],"title":"query_dataset_tableArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_companies":{"post":{"operationId":"search_companies","summary":"Search the Brazilian company register extract (CNPJ and company name, state) from the Receita Federal data, captured in ","description":"Search the Brazilian company register extract (CNPJ and company name, state) from the Receita Federal data, captured in 2020. Use for \"Find the Brazilian company 'Igreja Batista' registered in Acre\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"description":"Words in the company name or a CNPJ number.","maxLength":200,"title":"Search","type":"string"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Rows per page (1 to 100 here; the service allows up to 10000).","title":"Page Size"}},"required":["search"],"title":"search_companiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_election_candidates":{"post":{"operationId":"search_election_candidates","summary":"Search Brazilian election candidates (data from the electoral court TSE since 1996) by name or other words. Use for \"Fin","description":"Search Brazilian election candidates (data from the electoral court TSE since 1996) by name or other words. Use for \"Find election candidates named Marina Silva\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"description":"Candidate name or other words.","maxLength":200,"title":"Search","type":"string"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Rows per page (1 to 100 here; the service allows up to 10000).","title":"Page Size"}},"required":["search"],"title":"search_election_candidatesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_deputy_expenses":{"post":{"operationId":"search_deputy_expenses","summary":"Search the parliamentary expense allowance (cota parlamentar) of Brazilian federal deputies by words such as deputy name","description":"Search the parliamentary expense allowance (cota parlamentar) of Brazilian federal deputies by words such as deputy name or supplier. Use for \"What parliamentary expenses mention a flight ticket purchase\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"description":"Deputy name, supplier or expense description words.","maxLength":200,"title":"Search","type":"string"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Rows per page (1 to 100 here; the service allows up to 10000).","title":"Page Size"}},"required":["search"],"title":"search_deputy_expensesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_federal_spending":{"post":{"operationId":"search_federal_spending","summary":"Search direct spending of the Brazilian federal government (gastos diretos) by words such as agency, supplier or descrip","description":"Search direct spending of the Brazilian federal government (gastos diretos) by words such as agency, supplier or description. Use for \"Show federal spending related to education\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"description":"Words in the agency, supplier or description.","maxLength":200,"title":"Search","type":"string"},"page":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"Rows per page (1 to 100 here; the service allows up to 10000).","title":"Page Size"}},"required":["search"],"title":"search_federal_spendingArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}