Docs / Get started

Quickstart

Get an API key, search a medicine and read the result. It takes about five minutes.

1. Get an API key

Create a key on the signup page. It starts with mf_live_ and works immediately for every country. Get your API key.

Store it in an environment variable on your server:

export MEDIFONTIS_API_KEY="mf_live_…"

Call GET /v1/drugs with a country code and a query:

GET /v1/drugs
curl -G https://api.medifontis.com/v1/drugs \
  -H "Authorization: Bearer $MEDIFONTIS_API_KEY" \
  --data-urlencode "country=it" \
  --data-urlencode "q=tachipirina"

3. Read the response

Each result is one record of one source. The fields you will use most are name, identifiers, sourceId and kind, data and licence.

First result
{
  "country": "it",
  "sourceId": "it.aifa.packages",
  "id": "it:aifa:packages:012745016",
  "kind": "packages",
  "name": "TACHIPIRINA",
  "data": {
    "aic": "012745016",
    "atc": "N02BE01",
    "form": "Sciroppo",
    "name": "TACHIPIRINA",
    "holder": "AZIENDE CHIMICHE RIUNITE ANGELINI FRANCESCO A.C.R.A.F. S.P.A.",
    "smpcUrl": "https://api.aifa.gov.it/aifa-bdf-eif-be/1.0.0/organizzazione/219/farmaci/12745/stampati?ts=RCP",
    "useDomain": "human",
    "leafletUrl": "https://api.aifa.gov.it/aifa-bdf-eif-be/1.0.0/organizzazione/219/farmaci/12745/stampati?ts=FI",
    "supplyRegime": "Medicinali non soggetti a prescrizione medica ma non da banco",
    "targetSpecies": [],
    "useDomainEvidence": {
      "basis": "publisher-dataset-scope",
      "field": "sourceId",
      "value": "it.aifa.packages",
      "version": 1,
      "sourceId": "it.aifa.packages"
    },
    "packageDescription": "120 mg/5 ml sciroppo> flacone in PET da 120 ml con siringa dosatrice e bicchiere dosatore",
    "targetSpeciesStatus": "not-applicable",
    "administrativeStatus": "Autorizzata",
    "prescriptionCategory": "non-prescription",
    "activeIngredientsText": "PARACETAMOLO"
  },
  "region": null,
  "retrievedAt": "2026-10-20T03:30:57.988Z",
  "sourceUrl": "https://drive.aifa.gov.it/farmaci/confezioni_fornitura.csv",
  "licence": {
    "id": "CC-BY-4.0",
    "url": "https://www.aifa.gov.it/it/copyright",
    "attribution": "Agenzia Italiana del Farmaco (AIFA)",
    "documentsIncluded": false
  },
  "limitations": [
    "Publisher labels this dataset provisional and descriptive.",
    "Authorisation does not establish current marketing or patient-specific eligibility.",
    "Document links do not grant document redistribution rights."
  ],
  "names": [
    "TACHIPIRINA",
    "PARACETAMOLO"
  ],
  "identifiers": [
    {
      "value": "012745016",
      "scheme": "aic"
    },
    {
      "value": "N02BE01",
      "scheme": "atc"
    }
  ]
}

4. Page through results

nextOffset is the offset of the next page, or null on the last one. Pass it as offset to read the next page:

Node.js
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
  }
}

Next steps