# Search EMA

Search and read EMA records through the Assyro API: EU medicines, EPARs, EMA guidelines, orphan designations, PIPs, PSUSAs, shortages and DHPCs.

Source: https://www.assyro.com/docs/sources/ema

`GET https://api.assyro.com/v1/sources/ema/search`

> **Note:** Preview: `api.assyro.com` is not serving production data yet. This page follows the API's published description and may change before launch.

Search and read EMA records from your own code: EU medicines, EPARs, EMA guidelines, orphan designations, PIPs, PSUSAs, shortages and DHPCs. Published by European Medicines Agency ([www.ema.europa.eu/en/medicines](https://www.ema.europa.eu/en/medicines)); answered from Assyro's copy, refreshed 05:30 and 17:30 UTC.

> **Warning:** Attribution required: every record carries `attribution`. Show it wherever you show the data: "Source: European Medicines Agency (www.ema.europa.eu)." See the [terms](https://www.ema.europa.eu/en/about-us/legal-notice).

Example: "Is lecanemab (Leqembi) authorised in the EU?"

## Search

`GET https://api.assyro.com/v1/sources/ema/search` with any of these query parameters. Repeat a parameter for a list (`?phase=PHASE2&phase=PHASE3`). An unknown parameter is refused by name.

### Search parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Words to find in the title, facts and text, e.g. "natalizumab", "bioequivalence guideline", "Ozempic shortage". "quoted phrases", OR and -exclusions work. |
| `collections` | string[] | no | Keep only these collections (any of them). Omit to search all. One of: `medicines`, `epar-documents`, `guidelines`, `guidance-pages`, `orphan-designations`, `pips`, `psusas`, `shortages`, `dhpcs`. |
| `dateFrom` | string | no | Earliest record date, YYYY, YYYY-MM or YYYY-MM-DD (inclusive). The date is the authorisation date for a medicine, the designation or decision date for orphans and PIPs, and the first-published date otherwise. Records without a date are left out when a date bound is given. |
| `dateTo` | string | no | Latest record date, YYYY, YYYY-MM or YYYY-MM-DD (inclusive: "2024" means through 2024-12-31). |
| `sort` | string | no | 'relevance' (default) or 'newest' for the most recently published first. One of: `relevance`, `newest`. |
| `limit` | integer | no | Records to return, default 8. |
| `offset` | integer | no | Skip this many results (for paging), default 0. |

Each result is a record; read one in full with [Get a record](https://www.assyro.com/docs/sources/ema/records).

## What a record holds

- `id`, `title`, `url`: the source's identifier, its title and its page at the source, to verify it.
- `authority`, `publishedDate`, `version`: who published it, when, and the edition read.
- `snippet` and `fields`: the matching text and the source's own fields.
- `asOf`: the day Assyro's copy of the source was read.
- `attribution`: the attribution the licence requires.

## Example request

curl:

```bash
curl "https://api.assyro.com/v1/sources/ema/search?query=Leqembi"
```

Python:

```python
import requests

response = requests.get(
    "https://api.assyro.com/v1/sources/ema/search",
    params={
        "query": "Leqembi"
    },
)
response.raise_for_status()
print(response.json())
```

JavaScript:

```javascript
const response = await fetch("https://api.assyro.com/v1/sources/ema/search?query=Leqembi");
const result = await response.json();
```
