# Search LactMed

Search and read LactMed records through the Assyro API: drugs, herbals and other exposures during breastfeeding: each record's summary of use during…

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

`GET https://api.assyro.com/v1/sources/lactmed/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 LactMed records from your own code: drugs, herbals and other exposures during breastfeeding: each record's summary of use during lactation, drug levels in milk and infant blood, effects in breastfed infants and on lactation, alternate drugs and revision date. Published by National Institute of Child Health and Human Development (NIH) ([www.ncbi.nlm.nih.gov/books/NBK501922](https://www.ncbi.nlm.nih.gov/books/NBK501922/)); answered from Assyro's copy, refreshed weekly Monday 05:10 UTC.

> **Warning:** Attribution required: every record carries `attribution`. Show it wherever you show the data: "Drugs and Lactation Database (LactMed®). Bethesda (MD): National Institute of Child Health and Human Development; 2006-. Record revised on the date in `version`. LactMed is a registered trademark of the U.S. Department of Health and Human Services." See the [terms](https://www.ncbi.nlm.nih.gov/books/about/copyright/).

Example: "Is sertraline compatible with breastfeeding, and how much reaches the infant through milk?"

## Search

`GET https://api.assyro.com/v1/sources/lactmed/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 | A drug, herbal or product name, or words about lactation, e.g. "sertraline", "Tylenol", "fenugreek" or "milk supply galactagogue". Quoted phrases and OR work. |
| `limit` | integer | no | Records to return, default 6. |
| `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/lactmed/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/lactmed/search?query=sertraline"
```

Python:

```python
import requests

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

JavaScript:

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