Amazon Pharmacy Product API
Our Amazon Pharmacy Product API allows you to scrape a medication from its Amazon Pharmacy product page and compare its average insurance price, Prime member price, and retail price, including coupon discounts, for each frequency and supply. It also returns the medication's other forms and strengths, its brand or generic counterparts, and the delivery information for a US ZIP code.
The API endpoint is https://serpapi.com/search?engine=amazon_pharmacy_product
Head to the playground for a live and interactive demo.
API parameters
Search query
asin
Required
Parameter defines the Amazon Standard Identification Number (ASIN) of the medication. It contains 10 letters or digits. Use an ASIN from the Amazon Pharmacy API or the returned product_results.variant_combinations to select a medication, form, and strength.
SerpApi parameters
engine
Required
Set parameter to amazon_pharmacy_product to use the Amazon Pharmacy Product API engine.
device
Optional
Parameter defines the device to use to get the results. It can be set to desktop (default) to use a regular browser, tablet to use a tablet browser (currently using iPads), or mobile to use a mobile browser.
no_cache
Optional
Parameter will force SerpApi to fetch the Amazon Pharmacy Product results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.
async
Optional
Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.
zero_trace
Optional
Enterprise only. Parameter enables ZeroTrace mode. It can be set to false (default) or true. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult.
output
Optional
Parameter defines the format of the result. It can be set to json (default) to get a structured JSON of the results, html to get the raw HTML retrieved, or md to get a Markdown-formatted version optimized for LLMs and AI agents.
json_restrictor
Optional
Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
API results
JSON results
JSON output includes structured data for product results, variant combinations, pricing options, generic version, and medication details.
A search status is accessible through search_metadata.status.
It flows this way: Processing -> Success || Error.
If a search has failed, error will contain an error message.
search_metadata.id is the search ID inside SerpApi.
HTML results
HTML output is useful to debug JSON results or support features not yet supported by SerpApi. It gives you the raw HTML results from Amazon Pharmacy Product.
Markdown results
Markdown output is optimized for LLMs and AI agents. It provides a curated view of the JSON results
in a token-efficient format using tables, markdown links, and YAML frontmatter.
To access, use the output=md parameter, the /search.md endpoint, or request header Accept: text/markdown.
API examples
Example results for asin: B08429CF3B
{
"product_results": {
"asin": "B08429CF3B",
"title": "Levothyroxine, 50 MCG Tablet",
"link": "https://pharmacy.amazon.com/dp/B08429CF3B",
"thumbnail": "https://m.media-amazon.com/images/I/11j7V6PVqEL.jpg",
"subtitle": "Generic for Unithroid, Synthroid, and Levoxyl",
"subtitle_links": [
{
"text": "Unithroid",
"asin": "B0846GWT4N",
"link": "https://pharmacy.amazon.com/dp/B0846GWT4N",
"serpapi_link": "https://serpapi.com/search.json?asin=B0846GWT4N&device=desktop&engine=amazon_pharmacy_product&language=en_US"
},
{
"text": "Synthroid",
"asin": "B08462H26B",
"link": "https://pharmacy.amazon.com/dp/B08462H26B",
"serpapi_link": "https://serpapi.com/search.json?asin=B08462H26B&device=desktop&engine=amazon_pharmacy_product&language=en_US"
},
{
"text": "Levoxyl",
"asin": "B0846GGMSS",
"link": "https://pharmacy.amazon.com/dp/B0846GGMSS",
"serpapi_link": "https://serpapi.com/search.json?asin=B0846GGMSS&device=desktop&engine=amazon_pharmacy_product&language=en_US"
}
],
"description": "LEVOTHYROXINE (lee voe thye ROX een) treats low thyroid levels (hypothyroidism) in your body. It works by replacing a thyroid hormone normally made by the body. Thyroid hormones play an important role in your overall health. They help support metabolism and energy levels.",
"badges": [
"Rx required"
],
"form": "TABLET",
"strength": "50 MCG",
"variant_combinations": [
{
"position": 1,
"dimensions": {
"form": "CAPSULE",
"strength": "13 MCG"
},
"asin": "B08T698QT7",
"link": "https://pharmacy.amazon.com/dp/B08T698QT7",
"serpapi_link": "https://serpapi.com/search.json?asin=B08T698QT7&device=desktop&engine=amazon_pharmacy_product&language=en_US"
},
{
"position": 2,
"dimensions": {
"form": "CAPSULE",
"strength": "25 MCG"
},
"asin": "B08SXVGFZY",
"link": "https://pharmacy.amazon.com/dp/B08SXVGFZY",
"serpapi_link": "https://serpapi.com/search.json?asin=B08SXVGFZY&device=desktop&engine=amazon_pharmacy_product&language=en_US"
},
...
]
},
"pricing_options": [
{
"position": 1,
"selected": true,
"frequency": "1 per day",
"supply": "30 days",
"quantity": "30 tablets",
"retail_price": "$13.50",
"extracted_retail_price": 13.5,
"prime_price": "$3.98",
"extracted_prime_price": 3.98,
"insurance_estimate": "$2.00",
"extracted_insurance_estimate": 2.0,
"currency": "USD"
},
{
"position": 2,
"frequency": "1 per day",
"supply": "90 days",
"quantity": "90 tablets",
"retail_price": "$40.50",
"extracted_retail_price": 40.5,
"prime_price": "$9.95",
"extracted_prime_price": 9.95,
"insurance_estimate": "$7.00",
"extracted_insurance_estimate": 7.0,
"currency": "USD"
},
...
],
"medication_details": [
{
"title": "About Levothyroxine",
"text": "LEVOTHYROXINE (lee voe thye ROX een) treats low thyroid levels (hypothyroidism) in your body. It works by replacing a thyroid hormone normally made by the body. Thyroid hormones play an important role in your overall health. They help support metabolism and energy levels."
},
{
"title": "How should you use this medication?",
"text": "Take this medication by mouth with plenty of water. It is best to take on an empty stomach, at least 30 minutes to one hour before breakfast. Avoid taking antacids containing aluminum or magnesium, simethicone, bile acid sequestrants, calcium carbonate, sodium polystyrene sulfonate, ferrous sulfate, sevelamer, lanthanum, or sucralfate within 4 hours of taking this medication. Follow the directions on the prescription label. Take at the same time each day. Do not take your medication more often than directed.\nContact your care team regarding the use of this medication in children. While this medication may be prescribed for children and infants as young as a few days of age for selected conditions, precautions do apply. For infants, you may crush the tablet and place in a small amount of (5 to 10 mL or 1 to 2 teaspoonfuls) of water, breast milk, or non-soy based infant formula. Do not mix with soy-based infant formula. Give as directed."
},
...
],
"medication_details_copyright": "Copyright Elsevier Inc.",
"medication_details_disclaimer": "This is a summary of information about this product. It is not medical advice. Ask your health care professional for complete information about this product and your individual health needs."
}
Example with language: es_US and delivery_zip: 02108
{
"product_results": {
"asin": "B08429CF3B",
"title": "Levotiroxina, 50 MCG Tableta",
"link": "https://pharmacy.amazon.com/dp/B08429CF3B",
"thumbnail": "https://m.media-amazon.com/images/I/11j7V6PVqEL.jpg",
"subtitle": "Genérico de Unithroid, Levoxyl, y Synthroid",
"subtitle_links": [
{
"text": "Unithroid",
"asin": "B0846GWT4N",
"link": "https://pharmacy.amazon.com/dp/B0846GWT4N",
"serpapi_link": "https://serpapi.com/search.json?asin=B0846GWT4N&delivery_zip=02108&device=desktop&engine=amazon_pharmacy_product&language=es_US"
},
...
],
"description": "La LEVOTIROXINA trata los niveles bajos de tiroides (hipotiroidismo) en el cuerpo. Actúa reemplazando una hormona tiroidea que normalmente produce el cuerpo. Las hormonas tiroideas cumplen una función importante en la salud general. Ayudan a apoyar el metabolismo y los niveles de energía.",
"badges": [
"Medicamento recetado es obligatorio"
],
"delivery": [
"Entrega estimada para el día mar, nov. 3, si tenemos tu receta."
],
"form": "Tableta",
"strength": "50 MCG",
"variant_combinations": [
...
]
},
"pricing_options": [
{
"position": 1,
"selected": true,
"frequency": "1 por día",
"supply": "30 días",
"quantity": "30 comprimidos",
"retail_price": "$13.50",
"extracted_retail_price": 13.5,
"prime_price": "$3.98",
"extracted_prime_price": 3.98,
"insurance_estimate": "$2.00",
"extracted_insurance_estimate": 2.0,
"currency": "USD"
},
...
]
}
JSON structure overview
{
"product_results": {
"asin": "String - Amazon Standard Identification Number",
"title": "String - Medication name, strength, and form (e.g., 'Levothyroxine, 50 MCG Tablet')",
"link": "String - Product link",
"thumbnail": "String - Product image URL",
"subtitle": "String - Brand or generic relationship (e.g., 'Generic for Unithroid, Synthroid, and Levoxyl')",
"subtitle_links": [
{
"text": "String - Name of a medication linked in the subtitle (e.g., 'Unithroid')",
"asin": "String - Amazon Standard Identification Number of the linked medication, when the link points to a product page",
"link": "String - Product link of the linked medication, when the link points to a product page",
"serpapi_link": "String - SerpApi link to the linked medication, when the link points to a product page"
},
...
],
"description": "String - Medication description, the text of the first section of 'medication_details'",
"badges": [
"String - Badge (e.g., 'Rx required')"
],
"stock": "String - Amazon's message when it shows no prices for the medication (e.g., 'Currently unavailable', 'Price currently unavailable'). Delivery and pricing options are omitted in this case.",
"delivery": [
"String - Delivery information for the ZIP code, with 'delivery_zip' (e.g., 'FREE delivery is available in your area.')"
],
"form": "String - Medication form (e.g., 'TABLET'), when Amazon shows the form and strength options",
"strength": "String - Medication strength (e.g., '50 MCG'), when Amazon shows the form and strength options",
"variant_combinations": [
{
"position": "Integer - Combination position",
"dimensions": {
"form": "String - Medication form (e.g., 'TABLET')",
"strength": "String - Medication strength (e.g., '50 MCG')"
},
"asin": "String - Amazon Standard Identification Number of the combination",
"link": "String - Product link of the combination",
"serpapi_link": "String - SerpApi link to the combination",
"selected": "Boolean - Whether the combination is the requested medication"
},
...
]
},
"pricing_options": [
{
"position": "Integer - Pricing option position",
"selected": "Boolean - Whether the pricing option is the one Amazon selects by default (omitted on all rows when Amazon's default supply and frequency do not match a returned option)",
"frequency": "String - How often the medication is taken (e.g., '1 per day'), when Amazon shows it",
"supply": "String - Supply the prices are for (e.g., '30 days')",
"quantity": "String - Quantity of the supply (e.g., '30 tablets')",
"retail_price": "String - Price without insurance or Prime, including the coupon discount when there's one (e.g., '$13.50')",
"extracted_retail_price": "Float - Extracted numeric retail price",
"old_price": "String - Crossed-out price before the coupon discount",
"extracted_old_price": "Float - Extracted numeric price before the coupon discount",
"prime_price": "String - Price for Prime members without insurance (e.g., '$3.98')",
"extracted_prime_price": "Float - Extracted numeric Prime price",
"insurance_estimate": "String - Average insurance price, or the lowest price with insurance for some medications (e.g., '$2.00')",
"extracted_insurance_estimate": "Float - Extracted numeric insurance price",
"save_with_insurance_coupon": "String - Coupon discount on the price with insurance and its conditions (e.g., 'Includes $36.70 off with manufacturer coupon if eligible.')",
"save_with_coupon": "String - Coupon discount on the retail price and its conditions (e.g., 'Includes $12.15 off with manufacturer coupon if eligible.')",
"currency": "String - Currency of the prices (USD)"
},
...
],
"generic_version": { // only for brand medications
"asin": "String - Amazon Standard Identification Number of the generic version",
"title": "String - Medication name of the generic version (e.g., 'Levothyroxine')",
"link": "String - Product link of the generic version",
"serpapi_link": "String - SerpApi link to the generic version",
"thumbnail": "String - Product image URL of the generic version"
},
"medication_details": [
{
"title": "String - Section title (e.g., 'How should you use this medication?')",
"text": "String - Section text"
},
...
],
"medication_details_copyright": "String - Copyright notice of the sections (e.g., 'Copyright Elsevier Inc.')",
"medication_details_disclaimer": "String - Disclaimer that Amazon shows below the sections"
}