anvisa
Python client and command-line tool for ANVISA's official Consultas Externas API (fila de análise, listas, UDI de dispositivos médicos, termos GMDN, nomes técnicos, assuntos de peticionamento, produtos para saúde, certificados de boas práticas e tabaco: all 59 endpoints of the spec).
uv tool install anvisa # or: pipx install anvisa
Credentials come from https://api.anvisa.gov.br/ (login Gov.br → Client ID / Client Secret).
Write them to ~/.config/anvisa/credentials.env (CLIENT_ID=..., CLIENT_SECRET=..., chmod 600)
or export ANVISA_CLIENT_ID / ANVISA_CLIENT_SECRET.
anvisa fila areas
anvisa fila query 167
anvisa udi search --nome cateter
anvisa --format json udi get 377
anvisa lista query 2141
anvisa nome-tecnico search --size 50
anvisa assunto list --busca bioequival
anvisa saude search --nome 1000VINYL
anvisa certificado search --nacional --internacional --status 0
anvisa tabaco get 33007111
from anvisa import Client
with Client() as anvisa: # credentials from the environment or ~/.config/anvisa/credentials.env
queue = anvisa.fila.query(167)
page = anvisa.udi.search(nomeComercial="cateter", size=50)
What the library handles for you, because ANVISA's spec doesn't say so: a User-Agent that Cloudflare accepts, token caching and renewal (29-minute tokens, no refresh token), a mirror of the gateway's rate limit (burst 25, 1 request/s) so loops never hit 429, 1-based request pages against 0-based responses, required filter keys, and typed exceptions for the validation errors ANVISA reports as HTTP 500.
Open data, no credentials: pip install 'anvisa[dados]' adds anvisa dados build, which turns
ANVISA's bulk CSVs from dados.anvisa.gov.br (alimentos, saneantes, cosméticos, petições,
produtos irregulares; Windows-1252, unescaped quotes) into typed, sorted Parquet plus five
derived tables (produtos, empresas, medidas, cosmeticos_por_empresa,
alimentos_por_produto), a manifest.json with Portuguese column descriptions
and a data dictionary page. The daily result is live at
https://vasfvitor.github.io/anvisa-api/ (dictionary: dicionario.html).
Full write-up, spec overlay and recorded fixtures: https://github.com/vasfvitor/anvisa-api
Metadata
Release files for anvisa 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| anvisa-0.7.0.tar.gz | 82.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| anvisa-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 174.2 kB
Release files / anvisa-0.7.0.tar.gz
| Download URL | anvisa-0.7.0.tar.gz |
|---|---|
| Size | 82.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5eb78c1d623c7f84cf66d1822e276d05f3e8e43b0610197f6746f9a16ffb44f3
|
|
BLAKE2b-256 checksum How to use checksums |
20dc41d60dd222d5d06328b58142908340000aad557a456a4d86800b4a0371f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / anvisa-0.7.0-py3-none-any.whl
| Download URL | anvisa-0.7.0-py3-none-any.whl |
|---|---|
| Size | 91.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc292be5c9f478f37ab7e857d4557cae2689a2e457dfc2acc34b935ff00ea016
|
|
BLAKE2b-256 checksum How to use checksums |
0f6cf6bc82af5267e37c9c7ef7537a12801726f8f8ca56d4d009b4862a3f49af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for anvisa 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for anvisa-0.7.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.