# RxNav API

> Returns RxNorm drug concepts, spelling suggestions, approximate matches, related concepts and drug classes from the US NLM.

Category: Government & Open Data. Region: US. 8 endpoints at `https://api.hoshime.com/v1/rxnav/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/rxnav
## GET /v1/rxnav/drugs

RxNorm concepts (ingredients, brands, dose forms) for a drug name.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Drug name, such as aspirin. (e.g. aspirin) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `name` (string), `rxcui` (string), `tty` (string)

```bash
curl "https://api.hoshime.com/v1/rxnav/drugs?name=aspirin" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/rxnav/concept

One RxNorm concept by its RxCUI.

Scope: `social:read` · Units: 1 · Cached: 1440 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `rxcui` | string | yes | RxNorm concept id, such as 1191 (aspirin). (e.g. 1191) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `name` (string), `rxcui` (string), `tty` (string)

```bash
curl "https://api.hoshime.com/v1/rxnav/concept?rxcui=1191" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/rxnav/spelling

Drug names RxNav suggests for a misspelled name.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes | Drug name, such as aspirin. (e.g. aspirim) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `text` (string)

```bash
curl "https://api.hoshime.com/v1/rxnav/spelling?name=aspirim" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/rxnav/approximate

RxNorm concepts that approximately match a drug term, with a score per candidate.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Drug name, possibly misspelled, such as asprin. (e.g. asprin) |
| `limit` | integer | no | Items per page, 1 to 20. (default 10) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `rank` (integer (int64)), `rxcui` (string), `score` (number (double)), `source` (string)

```bash
curl "https://api.hoshime.com/v1/rxnav/approximate?query=asprin" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/rxnav/related

Every RxNorm concept related to one concept, such as its brand names, ingredients and dose forms.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `rxcui` | string | yes | RxNorm concept id, such as 1191 for aspirin. (e.g. 1191) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `name` (string), `rxcui` (string), `tty` (string)

```bash
curl "https://api.hoshime.com/v1/rxnav/related?rxcui=1191" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/rxnav/classes

Drug classes of one RxNorm drug concept, such as the VA class or the ATC class.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `rxcui` | string | yes | RxNorm concept id, such as 1191 for aspirin. (e.g. 1191) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `classId` (string), `className` (string), `classType` (string)

```bash
curl "https://api.hoshime.com/v1/rxnav/classes?rxcui=1191" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/rxnav/classMembers

Drugs that belong to one drug class, such as an ATC or VA class, by the class id.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `classId` | string | yes | Class id in its classification, such as N02BE for the ATC class of analgesics and antipyretics. (e.g. N02BE) |
| `relaSource` | string | yes | Classification the id belongs to: ATC, MESH, VA or EPC. (e.g. ATC) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `name` (string), `rxcui` (string), `tty` (string)

```bash
curl "https://api.hoshime.com/v1/rxnav/classMembers?classId=N02BE&relaSource=ATC" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/rxnav/ndcs

National Drug Codes that RxNorm lists for one concept, such as a drug package.

Scope: `social:read` · Units: 1 · Cached: 1440 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `rxcui` | string | yes | RxNorm concept id, such as 314076 for lisinopril 10 mg tablet. (e.g. 314076) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `code` (string)

```bash
curl "https://api.hoshime.com/v1/rxnav/ndcs?rxcui=314076" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
