GoodRx API endpoint
Returns one GoodRx health question with its short answer, supporting paragraphs, the source article, the drug it is about, more questions about that drug, related articles, and related medications. Use a slug from /goodrx/answers.
/goodrx/answerQuery parameters:
slug (required): question slug from /api/v1/goodrx/answers (for example is-viagra-available-over-the-counter).Returns the question, the short answer, supporting paragraphs, the source_url of the GoodRx article the answer comes from, the drug it is about (name, slug, info_url), more_questions about that drug, related articles, and related_drugs (price-page slugs). Unknown questions return 404.
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 4 checked | Values in the sample |
|---|---|---|
| title | 4 | “Best ED Medications: Viagra vs. Cialis vs. Other Popular Op…” and 3 other values |
| url | 4 | goodrx.com |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| slug | string | Yes | Question slug from /goodrx/answers | is-viagra-available-over-the-counter | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/goodrx/answer?slug=is-viagra-available-over-the-counter" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 0,
"message": "success",
"data": {
"slug": "is-viagra-available-over-the-counter",
"url": "https://www.goodrx.com/answers/is-viagra-available-over-the-counter",
"question": "Is Viagra available over the counter?",
"answer": "No, Viagra (sildenafil) is not available over the counter.",
"paragraphs": [
"You will need a prescription from a licensed healthcare professional to get Viagra or its generic form, sildenafil."
],
"drug": {
"name": "Sildenafil",
"slug": "sildenafil",
"info_url": "https://www.goodrx.com/sildenafil/what-is"
},
"more_questions": [
{
"question": "Is Viagra safe?",
"slug": "is-viagra-safe",
"url": "https://www.goodrx.com/answers/is-viagra-safe"
}
],
"related_drugs": [
{
"name": "Cialis",
"slug": "cialis",
"url": "https://www.goodrx.com/cialis"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/goodrx.answerResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| data | goodrx.AnswerResponse | No | ||||
| data.answer | string | No | ||||
| data.articles | array | No | ||||
| data.articles[].title | string | No | ||||
| data.articles[].url | string | No | ||||
| data.drug | goodrx.AnswerDrug | No | ||||
| data.drug.info_url | string | No | ||||
| data.drug.name | string | No | ||||
| data.drug.slug | string | No | ||||
| data.more_questions | array | No | ||||
| data.more_questions[].drug | string | No | ||||
| data.more_questions[].question | string | No | ||||
| data.more_questions[].slug | string | No | ||||
| data.more_questions[].url | string | No | ||||
| data.paragraphs | array | No | ||||
| data.question | string | No | ||||
| data.related_drugs | array | No | DrugLink record, 6 fields: description, info_url, lowest_price, name, slug, url. Described under GoodRx drug class API. | |||
| data.slug | string | No | ||||
| data.source_url | string | No | ||||
| data.url | string | No |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/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/answer?slug=is-viagra-available-over-the-counter" \
-H "x-api-key: $CRAWLORA_API_KEY"