IaBulaDocs API V1Português
Browse documentation
API Reference

Medication search and canonical records

.md

Search Brazilian medications by name, filter records and retrieve canonical details with cursor pagination and evidence.

On this page

GET /v1/medications/search matches a literal substring of the official name, case-insensitively. Search returns a list of records; it does not declare that the query identifies one unique variant. %, _ and ! are not wildcards.

bash
curl --fail-with-body --get "$IABULA_API_BASE/v1/medications/search" \
  --header "X-API-Key: $IABULA_API_KEY" \
  --data-urlencode 'q=dipirona' \
  --data-urlencode 'limit=20'

When provided, q accepts 1–256 characters. limit accepts 1–100, default 20. ingredient_id and category_id are canonical UUIDs. dosage_form matches the canonical dosage form case-insensitively. Filters depend on links actually present in the catalog.

Stable cursor pagination#

Each page contains data and next_cursor. Pass the returned cursor without decoding or modifying it. Search cursors are bound to the filters; restart without a cursor when changing q or another filter. Invalid or mismatched cursors return HTTP 400.

bash
curl --fail-with-body --get "$IABULA_API_BASE/v1/medications/search" \
  --header "X-API-Key: $IABULA_API_KEY" \
  --data-urlencode "q=dipirona" \
  --data-urlencode "cursor=$IABULA_CURSOR"

Exact identifier lookup#

GET /v1/medications/lookup accepts EAN, CMED_GGREM or CMED_REGISTRO and a literal value. matched identifies one candidate; ambiguous retains separate candidates; unresolved does not invent a name match. Each candidate includes reusable IDs and source evidence.

bash
curl --fail-with-body --get "$IABULA_API_BASE/v1/medications/lookup"   --header "X-API-Key: $IABULA_API_KEY"   --data-urlencode "scheme=EAN"   --data-urlencode "value=7891058021580"

Details using a returned UUID#

Use an id returned by search in GET /v1/medications/{id}. Details include product_id and lists of presentations, registrations, companies and categories when available. Do not invent UUIDs or derive an ID from a name. Unknown IDs return HTTP 404.

bash
curl --fail-with-body "$IABULA_API_BASE/v1/medications/$IABULA_MEDICATION_ID" \
  --header "X-API-Key: $IABULA_API_KEY"

Interpret fields with evidence#

product_name, brand_name, dosage_form and active_ingredient_text have distinct meanings. Unmapped fields may be null. active_ingredient_text preserves source text and does not prove a link to ActiveIngredient. Regulatory categories are not clinical indications.

Contract and types
ParameterLocationRequiredType and bounds
qquerynostring; minLength=1, maxLength=256 | null
ingredient_idquerynostring (uuid) | null
dosage_formquerynostring; minLength=1, maxLength=100 | null
category_idquerynostring (uuid) | null
identifier_schemequerynostring: EAN, CMED_GGREM, CMED_REGISTRO | null
identifier_valuequerynostring; minLength=1, maxLength=64 | null
expandquerynostring: catalog_context | null
limitquerynointeger; minimum=1, maximum=100, default=20
cursorquerynostring; maxLength=2048 | null
Contract and types
HTTPContent-TypeSchema
200application/jsonMedicationPage
400application/jsonProblem
401application/jsonProblem
403application/jsonProblem
429application/jsonProblem
500application/jsonProblem
503application/jsonProblem
422application/jsonHTTPValidationError

GET /v1/medications/lookup#

Contract and types
ParameterLocationRequiredType and bounds
schemequeryyesstring: EAN, CMED_GGREM, CMED_REGISTRO
valuequeryyesstring; minLength=1, maxLength=64
Contract and types
HTTPContent-TypeSchema
200application/jsonIdentifierLookup
400application/jsonProblem
401application/jsonProblem
403application/jsonProblem
429application/jsonProblem
500application/jsonProblem
503application/jsonProblem
422application/jsonHTTPValidationError

GET /v1/medications/{id}#

Contract and types
ParameterLocationRequiredType and bounds
idpathyesstring (uuid)
Contract and types
HTTPContent-TypeSchema
200application/jsonMedicationDetail
400application/jsonProblem
401application/jsonProblem
403application/jsonProblem
429application/jsonProblem
500application/jsonProblem
503application/jsonProblem
404application/jsonProblem
422application/jsonHTTPValidationError

OpenAPI contract fields#

Contract and types
Schema.fieldType and boundsRequired
CatalogContext.source_substancesarray<SupportedSourceValue>yes
CatalogContext.source_laboratoriesarray<SupportedSourceValue>yes
CatalogContext.source_identifiersarray<SupportedSourceIdentifier>yes
CatalogContext.variantsarray<CatalogVariant>yes
CatalogIngredient.idstring (uuid)yes
CatalogIngredient.namestringyes
CatalogIngredient.rolestring | nullno
CatalogIngredient.amount_textstring | nullno
CatalogIngredient.evidencearray<Evidence>yes
CatalogPresentation.idstring (uuid)yes
CatalogPresentation.strengthstring | nullno
CatalogPresentation.unit_countinteger | nullno
CatalogPresentation.package_descriptionstring | nullno
CatalogPresentation.identifiersarray<SupportedSourceIdentifier>yes
CatalogPresentation.evidencearray<Evidence>yes
CatalogPreview.source_substancesarray<string>yes
CatalogPreview.source_laboratoriesarray<string>yes
CatalogPreview.cmed_registrationsarray<string>yes
CatalogPreview.has_multiple_source_valuesbooleanyes
CatalogPreview.source_values_truncatedbooleanyes
CatalogPreview.presentation_countintegeryes
CatalogPreview.presentationsarray<CatalogPreviewPresentation>yes
CatalogPreviewPresentation.idstring (uuid)yes
CatalogPreviewPresentation.variant_idstring (uuid)yes
CatalogPreviewPresentation.dosage_formstring | nullno
CatalogPreviewPresentation.strengthstring | nullno
CatalogPreviewPresentation.unit_countinteger | nullno
CatalogPreviewPresentation.package_descriptionstring | nullno
CatalogPreviewPresentation.ggremarray<string>yes
CatalogPreviewPresentation.eansarray<string>yes
CatalogPreviewPresentation.matches_identifierbooleanyes
CatalogVariant.idstring (uuid)yes
CatalogVariant.dosage_formstring | nullno
CatalogVariant.evidencearray<Evidence>yes
CatalogVariant.ingredientsarray<CatalogIngredient>yes
CatalogVariant.presentationsarray<CatalogPresentation>yes
CategoryDetail.idstring (uuid)yes
CategoryDetail.vocabulary_namestringyes
CategoryDetail.codestring | nullno
CategoryDetail.namestringyes
CategoryDetail.evidencearray<Evidence>yes
CompanyDetail.idstring (uuid)yes
CompanyDetail.official_namestringyes
CompanyDetail.registry_identifierstring | nullno
CompanyDetail.evidencearray<Evidence>yes
Evidence.classstringyes
Evidence.sourcestring | nullno
Evidence.datasetstring | nullno
Evidence.retrieved_atstring (date-time) | nullno
Evidence.source_versionstring | nullno
Evidence.source_record_idstring | nullno
Evidence.source_run_idstring | nullno
Evidence.attributestring | nullno
Evidence.rule_versionstring | nullno
HTTPValidationError.detailarray<ValidationError>no
IdentifierCandidate.product_idstring (uuid)yes
IdentifierCandidate.product_namestringyes
IdentifierCandidate.variant_idstring (uuid) | nullno
IdentifierCandidate.dosage_formstring | nullno
IdentifierCandidate.presentation_idstring (uuid) | nullno
IdentifierCandidate.strengthstring | nullno
IdentifierCandidate.package_descriptionstring | nullno
IdentifierCandidate.evidencearray<Evidence>yes
IdentifierLookup.statusstring: matched, ambiguous, unresolvedyes
IdentifierLookup.schemestring: EAN, CMED_GGREM, CMED_REGISTROyes
IdentifierLookup.valuestringyes
IdentifierLookup.candidatesarray<IdentifierCandidate>yes
IdentifierLookup.reasonstring: no_exact_match, multiple_exact_matches | nullno
MedicationDetail.idstring (uuid)yes
MedicationDetail.product_namestringyes
MedicationDetail.brand_namestring | nullno
MedicationDetail.dosage_formstring | nullno
MedicationDetail.active_ingredient_textstring | nullno
MedicationDetail.evidencearray<Evidence>yes
MedicationDetail.catalog_contextCatalogContext | nullno
MedicationDetail.identity_previewCatalogPreview | nullno
MedicationDetail.product_idstring (uuid)yes
MedicationDetail.presentationsarray<PresentationDetail>yes
MedicationDetail.registrationsarray<RegistrationDetail>yes
MedicationDetail.companiesarray<CompanyDetail>yes
MedicationDetail.categoriesarray<CategoryDetail>yes
MedicationPage.dataarray<MedicationSummary>yes
MedicationPage.next_cursorstring | nullyes
MedicationSummary.idstring (uuid)yes
MedicationSummary.product_namestringyes
MedicationSummary.brand_namestring | nullno
MedicationSummary.dosage_formstring | nullno
MedicationSummary.active_ingredient_textstring | nullno
MedicationSummary.evidencearray<Evidence>yes
MedicationSummary.catalog_contextCatalogContext | nullno
MedicationSummary.identity_previewCatalogPreview | nullno
PresentationDetail.idstring (uuid)yes
PresentationDetail.strengthstring | nullno
PresentationDetail.package_descriptionstring | nullno
PresentationDetail.evidencearray<Evidence>yes
Problem.typestringyes
Problem.titlestringyes
Problem.statusintegeryes
Problem.codestringyes
Problem.detailstring | nullno
Problem.request_idstringyes
RegistrationDetail.idstring (uuid)yes
RegistrationDetail.authoritystringyes
RegistrationDetail.registration_numberstringyes
RegistrationDetail.statusstring | nullno
RegistrationDetail.valid_fromstring (date) | nullno
RegistrationDetail.valid_tostring (date) | nullno
RegistrationDetail.valid_to_monthstring | nullno
RegistrationDetail.evidencearray<Evidence>yes
SupportedSourceIdentifier.valuestringyes
SupportedSourceIdentifier.evidencearray<Evidence>yes
SupportedSourceIdentifier.schemestring: CMED_REGISTRO, CMED_CNPJ, CMED_GGREM, EANyes
SupportedSourceValue.valuestringyes
SupportedSourceValue.evidencearray<Evidence>yes
ValidationError.locarray<string | integer>yes
ValidationError.msgstringyes
ValidationError.typestringyes
ValidationError.inputobjectno
ValidationError.ctxobjectno