Docs / API reference

Suggest medicine names

GET/v1/drugs/suggestions

Returns distinct names from every source for typeahead. Exact names sort first, then names starting with the query, then other matches, shorter names first. Debounce requests and ignore stale responses when the query changes.

Parameters

country string Required
Two-letter ISO 3166-1 country code, lowercase. Every search is scoped to one country.
q string Required
What the user has typed so far, at least 3 characters.
limit integer
Number of suggestions to return, from 1 to 10. Defaults to 8.
useDomain enum
Keep only records whose source classifies them for this use. human and veterinary also include products the source marks for both. Applied before pagination.

Possible values: human veterinary both unknown not-applicable

species string
Keep only records with this reviewed target species, such as dog, cat, horse or cattle. Records with unknown or unmapped species are excluded. Applied before pagination.

Returns

country string
The country searched.
suggestions string[]
Distinct names, best matches first.

Errors

400 401 403 429 503 · Errors and rate limits

GET /v1/drugs/suggestions
curl -G https://api.medifontis.com/v1/drugs/suggestions \
  -H "Authorization: Bearer $MEDIFONTIS_API_KEY" \
  --data-urlencode "country=fr" \
  --data-urlencode "q=doli" \
  --data-urlencode "limit=8"
Response
{
  "country": "fr",
  "suggestions": [
    "DOLIPRANE 500 mg, gélule",
    "DOLIPRANE 1000 mg, gélule",
    "DOLIPRANE 500 mg, comprimé",
    "DOLIPRANE 1000 mg, comprimé",
    "DOLIPRANECAPS 1000 mg, gélule"
  ]
}