Drugs.com API: Get drug prices
Gets the US cash prices Drugs.com lists for a brand or generic medicine by strength, dosage form and quantity, optionally filtered. Where a range is listed the lower price is returned.
Unofficial. Not affiliated with or endorsed by Drugs.com.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Form optional
form Filter by dosage form, for example tablet or oral capsule.
oral capsule
- Medicine, required
medicine Brand or generic medicine name, for example atorvastatin.
amoxicillin
- Quantity optional
quantity Filter by listed quantity, for example 30 tablets or 30 milliliters.
4
Whole number 1 or more.
- Strength optional
strength Filter by labeled strength, for example 20 mg.
Not set
Input as JSON
{ "form": "oral capsule", "medicine": "amoxicillin", "quantity": 4}Output
{ "note": "Prices are for cash-paying customers and are not valid with insurance plans. Prices may vary by pharmacy; where a range is listed, the lower price is shown.", "prices": [ { "form": "oral capsule", "price": 4.5, "page_url": "https://www.drugs.com/price-guide/amoxicillin" , "quantity": 4, "strength": "250 mg", "quantity_unit": "capsules", "price_currency": "USD", "price_per_unit": 1.13, "price_per_unit_currency": "USD" }, { "form": "oral capsule", "price": 4.62, "page_url": "https://www.drugs.com/price-guide/amoxicillin" , "quantity": 4, "strength": "500 mg", "quantity_unit": "capsules", "price_currency": "USD", "price_per_unit": 1.16, "price_per_unit_currency": "USD" } ], "medicine_name": "Amoxicillin"}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"drugs.com/get_drug_prices","input":{"form":"oral capsule","medicine":"amoxicillin","quantity":4}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "drugs.com/get_drug_prices" , "input": { "form": "oral capsule", "medicine": "amoxicillin", "quantity": 4 }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "drugs.com/get_drug_prices" , "input": { "form": "oral capsule", "medicine": "amoxicillin", "quantity": 4 } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run drugs.com/get_drug_prices# with {"form":"oral capsule","medicine":"amoxicillin","quantity":4}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "medicine" ], "properties": { "form": { "type": "string", "description": "Filter by dosage form, for example tablet or oral capsule." }, "medicine": { "type": "string", "description": "Brand or generic medicine name, for example atorvastatin." }, "quantity": { "type": "integer", "minimum": 1, "description": "Filter by listed quantity, for example 30 tablets or 30 milliliters." }, "strength": { "type": "string", "description": "Filter by labeled strength, for example 20 mg." } }}Output schema
{ "type": "object", "required": [ "medicine_name", "note", "prices" ], "properties": { "note": { "type": "string", "description": "Explanation of the cash-price and insurance restrictions." }, "prices": { "type": "array", "items": { "type": "object", "required": [ "strength", "form", "quantity", "quantity_unit", "price", "price_currency", "price_per_unit", "price_per_unit_currency", "page_url" ], "properties": { "form": { "type": "string" }, "price": { "type": "number", "description": "US dollars, lowest listed amount when a range is shown." }, "page_url": { "type": "string", "description": "Public price-guide page for this price." }, "quantity": { "type": "integer" }, "strength": { "type": "string" }, "quantity_unit": { "type": [ "string", "null" ], "description": "Unit for quantity, such as tablets or milliliters." }, "price_currency": { "enum": [ "USD" ], "type": "string" }, "price_per_unit": { "type": "number", "description": "US dollars per unit, lowest listed amount when a range is shown." }, "price_per_unit_currency": { "enum": [ "USD" ], "type": "string" } } }, "description": "Listed cash prices for matching strengths, forms and quantities. For a listed price range, the price shown is the lower amount." }, "medicine_name": { "type": "string", "description": "Name of the medicine on the price guide." } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
drugs.com/get_drug_prices- Returns
- medicine name, note, prices by strength, form and quantity with per-unit price and page link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method drugs.com/get_drug_prices with the inputs above.
Ask your agent
- How much does a 30-day supply of lisinopril 10 mg tablets cost without insurance?
- Look up the cash price on drugs.com for 90 capsules of gabapentin 300 mg.
- What's the out-of-pocket price for Eliquis 5 mg, 60 tablets, in the US?
- Check drugs.com for current cash prices on metformin and show the per-pill cost for each strength.
- I need the uninsured price of amoxicillin oral suspension 250 mg/5 mL, 100 milliliters.
See more
All Drugs.com methodsLooks up a medicine by brand or generic name on Drugs.com and returns a plain-language overview: class, uses, availability, schedule, dosage forms, side effects, and pregnancy and breastfeeding notes.
drugs.com/get_drugChecks 2 to 10 medicine names together on the Drugs.com interaction checker and returns drug-to-drug interactions and food or lifestyle warnings, most severe first, plus the names it could not recognise.
drugs.com/check_drug_interactionsFinds possible pill matches on the Drugs.com pill identifier by imprint, optionally narrowed by color and shape, with each pill's labeler.
drugs.com/identify_pillLooks up a medicine at Cost Plus Drugs by generic or brand name and returns the listed price and its breakdown for a strength, form and quantity, with the strengths and forms on offer. The drug price excludes shipping and taxes; standard shipping is shown separately.
costplusdrugs.com/get_drug_priceFinds the latest FDA drug label for a brand or generic medicine and returns its uses, directions, warnings, ingredients and a DailyMed link.
open.fda.gov/get_drug_labelFinds FDA drug enforcement recalls by medicine or company name, newest first, with status, class, reason and quantity. Recent recalls may not yet appear.
open.fda.gov/search_drug_recallsLooks up a medicine in the NHS medicines A to Z and returns its guidance: uses, key facts, who can take it, how to take it, side effects, pregnancy and interactions. Sections absent from NHS guidance are null; a plain name with separate adult and child pages selects the adult page.
nhs.uk/get_medicineGets current commodity prices and price movements from the Trading Economics commodities page, in the page's group order; filter by a commodity name, slug, symbol or group (e.g. copper, energy), or leave blank for all groups including Electricity.
tradingeconomics.com/get_commodity_prices