# Drug Safety API: FDA label, FAERS, recalls, EMA status (`bosco_labs/drug-safety`) Actor

Drug safety dossier for one drug name as one sourced JSON row: FDA boxed warning and indications, top FAERS adverse reaction counts, US recalls and shortages (openFDA), EU authorisation, EPAR link and EU shortages (EMA). Or one cheaper sub-query. Not medical advice.

- **URL**: https://apify.com/bosco_labs/drug-safety.md
- **Developed by:** [Bosco Labs](https://apify.com/bosco_labs) (community)
- **Categories:** AI, Developer tools, Business
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 drug dossiers

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Drug Safety API: FDA label, FAERS, recalls, EMA status

**Answers "is this drug safe, and where does it stand with regulators?" in one call**: the FDA
boxed warning and indications, the most reported FAERS adverse reactions (counts), US recalls
and shortages, and EU authorisation, EPAR link and EU shortages, for one drug name, with a
source link for every section. Built for **AI agents** and people in pharma, health tech,
pharmacy, compliance and investing.

**Pricing (pay per event):** $0.02 per `dossier` (all five sections), or $0.004 per
`drug-query` for one section. Invalid input, unknown drugs, empty answers and partial answers
(a source failed) cost nothing.

Data: [openFDA](https://open.fda.gov) (U.S. Food and Drug Administration) and the
[European Medicines Agency](https://www.ema.europa.eu)'s public data files, read live on every
run. **Not medical advice**: every row carries a `notice` saying so.

### What you get

Real output for `{"drug": "semaglutide", "maxItems": 2}` (2.1 s, run on 2026-11-06):

```json
{
  "query": "semaglutide",
  "mode": "dossier",
  "drug": {
    "generic_name": "SEMAGLUTIDE",
    "matched_as": "generic",
    "search_term": "semaglutide",
    "fda_labels_matching": 5
  },
  "label": {
    "brand_names": [
      "Ozempic"
    ],
    "generic_name": "SEMAGLUTIDE",
    "manufacturer": "A-S Medication Solutions",
    "product_type": "HUMAN PRESCRIPTION DRUG",
    "routes": [
      "SUBCUTANEOUS"
    ],
    "application_number": "NDA209637",
    "pharmacologic_class": [
      "GLP-1 Receptor Agonist [EPC]"
    ],
    "has_boxed_warning": true,
    "boxed_warning": "WARNING: RISK OF THYROID C-CELL TUMORS • In rodents, semaglutide causes dose-dependent and treatment-duration-dependent thyroid C-cell tumors at clinically relevant exposures. It is unknown whether OZEMPIC causes thyroid C-cell tumors, including medullary thyroid carcinoma (MTC), in humans as human relevance of semaglutide-induced rodent thyroid C-cell tumors has not been determined [see Warnings and Precautions ( 5.1 ), Nonclinical Toxicology ( 13.1 )] . • OZEMPIC is contraindicated in patients with a personal or family history of MTC or in patients with Multiple Endocrine Neoplasia syndrome type 2 (MEN 2) [see Contraindications ( 4 )] . Counsel patients regarding the potential risk for MTC with the use of OZEMPIC and inform them of symptoms of thyroid tumors (e.g., a mass in the neck, dysphagia, dyspnea, persistent hoarseness). Routine monitoring of serum calcitonin or using thyroid ultrasound is of uncertain value for early detection of MTC in patients treated with OZEMPIC [see Contraindications ( 4 ), Warnings and Precautions ( 5.1 )] . WARNING: RISK OF THYROID C-CELL TUMORS See full prescribing information for complete boxed warning. • In rodents, semaglutide causes thyroid C-cell tumors. It is unknown whether OZEMPIC causes thyroid C-cell tumors, including medullary thyroid carcinoma (MTC), in humans as the human relevance of semaglutide-induced rodent thyroid C-cell tumors has not been determined ( 5.1 , 13.1 ). • OZEMPIC is contraindicated in patients with [truncated]",
    "indications": "OZEMPIC is indicated: • as an adjunct to diet and exercise to improve glycemic control in adults with type 2 diabetes mellitus. • to reduce the risk of major adverse cardiovascular events (cardiovascular death, non-fatal myocardial infarction or non-fatal stroke) in adults with type 2 diabetes mellitus and established cardiovascular disease. • to reduce the risk of sustained eGFR decline, end-stage kidney disease, and cardiovascular death in adults with type 2 diabetes mellitus and chronic kidney disease. OZEMPIC is a glucagon-like peptide 1 (GLP-1) receptor agonist indicated: • as [truncated]",
    "effective_date": "2026-07-30",
    "labels_matching": 4,
    "set_id": "42bdd912-2393-44c4-b7e0-47672ca28991",
    "label_url": "https://dailymed.nlm.nih.gov/dailymed/lookup.cfm?setid=42bdd912-2393-44c4-b7e0-47672ca28991",
    "source_url": "https://api.fda.gov/drug/label.json?search=openfda.generic_name.exact%3A%22SEMAGLUTIDE%22+AND+openfda.product_type%3A%22HUMAN+PRESCRIPTION+DRUG%22&sort=effective_time%3Adesc&limit=1",
    "provided_by": "Bosco Labs (boscolabs.dev)"
  },
  "adverse_events": {
    "reports_total": 86031,
    "serious_reports": 45165,
    "top_reactions": [
      {
        "reaction": "NAUSEA",
        "report_count": 12276,
        "share_of_reports": 0.1427
      },
      {
        "reaction": "OFF LABEL USE",
        "report_count": 8375,
        "share_of_reports": 0.0973
      }
    ],
    "data_last_updated": "2026-10-28",
    "source_url": "https://api.fda.gov/drug/event.json?search=patient.drug.openfda.generic_name%3A%22semaglutide%22+patient.drug.medicinalproduct%3A%22semaglutide%22&count=patient.reaction.reactionmeddrapt.exact&limit=2",
    "provided_by": "Bosco Labs (boscolabs.dev)"
  },
  "recalls": {
    "total": 57,
    "recalls": [
      {
        "recall_number": "D-0026-2027",
        "classification": "Class II",
        "status": "Ongoing",
        "recall_initiation_date": "2026-09-10",
        "report_date": "2026-10-14",
        "recalling_firm": "Carolina Infusion, LLC",
        "product_description": "SEMAGLUTIDE/CYANOCOBALAMIN 9/2 MG/ML INJECTABLE, Packaged in single-use dosage syringes, total mL dispensed based on dosage per specific patient prescription, Carolina Infusion LLC, 95 Bees Creek Road, Ridgeland, SC 29936",
        "reason_for_recall": "Lack of Assurance of Sterility: Related to formulation using bacteriostic water; Related to processing equipment used in compounded product.",
        "voluntary_mandated": "Voluntary: Firm initiated"
      },
      {
        "recall_number": "D-0019-2027",
        "classification": "Class II",
        "status": "Ongoing",
        "recall_initiation_date": "2026-09-10",
        "report_date": "2026-10-14",
        "recalling_firm": "Carolina Infusion, LLC",
        "product_description": "SEMAGLUTIDE/CYANOCOBALAMIN 3/2 MG/ML INJECTABLE, Packaged in single-use dosage syringes, total mL dispensed based on dosage per specific patient prescription, Carolina Infusion LLC, 95 Bees Creek Road, Ridgeland, SC 29936",
        "reason_for_recall": "Lack of Assurance of Sterility: Related to formulation using bacteriostic water; Related to processing equipment used in compounded product.",
        "voluntary_mandated": "Voluntary: Firm initiated"
      }
    ],
    "data_last_updated": "2026-10-28",
    "source_url": "https://api.fda.gov/drug/enforcement.json?search=openfda.generic_name%3A%22semaglutide%22+product_description%3A%22semaglutide%22&sort=recall_initiation_date%3Adesc&limit=2",
    "provided_by": "Bosco Labs (boscolabs.dev)"
  },
  "shortages": {
    "total_records": 3,
    "by_status": {
      "To Be Discontinued": 3
    },
    "shortages": [
      {
        "presentation": "Rybelsus, Tablet, 3 mg (NDC 0169-4303-30)",
        "generic_name": "Semaglutide Tablet",
        "company_name": "Novo Nordisk, Inc.",
        "status": "To Be Discontinued",
        "availability": null,
        "shortage_reason": null,
        "related_info": "Discontinuation of the manufacture of the drug. These products will be replaced by Ozempic (semaglutide) tablets.",
        "therapeutic_category": [
          "Endocrinology/Metabolism"
        ],
        "initial_posting_date": "2026-06-04",
        "update_date": "2026-06-04",
        "discontinued_date": "2026-06-04"
      },
      {
        "presentation": "Rybelsus, Tablet, 7 mg (NDC 0169-4307-30)",
        "generic_name": "Semaglutide Tablet",
        "company_name": "Novo Nordisk, Inc.",
        "status": "To Be Discontinued",
        "availability": null,
        "shortage_reason": null,
        "related_info": "Discontinuation of the manufacture of the drug. These products will be replaced by Ozempic (semaglutide) tablets.",
        "therapeutic_category": [
          "Endocrinology/Metabolism"
        ],
        "initial_posting_date": "2026-06-04",
        "update_date": "2026-06-04",
        "discontinued_date": "2026-06-04"
      }
    ],
    "data_last_updated": "2026-11-06",
    "source_url": "https://api.fda.gov/drug/shortages.json?search=generic_name%3A%22semaglutide%22+openfda.generic_name%3A%22semaglutide%22&limit=100",
    "provided_by": "Bosco Labs (boscolabs.dev)"
  },
  "eu_status": {
    "authorised_products": 5,
    "products_total": 5,
    "products": [
      {
        "name": "Kayshild",
        "status": "Authorised",
        "active_substance": "semaglutide",
        "marketing_authorisation_holder": "Novo Nordisk A/S",
        "authorisation_date": "2026-03-26",
        "withdrawn_or_expired_date": null,
        "conditional_approval": true,
        "additional_monitoring": true,
        "orphan_medicine": false,
        "generic": false,
        "biosimilar": false,
        "atc_code": "A10BJ06",
        "therapeutic_area": "Non-alcoholic Fatty Liver Disease;Liver Cirrhosis",
        "epar_url": "https://www.ema.europa.eu/en/medicines/human/EPAR/kayshild",
        "last_updated": "2026-04-09"
      },
      {
        "name": "Ozempic",
        "status": "Authorised",
        "active_substance": "semaglutide",
        "marketing_authorisation_holder": "Novo Nordisk A/S",
        "authorisation_date": "2018-02-08",
        "withdrawn_or_expired_date": null,
        "conditional_approval": false,
        "additional_monitoring": false,
        "orphan_medicine": false,
        "generic": false,
        "biosimilar": false,
        "atc_code": "A10BJ06",
        "therapeutic_area": "Diabetes Mellitus",
        "epar_url": "https://www.ema.europa.eu/en/medicines/human/EPAR/ozempic",
        "last_updated": "2026-08-25"
      }
    ],
    "shortages_total": 2,
    "shortages": [
      {
        "medicine_affected": "Ozempic",
        "status": "Shortage resolved",
        "forms_affected": "Pre-filled pen",
        "alternatives_available": true,
        "start_date": null,
        "expected_resolution": null,
        "last_updated": "2026-01-13",
        "shortage_url": "https://www.ema.europa.eu/en/medicines/human/shortages/ozempic"
      },
      {
        "medicine_affected": "Rybelsus",
        "status": "Shortage resolved",
        "forms_affected": "Tablet",
        "alternatives_available": true,
        "start_date": null,
        "expected_resolution": null,
        "last_updated": "2024-01-22",
        "shortage_url": "https://www.ema.europa.eu/en/medicines/human/shortages/rybelsus"
      }
    ],
    "data_timestamp": "2026-11-06T06:01:41Z",
    "shortages_data_timestamp": "2026-11-06T06:05:23Z",
    "source_url": "https://www.ema.europa.eu/en/documents/report/medicines-output-medicines_json-report_en.json",
    "provided_by": "Bosco Labs (boscolabs.dev)",
    "shortages_source_url": "https://www.ema.europa.eu/en/documents/report/shortages-output-json-report_en.json"
  },
  "failed_sections": [],
  "related": {
    "clinical_trials": {
      "actor": "bosco_labs/clinical-trials",
      "input": {
        "intervention": "semaglutide"
      },
      "why": "Trials testing this drug (status, phase, sponsor, read-out dates)."
    }
  },
  "warnings": [],
  "notice": "Not medical advice. Information for research and reference only; do not use it to make decisions about medical care: ask a doctor or pharmacist. FAERS counts are voluntary reports that list the drug (as suspect or concomitant); they do not show how often a reaction happens or that the drug caused it. FDA describes openFDA data as unvalidated. The official FDA label and EMA texts prevail.",
  "attribution": "US data: U.S. Food and Drug Administration (FDA) via openFDA (https://open.fda.gov), public domain (CC0); not endorsed by FDA. EU data: Source: European Medicines Agency (EMA), https://www.ema.europa.eu (medicines and shortages data files), accessed November 2026. EMA is acknowledged as the source of the EU material; EMA does not endorse Bosco Labs. Modified by Bosco Labs: selected fields only, long texts shortened (cut texts end with [truncated]), adverse events as FAERS report counts only.",
  "retrieved_at": "2026-11-06T08:57:10+00:00",
  "schema_version": "1",
  "provided_by": "Bosco Labs (boscolabs.dev)"
}
```

- **One row per call**, about 5-15 KB. Sections you did not ask for are `null`.
- **Every section has its own `source_url`**: the exact openFDA query (re-run it to verify)
  or the EMA data file, plus `label_url` (DailyMed), `epar_url` and `shortage_url` (EMA pages).
- **FAERS as counts only**: `reports_total`, `serious_reports` and the top reactions with
  `report_count` and `share_of_reports`. No individual case reports are fetched or returned.
- **Brand names work**: `Ozempic` resolves to semaglutide for FAERS, recalls, shortages and
  EMA, and the label section shows Ozempic's own label. `drug.matched_as` says how the name
  was matched.
- Dates are ISO 8601; unknown values are `null`; `warnings` says why a section is empty or
  missing. If a source fails (for example EMA not answering), you still get the other
  sections, `failed_sections` names the missing ones, and the run is **not charged**.
- `related.clinical_trials` gives a ready input for the
  [clinical-trials Actor](https://apify.com/bosco_labs/clinical-trials) (trials testing the drug).

A cheaper sub-query returns one section. Real output for
`{"drug": "metformin", "mode": "adverse_events_top", "maxItems": 5}` (1.3 s; `notice` and
`attribution` shortened here):

```json
{
  "query": "metformin",
  "mode": "adverse_events_top",
  "drug": {
    "generic_name": "METFORMIN HYDROCHLORIDE",
    "matched_as": "generic",
    "search_term": "metformin",
    "fda_labels_matching": 351
  },
  "label": null,
  "adverse_events": {
    "reports_total": 467986,
    "serious_reports": 315926,
    "top_reactions": [
      {
        "reaction": "NAUSEA",
        "report_count": 32159,
        "share_of_reports": 0.0687
      },
      {
        "reaction": "DIARRHOEA",
        "report_count": 30140,
        "share_of_reports": 0.0644
      },
      {
        "reaction": "BLOOD GLUCOSE INCREASED",
        "report_count": 29258,
        "share_of_reports": 0.0625
      },
      {
        "reaction": "DRUG INEFFECTIVE",
        "report_count": 24041,
        "share_of_reports": 0.0514
      },
      {
        "reaction": "FATIGUE",
        "report_count": 22778,
        "share_of_reports": 0.0487
      }
    ],
    "data_last_updated": "2026-10-28",
    "source_url": "https://api.fda.gov/drug/event.json?search=patient.drug.openfda.generic_name%3A%22metformin%22+patient.drug.medicinalproduct%3A%22metformin%22&count=patient.reaction.reactionmeddrapt.exact&limit=5",
    "provided_by": "Bosco Labs (boscolabs.dev)"
  },
  "recalls": null,
  "shortages": null,
  "eu_status": null,
  "failed_sections": [],
  "related": {
    "clinical_trials": {
      "actor": "bosco_labs/clinical-trials",
      "input": {
        "intervention": "metformin"
      },
      "why": "Trials testing this drug (status, phase, sponsor, read-out dates)."
    }
  },
  "warnings": [],
  "notice": "Not medical advice. Information for re ...",
  "attribution": "US data: U.S. Food and Drug Administration (FDA) via openFDA ...",
  "retrieved_at": "2026-11-06T08:57:13+00:00",
  "schema_version": "1",
  "provided_by": "Bosco Labs (boscolabs.dev)"
}
```

### Input

```json
{ "drug": "semaglutide" }
```

| Field | Meaning |
|---|---|
| `drug` | Generic name, active ingredient or brand, e.g. `semaglutide`, `metformin`, `Ozempic` (required) |
| `mode` | `dossier` (default, $0.02) or one section for $0.004: `label`, `adverse_events_top`, `recalls`, `shortages`, `eu_status` |
| `maxItems` | Cap on each list (reactions, recalls, shortage records, EU products), default 10, max 50. Totals are always complete |

An unknown or misspelled name fails within seconds, costs nothing, and suggests close names:
`semaglutid` answers *No drug "semaglutid" in FDA labels, FAERS or EMA's medicines list. Did
you mean: semaglutide, oral semaglutide, teduglutide, liraglutide, dulaglutide?*

### Use from an AI agent (MCP)

Agents can call this Actor as a tool through the
[Apify MCP server](https://github.com/apify/apify-mcp-server). Add this server URL to your MCP
client (Claude, Cursor, VS Code, ...):

```text
https://mcp.apify.com?tools=bosco_labs/drug-safety
```

It loads this Actor as a tool, plus the tools that read its results (`get-actor-run`,
`get-dataset-items`). The hosted server signs you in with OAuth, or accepts your Apify token as
`Authorization: Bearer <APIFY_TOKEN>`.

Example prompt: *"Does semaglutide have a boxed warning, what are its most reported adverse
reactions, and is it authorised in the EU? Cite the sources."* The agent passes:

```json
{ "drug": "semaglutide" }
```

**Output for agents:** one row, stable `snake_case` fields, ISO dates, numbers as numbers,
`null` for unknown, a `source_url` per section, and a `notice` to pass on (not medical advice).
The run's status message is a one-line answer, e.g. "semaglutide (semaglutide): boxed warning;
86,031 FAERS reports (top: NAUSEA, OFF LABEL USE); 57 US recalls; ...". Typical run: 1-3
seconds after start-up.

**Cost:** $0.02 per dossier or $0.004 per single-section query, billed to the Apify account the MCP server is signed in with.

### FAQ

**Is this medical advice?** No. It is public regulatory data for research and reference. Do
not use it to decide on treatment; ask a doctor or pharmacist. FDA itself says: "Do not rely on
openFDA to make decisions regarding medical care." The official label and EMA texts prevail.

**What do the FAERS numbers mean?** They count voluntary reports to FDA's Adverse Event
Reporting System that list the drug, as suspect or concomitant drug. A high count does not mean
a reaction is common or that the drug caused it: popular drugs get more reports, and reports
can be duplicated or incomplete. `share_of_reports` is the share of those reports, not an
incidence rate. Reports are matched on the generic name (openFDA's harmonised field) or the
reported product name, so combination products that contain the drug are included.

**Which label is shown?** The newest FDA label (by effective date) for the generic name
(the plain name or its salt form, never a biosimilar's suffixed name such as `adalimumab-ryvk`),
prescription labels first, or the brand's own label when you give a brand name. Repackagers file
their own copies, so `manufacturer` can be a repackager; `labels_matching` says how many labels
matched. The full label is at `label_url` (DailyMed).

**Which recalls are included?** FDA enforcement reports (2004 onwards) whose generic name or
product description names the drug, newest first; this includes compounded products, which is
where most recent semaglutide recalls are. `total` counts all of them.

**What does EU status cover?** Medicines authorised centrally through EMA (one EU-wide
licence), including withdrawn and refused ones, and EMA's shortage catalogue. Medicines
authorised only nationally by EU member states are not in EMA's files, so an older generic can
show `products_total: 0` while it is on sale in the EU.

**How fresh is it?** Live on every run. openFDA updates FAERS and recalls weekly and the
shortage list daily (`data_last_updated`); EMA rebuilds its data files daily (`data_timestamp`).

**What is left out?** Individual FAERS case reports, medical device data (and FDA's licensed
GMDN device nomenclature), full label texts beyond the boxed warning and indications, contact
phone numbers from the shortage list, and EMA documents themselves (follow `epar_url`).

**Why did my run cost nothing?** Unknown names, invalid input, sub-queries that find nothing
(for example `recalls` for a drug that was never recalled) and partial answers (a source did
not answer, see `failed_sections`) are not charged. The row is still saved so you can see the
answer; run again later for a complete, charged one.

### Source and terms

US data from [openFDA](https://open.fda.gov) (U.S. Food and Drug Administration). Under the
[openFDA terms](https://open.fda.gov/terms/) the drug data are public domain under CC0: "You can
copy, modify, distribute, and perform the work, even for commercial purposes, all without
asking permission." Not endorsed by FDA. openFDA's device data carry GMDN nomenclature that
needs a licence from the GMDN Agency; this Actor reads only the drug endpoints, never device
data.

EU data from the European Medicines Agency's public JSON data files
([medicines](https://www.ema.europa.eu/en/documents/report/medicines-output-medicines_json-report_en.json),
[shortages](https://www.ema.europa.eu/en/documents/report/shortages-output-json-report_en.json)).
EMA's [legal notice](https://www.ema.europa.eu/en/about-us/legal-notice) allows reproduction
"for non-commercial and commercial purposes, provided that EMA is always acknowledged as the
source of the material", and "Such acknowledgement must be included in each copy of the
material." Every row therefore carries an `attribution` that names EMA as the source with the
URL and the month and year of access; keep it with any copy. EMA does not endorse Bosco Labs.
Bosco Labs selects fields, shortens long texts (cut texts end with `[truncated]`) and returns
FAERS as counts only.

# Actor input Schema

## `drug` (type: `string`):

One drug: generic name, active ingredient or brand, e.g. "semaglutide", "metformin" or "Ozempic". Case does not matter. Brand names are resolved to the active ingredient for FAERS, recalls, shortages and EMA. An unknown or misspelled name fails in seconds with close names to try (nothing charged). Required.

## `mode` (type: `string`):

"dossier" (default) fills all five sections in one call (one `dossier` event). The other values fill one section only and cost one `drug-query` event: "label", "adverse_events_top", "recalls", "shortages" or "eu_status". Sections not asked for are null. Empty = dossier.

## `maxItems` (type: `integer`):

Cap on each list in the row: top FAERS reactions, recalls (newest first), US shortage records, EU products and EU shortages, e.g. 10. Default 10, maximum 50. Totals are always reported in full. Does not change the price.

## Actor input object example

```json
{
  "drug": "semaglutide",
  "mode": "dossier",
  "maxItems": 5
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "drug": "semaglutide",
    "mode": "dossier",
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("bosco_labs/drug-safety").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "drug": "semaglutide",
    "mode": "dossier",
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("bosco_labs/drug-safety").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "drug": "semaglutide",
  "mode": "dossier",
  "maxItems": 5
}' |
apify call bosco_labs/drug-safety --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bosco_labs/drug-safety"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/1vtDXJcKXda2A3YVq/builds/QT8JS492Bei4xbmdo/openapi.json
