Início rápido
Obtenha uma chave de API, busque um medicamento e leia o resultado. Leva cerca de cinco minutos.
1. Obtenha uma chave de API
Crie uma chave na página de cadastro. Ela começa com mf_live_ e funciona imediatamente para todos os países. Obtenha sua chave de API.
Armazene-a em uma variável de ambiente no seu servidor:
export MEDIFONTIS_API_KEY="mf_live_…"
2. Busque um medicamento
Chame GET /v1/drugs com um código de país e um termo de busca:
curl -G https://api.medifontis.com/v1/drugs \
-H "Authorization: Bearer $MEDIFONTIS_API_KEY" \
--data-urlencode "country=br" \
--data-urlencode "q=dipirona sodica"const params = new URLSearchParams({ country: 'br', q: 'dipirona sodica' })
const response = await fetch(`https://api.medifontis.com/v1/drugs?${params}`, {
headers: { Authorization: `Bearer ${process.env.MEDIFONTIS_API_KEY}` },
})
if (!response.ok) throw new Error(`Medifontis ${response.status}`)
const { results, nextOffset } = await response.json()import os
import requests
response = requests.get(
"https://api.medifontis.com/v1/drugs",
params={"country": "br", "q": "dipirona sodica"},
headers={"Authorization": f"Bearer {os.environ['MEDIFONTIS_API_KEY']}"},
timeout=10,
)
response.raise_for_status()
results = response.json()["results"]
3. Leia a resposta
Cada resultado é um registro de uma fonte. Os campos que você mais vai usar são name, identifiers, sourceId e kind, data e licence.
{
"country": "br",
"sourceId": "br.anvisa.cmed-prices",
"id": "br:cmed:presentations:528525010218907",
"kind": "presentations",
"name": "DIPIRONA SODICA 1000 MG COM CT BL AL PLAS AMB X 30",
"data": {
"name": "DIPIRONA SODICA 1000 MG COM CT BL AL PLAS AMB X 30",
"holder": "PRATI DONADUZZI & CIA LTDA",
"stripe": "Tarja Sem Tarja",
"barcodes": [
"7899547553505"
],
"confaz87": false,
"currency": "BRL",
"marketed": null,
"ggremCode": "528525010218907",
"useDomain": "unknown",
"capApplies": null,
"icmsExempt": false,
"holderTaxId": "73.856.593/0001-66",
"priceRegime": "Liberado",
"productName": "DIPIRONA SODICA",
"productType": "Genérico",
"hospitalOnly": false,
"presentation": "1000 MG COM CT BL AL PLAS AMB X 30",
"sourceStatus": null,
"supplyRegime": "Tarja Sem Tarja",
"factoryPrices": {
"icms-0": "34.00",
"icms-12": "38.64",
"icms-17": "40.96",
"icms-18": "41.46",
"icms-19": "41.98",
"icms-20": "42.50",
"icms-21": "43.04",
"icms-22": "43.59",
"icms-23": "44.16",
"icms-17.5": "41.21",
"icms-19.5": "42.24",
"icms-20.5": "42.77",
"icms-22.5": "43.87",
"icms-12-alc": "34.50",
"icms-17-alc": "36.57",
"icms-18-alc": "37.02",
"icms-19-alc": "37.48",
"icms-20-alc": "37.95",
"icms-21-alc": "38.43",
"icms-22-alc": "38.92",
"icms-23-alc": "39.42",
"withoutTaxes": "30.36",
"icms-17.5-alc": "36.80",
"icms-19.5-alc": "37.71",
"icms-20.5-alc": "38.19",
"icms-22.5-alc": "39.17"
},
"pisCofinsList": "Negativa",
"substanceText": "DIPIRONA",
"targetSpecies": [],
"consumerPrices": {
"icms-0": "45.61",
"icms-12": "51.83",
"icms-17": "54.95",
"icms-18": "55.62",
"icms-19": "56.31",
"icms-20": "57.01",
"icms-21": "57.74",
"icms-22": "58.47",
"icms-23": "59.24",
"icms-17.5": "55.28",
"icms-19.5": "56.66",
"icms-20.5": "57.37",
"icms-22.5": "58.85",
"icms-12-alc": "47.69",
"icms-17-alc": "50.56",
"icms-18-alc": "51.18",
"icms-19-alc": "51.81",
"icms-20-alc": "52.46",
"icms-21-alc": "53.13",
"icms-22-alc": "53.80",
"icms-23-alc": "54.50",
"withoutTaxes": "41.97",
"icms-17.5-alc": "50.87",
"icms-19.5-alc": "52.13",
"icms-20.5-alc": "52.80",
"icms-22.5-alc": "54.15"
},
"invalidBarcodes": [],
"activeSubstances": [
"DIPIRONA"
],
"therapeuticClass": "N2B2 - ANALGÉSICOS NÃO NARCÓTICOS E ANTIPIRÉTICOS ISENTOS DE PRESCRIÇÃO",
"commercialisation": {
"year": 2025,
"marketed": false
},
"priceAnalysisNote": null,
"useDomainEvidence": {
"basis": "unreviewed",
"field": null,
"value": null,
"version": 1,
"sourceId": "br.anvisa.cmed-prices"
},
"patientEligibility": "not-assessed",
"registrationNumber": "1256800410339",
"targetSpeciesStatus": "not-reported",
"administrativeStatus": "unknown",
"prescriptionCategory": "non-prescription",
"prescriptionRequired": false,
"therapeuticClassCode": "N2B2",
"commercialDestination": null,
"registrationNumberFlag": null
},
"region": null,
"retrievedAt": "2026-10-20T07:01:32.181Z",
"sourceUrl": "https://www.gov.br/anvisa/pt-br/assuntos/medicamentos/cmed/precos",
"licence": {
"id": "LicenseRef-CMED-Lista-Precos",
"url": "https://www.gov.br/anvisa/pt-br/assuntos/medicamentos/cmed/precos",
"scope": "current consumer price list (PF and PMC) linked from the CMED prices page",
"termsUrl": "https://creativecommons.org/licenses/by-nd/3.0/deed.pt_BR",
"reviewedAt": "2026-09-29",
"attribution": "Fonte: Câmara de Regulação do Mercado de Medicamentos (CMED), Secretaria Executiva/ANVISA — Lista de Preços de Medicamentos (Preços Fábrica e Máximos ao Consumidor)",
"documentsIncluded": false
},
"limitations": [
"Every presentation of the current CMED consumer price list (Preço Fábrica and Preço Máximo ao Consumidor): medicines with a CMED price, not ANVISA’s complete registration register.",
"The list carries no registration status; being priced does not establish a valid registration, current marketing or availability. \"COMERCIALIZAÇÃO <year>\" is the holder’s report for that past year only.",
"The stripe (tarja) is the prescription classification: red and black stripes are sold under prescription and \"Sem Tarja\" without one; \"- (*)\" means ANVISA’s Datavisa records carry no stripe, so the classification stays unknown. No patient eligibility is inferred.",
"Prices are regulatory ceilings in BRL per ICMS rate, not transaction prices; the PMC is omitted for hospital-restricted packs.",
"The reviewed October 9, 2026 preamble states no separate price-validity date; pricesValidFrom stays null, independently of the publication date.",
"Therapeutic classes are the list’s own class codes, not WHO ATC codes.",
"gov.br publishes its site content under CC BY-ND 3.0. ANVISA also lists these price data as open data (Plano de Dados Abertos 2023–2025), which Decreto 8.777/2016 defines as freely usable with attribution, and official acts are outside copyright (Lei 9.610/1998, art. 8). Medifontis restructures the list into records; whether the no-derivatives notice applies is not resolved."
],
"names": [
"DIPIRONA SODICA 1000 MG COM CT BL AL PLAS AMB X 30",
"DIPIRONA SODICA",
"DIPIRONA"
],
"identifiers": [
{
"value": "1256800410339",
"scheme": "registration"
},
{
"value": "528525010218907",
"scheme": "ggrem"
},
{
"value": "7899547553505",
"scheme": "barcode"
}
]
}
4. Percorra as páginas de resultados
nextOffset é o offset da próxima página, ou null na última. Passe-o como offset para ler a próxima página:
async function* searchAll(country, q) {
let offset = 0
while (offset !== null) {
const params = new URLSearchParams({ country, q, limit: '50', offset: String(offset) })
const response = await fetch(`https://api.medifontis.com/v1/drugs?${params}`, {
headers: { Authorization: `Bearer ${process.env.MEDIFONTIS_API_KEY}` },
})
if (!response.ok) throw new Error(`Medifontis ${response.status}`)
const page = await response.json()
yield* page.results
offset = page.nextOffset
}
}
Próximos passos
Sugestões ao digitar
Preencha automaticamente nomes de medicamentos enquanto o usuário digita.
Registros e procedência
Todos os campos de um registro e como citá-lo.
Erros e limites de requisições
Códigos de status, limites e novas tentativas.
Referência da API
Todos os endpoints, parâmetros e campos.