# Search Health Canada Drug Product Database

Search and read Health Canada Drug Product Database records through the Assyro API: drugs authorized in Canada (DIN, status, ingredients, schedule, ATC)…

Source: https://www.assyro.com/docs/sources/health-canada-drugs

`GET https://api.assyro.com/v1/sources/health-canada-drugs/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 Health Canada Drug Product Database records from your own code: drugs authorized in Canada (DIN, status, ingredients, schedule, ATC), cited by DIN or drug code. Published by Health Canada ([health-products.canada.ca/dpd-bdpp](https://health-products.canada.ca/dpd-bdpp/)); answered from Assyro's copy, refreshed daily 13:20 UTC.

> **Warning:** Attribution required: every record carries `attribution`. Show it wherever you show the data: "Contains information licensed under the Open Government Licence – Canada." See the [terms](https://open.canada.ca/en/open-government-licence-canada).

Example: "What product has DIN 02471469?"

## Search

`GET https://api.assyro.com/v1/sources/health-canada-drugs/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 brand name ("ozempic"), an active ingredient ("semaglutide") or an 8-digit DIN ("02471469"). Matches part of a name. |
| `searchBy` | string | no | auto (default): DIN if 8 digits, else brand then ingredient. Or force brand, ingredient or din. One of: `auto`, `brand`, `ingredient`, `din`. |
| `status` | string | no | Only products with this current status. With an ingredient search the status is checked product by product, at most 20 from the offset, and offset counts ingredient matches rather than filtered results. One of: `approved`, `marketed`, `cancelled_pre_market`, `cancelled_post_market`, `dormant`, `cancelled_unreturned_annual`, `cancelled_safety_issue`, `authorized_by_interim_order`, `interim_order_revoked`, `restricted_access`, `interim_order_expired`, `cancelled_transitioned_to_biocides`. |
| `limit` | integer | no | Products to return, default 8. |
| `offset` | integer | no | Skip this many products (for paging), default 0. |

Each result is a record; read one in full with [Get a record](https://www.assyro.com/docs/sources/health-canada-drugs/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/health-canada-drugs/search?query=02471469&searchBy=din"
```

Python:

```python
import requests

response = requests.get(
    "https://api.assyro.com/v1/sources/health-canada-drugs/search",
    params={
        "query": "02471469",
        "searchBy": "din"
    },
)
response.raise_for_status()
print(response.json())
```

JavaScript:

```javascript
const response = await fetch("https://api.assyro.com/v1/sources/health-canada-drugs/search?query=02471469&searchBy=din");
const result = await response.json();
```
