Count the records of a name
GET/v1/drugs/overview
Counts the records of one country that carry one exact name, such as an active ingredient or a brand: how many there are, of which kinds, from which holders and in which administrative and prescription states. The name is matched whole, ignoring accents and case, so a combination that merely contains it is not counted. To list the records themselves, search with match=exact.
Parameters
-
countrystring Required - Two-letter ISO 3166-1 country code, lowercase. Every search is scoped to one country.
-
namestring Required - The exact name to count, 3 to 120 characters. Accents and case are ignored.
-
kindsstring - Count only these record kinds, as comma-separated sourceId:kind pairs of the requested country, at most 12.
Returns
-
countrystring - The country searched.
-
namestring - The name counted, as it was matched.
-
recordsinteger - How many records carry the name.
-
truncatedboolean - True when more than 20,000 records carry the name; every count then covers the first 20,000.
-
holdersinteger - How many distinct holders those records name, in the holder, labeler or sponsor field their source publishes.
-
kindsobject[] - The records per source and kind, as { sourceId, kind, records }, largest first.
-
administrativeStatusesobject[] - The records per administrative status, as { value, records }, in the source’s own words; unknown when it states none.
-
prescriptionCategoriesobject[] - The records per prescription category, as { value, records }.
-
topHoldersobject[] - The 25 holders with the most records, as { name, records }, spelled as the source spells them.
Errors
400 401
403
429 503 ·
Errors and rate limits
curl -G https://api.medifontis.com/v1/drugs/overview \
-H "Authorization: Bearer $MEDIFONTIS_API_KEY" \
--data-urlencode "country=es" \
--data-urlencode "name=enantyum 12,5 mg comprimidos"const params = new URLSearchParams({ country: 'es', name: 'enantyum 12,5 mg comprimidos' })
const response = await fetch(`https://api.medifontis.com/v1/drugs/overview?${params}`, {
headers: { Authorization: `Bearer ${process.env.MEDIFONTIS_API_KEY}` },
})
if (!response.ok) throw new Error(`Medifontis ${response.status}`)
const { records, holders, topHolders } = await response.json()import os
import requests
response = requests.get(
"https://api.medifontis.com/v1/drugs/overview",
params={"country": "es", "name": "enantyum 12,5 mg comprimidos"},
headers={"Authorization": f"Bearer {os.environ['MEDIFONTIS_API_KEY']}"},
timeout=10,
)
response.raise_for_status()
overview = response.json()
{
"country": "es",
"name": "enantyum 12,5 mg comprimidos",
"records": 1,
"truncated": false,
"holders": 1,
"kinds": [
{
"sourceId": "es.aemps.cima",
"kind": "medicines",
"records": 1
}
],
"administrativeStatuses": [
{
"value": "authorised",
"records": 1
}
],
"prescriptionCategories": [
{
"value": "prescription-or-restricted",
"records": 1
}
],
"topHolders": [
{
"name": "Laboratorios Menarini S.A.",
"records": 1
}
]
}