Skip to main content
POST
/
api
/
goodrx
/
drugs
/
prices
/goodrx/drugs/prices
curl --request POST \
  --url https://api.anysite.io/api/goodrx/drugs/prices \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "drug": "<string>",
  "location": "<string>",
  "count": 2,
  "timeout": 300,
  "form": "tablet",
  "dosage": "20mg",
  "quantity": 30
}
'
[
  {
    "@type": "@goodrx_pharmacy_price",
    "pharmacy_id": "<string>",
    "pharmacy_name": "<string>",
    "pharmacy_image": "<string>",
    "price": 123,
    "retail_price": 123,
    "lowest_price": 123,
    "lowest_price_requires_subscription": false,
    "lowest_price_subscription": "<string>"
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
drug
string
required

Drug slug or a GoodRx drug URL

Minimum string length: 1
Examples:

"atorvastatin"

"https://www.goodrx.com/atorvastatin"

location
string
required

US ZIP code to price the prescription in

Minimum string length: 1
Examples:

"10001"

"90210"

count
integer
required

Max number of pharmacy prices to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500
form
string | null

Drug form (e.g. tablet, capsule)

Example:

"tablet"

dosage
string | null

Drug dosage (e.g. 20mg)

Example:

"20mg"

quantity
integer | null

Number of units to price

Required range: x > 0
Example:

30

Response

Successful Response

@type
string
default:@goodrx_pharmacy_price
pharmacy_id
string | null
pharmacy_name
string | null
pharmacy_image
string | null
price
number | null
retail_price
number | null
lowest_price
number | null
lowest_price_requires_subscription
boolean
default:false
lowest_price_subscription
string | null