# Search LiverTox

Search and read LiverTox records through the Assyro API: drug-induced liver injury: each drug, herbal or supplement chapter with its likelihood score, injury…

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

`GET https://api.assyro.com/v1/sources/livertox/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 LiverTox records from your own code: drug-induced liver injury: each drug, herbal or supplement chapter with its likelihood score, injury pattern, latency, mechanism, management, case reports and last-update date. Published by National Institute of Diabetes and Digestive and Kidney Diseases (NIH) ([www.ncbi.nlm.nih.gov/books/NBK547852](https://www.ncbi.nlm.nih.gov/books/NBK547852/)); 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: "LiverTox: Clinical and Research Information on Drug-Induced Liver Injury. Bethesda (MD): National Institute of Diabetes and Digestive and Kidney Diseases; 2012-. Chapter last updated on the date in `version`." See the [terms](https://www.ncbi.nlm.nih.gov/books/about/copyright/).

Example: "How likely is amiodarone to cause clinically apparent liver injury, and what pattern does it take?"

## Search

`GET https://api.assyro.com/v1/sources/livertox/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 class name, or words about the injury, e.g. "amiodarone", "green tea extract" or "cholestatic hepatitis checkpoint inhibitors". Quoted phrases and OR work. |
| `kind` | string[] | no | Keep only "scored" chapters (an agent with a likelihood score) or "unscored" ones (mostly drug-class overviews). One of: `scored`, `unscored`. |
| `limit` | integer | no | Chapters 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/livertox/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/livertox/search?query=amiodarone"
```

Python:

```python
import requests

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

JavaScript:

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