Docs / API reference

Export records as CSV

GET/v1/drugs/export

Downloads records of one country as a CSV file: either every record that carries one exact name, or one whole kind of one source. Exports are part of the Pro and Business plans, and whole sources of the Business plan. Only sources published under an open licence are exported; a record from any other source is left out. A file holds up to 5,000 records, and the X-Medifontis-Next response header carries the cursor of the next one.

Parameters

country string Required
Two-letter ISO 3166-1 country code, lowercase. Every search is scoped to one country.
name string
Export the records that carry this exact name, 3 to 120 characters. Accents and case are ignored. Use either name, or sourceId and kind.
kinds string
With name: keep only these record kinds, as comma-separated sourceId:kind pairs of the requested country, at most 12.
sourceId string
Export one whole source of the requested country, such as it.aifa.packages. Requires kind.
kind string
With sourceId: the record kind to export, such as packages.
after string
The cursor from the X-Medifontis-Next header of the previous file. Omit it for the first file.

Returns

body text/csv
One header row and one row per record, in UTF-8: country, source_id, record_id, kind, name, other_names, identifiers, holder, administrative_status, prescription_category, retrieved_at, source_url, licence and attribution. Identifiers are written scheme=value, separated by vertical bars.
X-Medifontis-Rows header
The number of records in this file.
X-Medifontis-Next header
The cursor of the next file. Absent when this file is the last one.

Errors

400 401 403 404 429 503 · Errors and rate limits

GET /v1/drugs/export
curl -G https://api.medifontis.com/v1/drugs/export \
  -H "Authorization: Bearer $MEDIFONTIS_API_KEY" \
  --data-urlencode "country=us" \
  --data-urlencode "name=atorvastatin" \
  -o medicines.csv
Response
country,source_id,record_id,kind,name,other_names,identifiers,holder,administrative_status,prescription_category,retrieved_at,source_url,licence,attribution
us,us.fda.ndc,us:fda:ndc:0078-1371_b0a6d76c-cacb-4499-a18a-c8353db652f2,ndc-products,atorvastatin,ATORVASTATIN CALCIUM TRIHYDRATE,ndc-product=0078-1371 | ndc-package=0078-1371-07 | spl-id=b0a6d76c-cacb-4499-a18a-c8353db652f2,Novartis Pharmaceuticals Corporation,,unknown,2026-11-09T10:46:07.838Z,https://api.fda.gov/download.json,CC0-1.0,U.S. Food and Drug Administration / openFDA