# EMA Medicines Scraper 💊 (`shahidirfan/ema-medicines-scraper`) Actor

Scrape European Medicines Agency data for drug approvals, clinical trials & pharmaceutical information. Extract EMA medicines, regulatory documents & authorization data at scale. Perfect for pharma research & compliance.

- **URL**: https://apify.com/shahidirfan/ema-medicines-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Agents, Automation, Developer tools
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## European Medicines Agency Medicines Scraper

Extract comprehensive data from the European Medicines Agency (EMA) with ease. Collect critical information about human and veterinary medicines, including authorization status, therapeutic areas, marketing dates, and official URLs. Perfect for regulatory research, compliance monitoring, and healthcare market intelligence.

***

### Features

- **Comprehensive coverage** — Extract records for both human and veterinary medicines published by the EMA.
- **Targeted extraction** — Filter medicines by names, INN/common names, status, or specific therapeutic keywords.
- **Flexible input options** — Support for direct search URLs, specific medicine detail pages, or direct JSON report URLs.
- **Run size control** — Define maximum results and page limits to manage resources and speed.

***

### Use Cases

#### Regulatory Compliance

Track and monitor authorization statuses, updates, and regulatory timelines directly from the official source. Ensure your compliance database is always up-to-date with current EMA listings.

#### Market Intelligence

Analyze authorized and suspended medicines to understand market trends and competitive landscapes. Identify potential therapeutic gaps and portfolio opportunities for your organization.

#### Clinical Research

Gather structured data on common names, therapeutic areas (MeSH), and product details for academic or clinical research. Simplify data collation for scientific reports and meta-analyses.

#### Healthcare Analytics

Feed downstream business intelligence dashboards and databases with clean, structured CSV or JSON records. Enable automated alerts for medicine status changes or new approvals.

***

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `url` | String | No | `—` | Optional EMA search URL, medicine detail URL, or JSON report URL to start scraping. |
| `keyword` | String | No | `—` | Optional keyword filter to target specific medicines or therapeutic terms. |
| `results_wanted` | Integer | No | `20` | Maximum number of medicine records to extract. |
| `max_pages` | Integer | No | `5` | Cap on the number of search pages to parse (20 records per page). |
| `proxyConfiguration` | Object | No | `—` | Proxy settings for running in restricted network environments. |

***

### Output Data

Each item in the dataset contains:

| Field | Type | Description |
|-------|------|-------------|
| `name_of_medicine` | String | Official name of the medicine. |
| `category` | String | Medicine category (e.g., Human or Veterinary). |
| `medicine_status` | String | Current authorization status of the medicine. |
| `international_non_proprietary_name_common_name` | String | International Nonproprietary Name (INN) or common name. |
| `therapeutic_area_mesh` | String | Therapeutic area classified by MeSH terms. |
| `marketing_authorisation_date` | String | Date the marketing authorization was granted. |
| `last_updated_date` | String | Date the medicine record was last updated by the EMA. |
| `ema_product_number` | String | Unique product identification number assigned by the EMA. |
| `medicine_url` | String | Link to the official EMA medicine detail page. |

***

### Usage Examples

#### Basic Run

Run with defaults to fetch the latest records matching the default keyword:

```json
{
    "results_wanted": 20
}
```

#### Keyword Search

Target a specific therapeutic area or medical condition:

```json
{
    "keyword": "oncology",
    "results_wanted": 50,
    "max_pages": 5
}
```

#### Custom Search URL

Extract records matching a pre-filtered search query on the EMA website:

```json
{
    "url": "https://www.ema.europa.eu/en/search?search_api_fulltext=vaccine",
    "results_wanted": 30
}
```

***

### Sample Output

```json
{
    "category": "Human",
    "name_of_medicine": "Nuwiq",
    "ema_product_number": "EMEA/H/C/002813",
    "medicine_status": "Authorised",
    "international_non_proprietary_name_common_name": "simoctocog alfa",
    "therapeutic_area_mesh": "Hemophilia A",
    "marketing_authorisation_date": "22/07/2014",
    "last_updated_date": "21/05/2026",
    "medicine_url": "https://www.ema.europa.eu/en/medicines/human/EPAR/nuwiq"
}
```

***

### Tips for Best Results

#### Start with Low Volume

Test your configuration with a small run of 10-20 results first. Once you verify the output meets your requirements, scale up the limits.

#### Use Specific Keywords

Reduce extraction time and data volume by specifying precise medicine names or therapeutic terms in the keyword input.

#### Use Search URLs for Advanced Filtering

Perform your complex filtering directly on the official EMA website and copy the resulting search URL as input to target exactly what you need.

***

### Proxy Configuration

For reliable results, residential proxies are recommended:

```json
{
    "proxyConfiguration": {
        "useApifyProxy": true
    }
}
```

***

### Integrations

Connect your data with:

- **Google Sheets** — Export medicine data directly to active sheets
- **Airtable** — Build searchable relational drug databases
- **Zapier** — Automate alerts when medicine status changes
- **Make** — Sync results into custom reporting workflows
- **Webhooks** — Send real-time updates to your API endpoints

#### Export Formats

- **JSON** — For developers and system integrations
- **CSV** — For spreadsheet calculations and analytics
- **Excel** — For sharing reports with stakeholders
- **XML** — For legacy data management systems

***

### Frequently Asked Questions

#### How many medicine records can I extract?

You can extract all matching records available on the portal. Set `results_wanted` and `max_pages` to a high number to run comprehensive downloads.

#### Can I extract details for a single medicine?

Yes, simply input the official EMA page URL of that specific medicine into the URL parameter.

#### Why are some fields empty in the output?

Some fields might be blank if the information is not provided or not applicable to that specific medicine category.

#### Are veterinary medicines included?

Yes. The scraper collects both human and veterinary records depending on your keywords or filter URL.

#### Can I automate updates?

Yes. You can schedule regular runs of this actor on the Apify platform and export the new datasets automatically.

***

### Support

For issues or feature requests, contact support through the Apify Console.

#### Resources

- [Apify Documentation](https://docs.apify.com/)
- [API Reference](https://docs.apify.com/api/v2)

***

### Legal Notice

This actor is designed for legitimate data collection purposes. Users are responsible for ensuring compliance with website terms of service and applicable laws. Use data responsibly and respect rate limits.

# Actor input Schema

## `url` (type: `string`):

Optional EMA URL. Supports search URLs, medicine detail URLs, or the JSON report URL.

## `keyword` (type: `string`):

Optional text filter. If provided, this takes priority over keyword values parsed from URL.

## `results_wanted` (type: `integer`):

Maximum number of records to return.

## `max_pages` (type: `integer`):

Page cap for result slicing (20 records per page).

## `proxyConfiguration` (type: `object`):

Apify proxy settings.

## Actor input object example

```json
{
  "url": "https://www.ema.europa.eu/en/search?search_api_fulltext=nuwiq",
  "keyword": "nuwiq",
  "results_wanted": 20,
  "max_pages": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (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 = {
    "url": "https://www.ema.europa.eu/en/search?search_api_fulltext=nuwiq",
    "keyword": "nuwiq",
    "results_wanted": 20,
    "max_pages": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/ema-medicines-scraper").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 = {
    "url": "https://www.ema.europa.eu/en/search?search_api_fulltext=nuwiq",
    "keyword": "nuwiq",
    "results_wanted": 20,
    "max_pages": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/ema-medicines-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "url": "https://www.ema.europa.eu/en/search?search_api_fulltext=nuwiq",
  "keyword": "nuwiq",
  "results_wanted": 20,
  "max_pages": 5
}' |
apify call shahidirfan/ema-medicines-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=shahidirfan/ema-medicines-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sdpI4yFwnR6XY2P0e/builds/DAy0O3hR4WKIqX3Ic/openapi.json
