# Search DailyMed

Search and read DailyMed records through the Assyro API: current US drug labels (boxed warning, indications, dosage, warnings, any section by its words)…

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

`GET https://api.assyro.com/v1/sources/dailymed/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 DailyMed records from your own code: current US drug labels (boxed warning, indications, dosage, warnings, any section by its words), cited by set id. Published by U.S. National Library of Medicine (DailyMed) ([dailymed.nlm.nih.gov/dailymed](https://dailymed.nlm.nih.gov/dailymed/)); answered from Assyro's copy, refreshed daily 14:00 UTC.

> **Warning:** Attribution required: every record carries `attribution`. Show it wherever you show the data: "Courtesy of the National Library of Medicine (DailyMed)." See the [terms](https://www.nlm.nih.gov/web_policies.html).

Example: "Get Novo Nordisk's Ozempic label."

## Search

`GET https://api.assyro.com/v1/sources/dailymed/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 | no | A drug name, brand or generic, e.g. "ozempic" or "sacubitril and valsartan". |
| `nameType` | string | no | Match query against brand names, generic names or both (default). One of: `brand`, `generic`, `both`. |
| `labeler` | string | no | Labeler (company) name, or part of it, e.g. "Novo Nordisk". |
| `ndc` | string | no | A product or package NDC with dashes, e.g. "0169-4136". |
| `applicationNumber` | string | no | NDA, ANDA or BLA number, e.g. "NDA209637". |
| `boxedWarning` | boolean | no | true for labels with a boxed warning only, false for labels without one. |
| `publishedAfter` | string | no | Only labels DailyMed published on or after this date, YYYY-MM-DD. |
| `text` | string | no | Words that must all appear in one section of the label text, e.g. "serotonin syndrome" or "renal impairment dose adjustment"; quote a phrase to match it exactly. |
| `sections` | string[] | no | Only with text: search only these label sections (a section includes its subsections). To read named sections of a label, call read_dailymed_label with its setId and sections. |
| `labelType` | string | no | Only human prescription, human OTC, animal or other labels (vaccines, bulk ingredients, ...). One of: `human_prescription`, `human_otc`, `animal`, `other`. |
| `limit` | integer | no | Labels to return, default 8. |
| `offset` | integer | no | Skip this many labels (for paging), default 0. |

Each result is a record; read one in full with [Get a record](https://www.assyro.com/docs/sources/dailymed/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/dailymed/search?query=Ozempic&labeler=Novo+Nordisk"
```

Python:

```python
import requests

response = requests.get(
    "https://api.assyro.com/v1/sources/dailymed/search",
    params={
        "query": "Ozempic",
        "labeler": "Novo Nordisk"
    },
)
response.raise_for_status()
print(response.json())
```

JavaScript:

```javascript
const response = await fetch("https://api.assyro.com/v1/sources/dailymed/search?query=Ozempic&labeler=Novo+Nordisk");
const result = await response.json();
```
