IaBulaDocs API V1Português
Browse documentation
Get started

Get started with the IaBula API

.md

Create your account, configure an API key and search medications using cURL, JavaScript and Python examples.

On this page

1. Choose your access channel#

For direct access, create an account and use the Customer Portal's API key controls. On RapidAPI, open the IaBula listing, select a plan and use the marketplace's native authentication. Do not submit your key to this documentation.

2. Configure your environment#

Set IABULA_API_BASE to https://api.iabula.com for the published service. Configure IABULA_API_KEY in your server's secret manager or environment. The examples assume you already have a valid key; they do not include credentials.

bash
export IABULA_API_BASE="https://api.iabula.com"

3. Make your first search#

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'
javascript
// Run on your server. Keep the API key out of browser bundles.
const url = new URL("/v1/medications/search", process.env.IABULA_API_BASE);
url.search = new URLSearchParams({ q: "dipirona", limit: "20" });
const response = await fetch(url, {
  headers: { "X-API-Key": process.env.IABULA_API_KEY },
});
const page = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${page.code}`);
console.log(page.data, page.next_cursor);
python
import json
import os
from urllib.parse import urlencode
from urllib.request import Request, urlopen

base = os.environ["IABULA_API_BASE"].rstrip("/")
query = urlencode({"q": "dipirona", "limit": 20})
request = Request(
    f"{base}/v1/medications/search?{query}",
    headers={"X-API-Key": os.environ["IABULA_API_KEY"]},
)
with urlopen(request, timeout=15) as response:
    page = json.load(response)
print(page["data"], page["next_cursor"])

The response is a page with data and next_cursor. data contains MedicationSummary records; a search without matches may return an empty list. Continue by passing next_cursor as cursor with the original filters.

4. Inspect and integrate#

In the Playground, sign in with an active, email-verified account. Requests use the session and linked account access with the plan's limits; the default mode does not require pasting a key. Outside the Playground, use X-API-Key for direct integrations or native RapidAPI credentials.

Before integrating, decide how to handle empty lists, null fields, cursors and 429 responses. Bound your retries and honor Retry-After. Read provenance before assigning regulatory meaning to a field.