GoodRx API endpoint
Lists the drugs GoodRx files under one letter of its A-Z directory, chosen with the required `letter` (`a` to `z`). Each drug has its name, price-page `slug`, GoodRx URL and drug-information URL. If GoodRx is unreachable, a retained copy up to about a day old is returned and flagged with an `X-Availability-Mode: stale` header.
/goodrx/drugsQuery parameters:
letter (required): one of a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z.Returns every drug GoodRx lists under the letter, with the price-page slug (for /api/v1/goodrx/drug-prices) and the drug-information URL.
Recent results are reused: a verified response is served for up to 30 minutes, and GoodRx refuses automated traffic for an hour or more at times. When every live attempt is refused, the last verified response (at most about a day old) is returned instead of an error, with X-Availability-Mode: stale and its age in X-Availability-Last-Success-Age-Seconds. Check those headers to tell a retained copy from a live one. A response returned as stale is billed 1 credit instead of the endpoint's full price.
| Field | Filled in, of 611 checked | Values in the sample |
|---|---|---|
| name | 500 | “A-Hydrocort” and 436 other values |
| slug | 500 | |
| url | 500 | goodrx.com |
| info_url | 436 | goodrx.com |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| letter | string | Yes | Directory letter Allowed values: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z. | a | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/goodrx/drugs?letter=a" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 0,
"message": "success",
"data": {
"letter": "a",
"drugs": [
{
"name": "Abacavir",
"slug": "abacavir",
"url": "https://www.goodrx.com/abacavir",
"info_url": "https://www.goodrx.com/abacavir/what-is"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/goodrx.drugsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| data | goodrx.DrugsResponse | No | ||||
| data.drugs | array | No | DrugLink record, 6 fields: description, info_url, lowest_price, name, slug, url. Described under GoodRx drug class API. | |||
| data.letter | string | No |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/goodrx/drugs?letter=a" \
-H "x-api-key: $CRAWLORA_API_KEY"