Cost Plus Drugs API: Get drug price
Looks 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.
Unofficial. Not affiliated with or endorsed by Cost Plus Drugs.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Form optional
form Requested dosage form, for example Tablet. Defaults to the first listed form.
Not set
- Medicine, required
medicine Generic or brand name of the medicine, for example atorvastatin or Lipitor.
Lipitor
- Quantity optional
quantity Number of units, for example 30. Defaults to the first quantity listed for the medicine.
60
Whole number 1 or more.
- Strength optional
strength Requested strength, for example 20 mg. Defaults to the first listed strength.
20 mg
Input as JSON
{ "medicine": "Lipitor", "quantity": 60, "strength": "20 mg"}Output
{ "form": "Tablet", "quantity": 60, "strength": "20mg", "page_link": "https://www.costplusdrugs.com/medications/atorvastatin-20mg-tablet/" , "markup_usd": 0.11, "shipping_usd": 5.25, "medicine_name": "Atorvastatin", "available_forms": [ "Tablet" ], "total_price_usd": 5.82, "brand_equivalent": "Lipitor", "pharmacy_fee_usd": 5, "retail_price_usd": 137.4, "medicine_cost_usd": 0.71, "price_per_unit_usd": 0.097, "available_strengths": [ "10mg", "20mg", "40mg" ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"costplusdrugs.com/get_drug_price","input":{"medicine":"Lipitor","quantity":60,"strength":"20 mg"}}' # 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": "costplusdrugs.com/get_drug_price" , "input": { "medicine": "Lipitor", "quantity": 60, "strength": "20 mg" }})# 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": "costplusdrugs.com/get_drug_price" , "input": { "medicine": "Lipitor", "quantity": 60, "strength": "20 mg" } }), 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 costplusdrugs.com/get_drug_price# with {"medicine":"Lipitor","quantity":60,"strength":"20 mg"}"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": "Requested dosage form, for example Tablet. Defaults to the first listed form." }, "medicine": { "type": "string", "description": "Generic or brand name of the medicine, for example atorvastatin or Lipitor." }, "quantity": { "type": "integer", "minimum": 1, "description": "Number of units, for example 30. Defaults to the first quantity listed for the medicine." }, "strength": { "type": "string", "description": "Requested strength, for example 20 mg. Defaults to the first listed strength." } }}Output schema
{ "type": "object", "required": [ "medicine_name", "brand_equivalent", "form", "strength", "quantity", "total_price_usd", "medicine_cost_usd", "markup_usd", "pharmacy_fee_usd", "shipping_usd", "price_per_unit_usd", "retail_price_usd", "available_strengths", "available_forms", "page_link" ], "properties": { "form": { "type": "string" }, "quantity": { "type": "integer" }, "strength": { "type": "string" }, "page_link": { "type": "string" }, "markup_usd": { "type": "number" }, "shipping_usd": { "type": "number", "description": "Standard shipping shown separately, additional at checkout." }, "medicine_name": { "type": "string" }, "available_forms": { "type": "array", "items": { "type": "string" } }, "total_price_usd": { "type": "number", "description": "Displayed drug price before shipping and taxes." }, "brand_equivalent": { "type": [ "string", "null" ] }, "pharmacy_fee_usd": { "type": "number" }, "retail_price_usd": { "type": [ "number", "null" ] }, "medicine_cost_usd": { "type": "number" }, "price_per_unit_usd": { "type": "number" }, "available_strengths": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
costplusdrugs.com/get_drug_price- Returns
- price, medicine cost, markup, pharmacy fee, shipping, retail price, strengths, forms, 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 costplusdrugs.com/get_drug_price with the inputs above.
Ask your agent
- How much does 90 tablets of metformin 500 mg cost at Cost Plus Drugs, and what's the markup and pharmacy fee in that price?
- What's the price for 30 capsules of omeprazole 20 mg before shipping? I'd like to see it next to the retail price too.
- Look up Lipitor 40 mg on costplusdrugs.com for a 30-day supply and show me which other strengths they carry.
- Price check: lisinopril 10 mg, quantity 60. Break down the medicine cost and fees and tell me the shipping charge.
- I take sertraline 100 mg tablets, 45 a month. What would that run me and what forms is it available in?
See more
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.
drugs.com/get_drug_pricesLooks 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_pillFinds 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_labelCompares a product's prices across shops on PriceRunner in the United Kingdom, Sweden or Denmark: finds the best-matching product, lists its default new-condition national shop offers sorted by total price, and adds the three-month low when available.
pricerunner.com/compare_pricesGets 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_pricesGets a city's current Numbeo cost of living indices, monthly estimates without rent, and typical prices. Add a country or state to tell apart cities with the same name.
numbeo.com/get_cost_of_living