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=gb" \
  --data-urlencode "q=amoxicillin"

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": "gb",
  "sourceId": "gb.nhsbsa.bnf-snomed",
  "id": "gb:nhsbsa:dmd:196111000001109",
  "kind": "amp",
  "name": "Almodan 125mg/5ml syrup (Teva UK Ltd)",
  "data": {
    "name": "Almodan 125mg/5ml syrup (Teva UK Ltd)",
    "pack": null,
    "level": "AMP",
    "bnfCode": "0501013B0BDABAJ",
    "bnfName": "Almodan 125mg/5ml syrup",
    "subPack": null,
    "vtmCode": "774586009",
    "vtmName": "Amoxicillin",
    "strength": 25,
    "useDomain": "unknown",
    "snomedCode": "196111000001109",
    "legalCategory": "not-collected",
    "targetSpecies": [],
    "unitOfMeasure": null,
    "packDescription": null,
    "useDomainEvidence": {
      "basis": "unreviewed",
      "field": null,
      "value": null,
      "version": 1,
      "sourceId": "gb.nhsbsa.bnf-snomed"
    },
    "patientEligibility": "not-assessed",
    "productDescription": "Almodan 125mg/5ml syrup (Teva UK Ltd)",
    "targetSpeciesStatus": "not-reported",
    "prescriptionCategory": "unknown"
  },
  "region": null,
  "retrievedAt": "2026-10-20T02:32:49.259Z",
  "sourceUrl": "https://www.nhsbsa.nhs.uk/prescription-data/understanding-our-data/bnf-snomed-mapping",
  "licence": {
    "id": "OGL-UK-3.0",
    "url": "https://www.nhsbsa.nhs.uk/our-policies/terms-and-conditions",
    "scope": "NHSBSA monthly BNF–SNOMED mapping file; not the TRUD dm+d release",
    "reviewedAt": "2026-09-28",
    "attribution": "BNF SNOMED Mapping data, NHSBSA Copyright 2026. This information is licenced under the terms of the Open Government Licence.",
    "documentsIncluded": false
  },
  "limitations": [
    "Every VMP, VMPP, AMP and AMPP row of NHSBSA’s published BNF–SNOMED mapping, which follows dm+d; the full TRUD dm+d release (legal category, availability, prices) is not collected.",
    "No legal category (POM, P, GSL) is published in this file, so the prescription classification stays unknown.",
    "Rows without a BNF code are typically parallel imports or secondary-care products, as NHSBSA notes.",
    "dm+d identifiers are SNOMED CT UK Drug Extension concept IDs as NHSBSA publishes them; no SNOMED CT release content is included.",
    "A mapping row does not establish marketing, availability, reimbursement or patient eligibility."
  ],
  "names": [
    "Almodan 125mg/5ml syrup (Teva UK Ltd)",
    "Almodan 125mg/5ml syrup",
    "Amoxicillin"
  ],
  "identifiers": [
    {
      "value": "196111000001109",
      "scheme": "dmd"
    },
    {
      "value": "0501013B0BDABAJ",
      "scheme": "bnf"
    },
    {
      "value": "774586009",
      "scheme": "vtm"
    }
  ]
}

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