IaBulaAPI
Menu
API V1Português
Browse documentation
Interactive Swagger / FastAPI
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 normalized literal substring of the official name, ignoring case and accents. substance and laboratory search CMED source text; strength matches the normalized expression exactly without unit conversion. Search returns a list of records; it does not declare that the query identifies one unique variant. %, _ and ! are separators in normalized search, never wildcards. Symbol-only queries are rejected.

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
substancequerynostring; minLength=1, maxLength=256 | null
laboratoryquerynostring; minLength=1, maxLength=256 | null
strengthquerynostring; minLength=1, maxLength=100 | 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.strengthstring | nullno
CatalogPresentation.package_descriptionstring | nullno
CatalogPresentation.structured_strengthStructuredStrength | nullno
CatalogPresentation.package_contentPackageContent | nullno
CatalogPresentation.idstring (uuid)yes
CatalogPresentation.unit_countinteger | 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.strengthstring | nullno
CatalogPreviewPresentation.package_descriptionstring | nullno
CatalogPreviewPresentation.structured_strengthStructuredStrength | nullno
CatalogPreviewPresentation.package_contentPackageContent | nullno
CatalogPreviewPresentation.idstring (uuid)yes
CatalogPreviewPresentation.variant_idstring (uuid)yes
CatalogPreviewPresentation.dosage_formstring | nullno
CatalogPreviewPresentation.unit_countinteger | 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.attributestring | nullno
HTTPValidationError.detailarray<ValidationError>no
IdentifierCandidate.strengthstring | nullno
IdentifierCandidate.package_descriptionstring | nullno
IdentifierCandidate.structured_strengthStructuredStrength | nullno
IdentifierCandidate.package_contentPackageContent | nullno
IdentifierCandidate.product_idstring (uuid)yes
IdentifierCandidate.product_namestringyes
IdentifierCandidate.variant_idstring (uuid) | nullno
IdentifierCandidate.dosage_formstring | nullno
IdentifierCandidate.presentation_idstring (uuid) | nullno
IdentifierCandidate.evidencearray<Evidence>yes
IdentifierLookup.format_statusstring: checksum_valid, checksum_invalid, invalid_format, not_checked; default=not_checkedno
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
PackageContent.amountstringyes
PackageContent.unitstringyes
PackageContent.classstring: DERIVEDyes
PresentationDetail.strengthstring | nullno
PresentationDetail.package_descriptionstring | nullno
PresentationDetail.structured_strengthStructuredStrength | nullno
PresentationDetail.package_contentPackageContent | nullno
PresentationDetail.idstring (uuid)yes
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
StrengthComponent.amountstringyes
StrengthComponent.unitstringyes
StrengthComponent.per_amountstring | nullyes
StrengthComponent.per_unitstring | nullyes
StructuredStrength.statusstring: structured, missing, unparsedyes
StructuredStrength.componentsarray<StrengthComponent>yes
StructuredStrength.classstring: DERIVEDyes
SupportedSourceIdentifier.valuestringyes
SupportedSourceIdentifier.evidencearray<Evidence>yes
SupportedSourceIdentifier.format_statusstring: checksum_valid, checksum_invalid, invalid_format, not_checked; default=not_checkedno
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