Prescription Drug Prices Scraper — Cost Plus Drugs & NADAC
Pricing
from $1.60 / 1,000 drug price records
Prescription Drug Prices Scraper — Cost Plus Drugs & NADAC
Look up US prescription drug prices by drug name, strength, form, NDC or treatment category: Cost Plus Drugs per-unit and per-fill prices with fees and stock, plus optional Medicaid NADAC pharmacy acquisition cost per NDC.
Pricing
from $1.60 / 1,000 drug price records
Rating
0.0
(0)
Developer
Muhammad Afzal
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
13 days ago
Last modified
Categories
Features
Share
Prescription Drug Prices Scraper looks up US prescription drug prices by drug name, NDC, strength, dosage form or treatment category. It returns the Cost Plus Drugs price list (price per unit, price per pack, price per fill, dispensing fee, shipping, stock) and, when you ask for it, the Medicaid NADAC acquisition cost per NDC, as JSON, CSV or Excel. It costs USD 2 per 1,000 price records plus a USD 0.005 start fee per run, and searches without a match are free.
It is built for pharmacy and benefits analysts who compare medication prices, health-tech and price-transparency tools that need a drug price lookup, researchers who track generic drug prices over time, and AI assistants that answer "how much does metformin cost".
What prescription drug prices does it return?
One dataset record per price. The source field says where it comes from, and the two kinds of price are never mixed in one field:
source | What the record is | Price fields |
|---|---|---|
costplusdrugs | One product of the Cost Plus Drugs mail-order price list (about 2,400 products) | pricePerUnitUsd, packPriceUsd, fillPriceUsd, fillPriceWithDispensingUsd, fillTotalWithShippingUsd |
nadac | One NDC in the latest weekly NADAC file from data.medicaid.gov | nadacPerUnitUsd |
NADAC (National Average Drug Acquisition Cost) is what US retail pharmacies pay on average to buy a drug, per unit. It is a cost benchmark, not a price a patient pays.
| Field | What it means |
|---|---|
drugName, brandName, brandOrGeneric | Medication name, the brand it corresponds to, and generic or brand |
strength, form, treatmentCategories | Strength, dosage form and treatment categories (Cost Plus Drugs) |
ndc | The 11-digit NDC of a NADAC record |
equivalentNdcs, equivalentNdcCount, rxnormId | NDCs a Cost Plus Drugs product can be dispensed for, and its RxNorm ID |
unit, pricePerUnitUsd | Unit and Cost Plus Drugs price per unit |
packSize, packCount, packPriceUsd, splittable | Manufacturer pack size, and the price of one full pack (unit price times pack size) |
fillQuantity, fillLabel, fillPriceUsd | The default fill (30 count for most pills) and its medication price |
dispensingFeeUsd, shippingUsd, expeditedShippingUsd | Fees stated by Cost Plus Drugs |
fillPriceWithDispensingUsd, fillTotalWithShippingUsd | Default fill with the dispensing fee, and with standard shipping added |
inStock, specialHandling, url | Stock status, handling note such as cold-chain, and the product page |
nadacPerUnitUsd, nadacPricingUnit | NADAC per unit and its unit (EA, ML or GM) |
nadacEffectiveDate, nadacAsOfDate | When the rate took effect and which weekly file it comes from |
nadacClassification, nadacPharmacyType, nadacExplanationCodes, otc | NADAC rate-setting details |
correspondingGenericNadacPerUnitUsd, correspondingGenericEffectiveDate | For brand NDCs, the NADAC of the generic equivalent |
matchedDrugName, matchedNdc | Which of your search values found the record |
currency, scrapedAt | Always USD, and when the price was read |
Every price is taken from the source or computed only from source fields. A value the source does not give is null, never estimated. The run also writes one OUTPUT record with the outcome, records saved per source, stop reason and warnings.
How do I look up a drug price by name?
Put generic or brand names in drugNames. Case does not matter and part of a name is enough.
{"drugNames": ["atorvastatin", "metformin"],"strengths": ["20mg", "500mg"],"maxResults": 50}
To compare the pharmacy price with the acquisition cost, ask for both sources:
{"drugNames": ["lipitor"],"source": "both","maxResults": 20}
| Input | What it does |
|---|---|
drugNames | Up to 50 generic or brand names, partial and case-insensitive |
ndcs | Up to 200 NDC codes, 10 or 11 digits, with or without hyphens |
strengths | Keep only these strengths, for example 20mg or 500 mg |
forms | Keep only these dosage forms, for example tablet or cream |
treatmentCategories | Keep only these Cost Plus Drugs categories, for example Diabetes |
brandOrGeneric | any, generic or brand |
inStockOnly | Leave out Cost Plus Drugs products that are out of stock |
source | costPlusDrugs (default), nadac or both |
maxResults | Records to save per source, default 50, limit 5,000 |
Drug names and NDCs select drugs (a record matching either is kept); the other filters narrow the selection. With no filter at all, the Actor exports the Cost Plus Drugs price list up to maxResults.
How do I do an NDC lookup with prices?
Put the codes in ndcs. 00093-1174-01, 00093117401, 0093-1174-01 and 0093117401 all find the same drug: 10-digit codes are padded to the 11-digit form, and a 10-digit code without hyphens is tried in its three possible readings.
{"ndcs": ["00093-1174-01", "67877-0511-10"],"source": "both"}
On Cost Plus Drugs an NDC matches the product whose equivalentNdcs contains it, so a manufacturer's NDC finds the generic product that would be dispensed. On NADAC the NDC matches its own row.
What does the output look like?
A Cost Plus Drugs record (the remaining NADAC fields, all null here, are left out for brevity):
{"source": "costplusdrugs","priceType": "mail_order_pharmacy_price","recordId": "d0b9ba0ae3ab9143200cfbce6ecb7a6a","drugName": "Atorvastatin","brandName": "Lipitor","brandOrGeneric": "generic","strength": "10mg","form": "Tablet","treatmentCategories": ["Heart Health", "High Cholesterol"],"ndc": null,"equivalentNdcs": ["00904-6290-61", "68084-0097-01", "67877-0511-10"],"equivalentNdcCount": 3,"rxnormId": "617312","unit": "ea","pricePerUnitUsd": 0.00834,"packSize": 1000,"packCount": 1,"packPriceUsd": 8.34,"splittable": true,"fillQuantity": 30,"fillLabel": "30 count","fillPriceUsd": 0.25,"dispensingFeeUsd": 5,"fillPriceWithDispensingUsd": 5.25,"shippingUsd": 5.25,"expeditedShippingUsd": 15,"fillTotalWithShippingUsd": 10.5,"inStock": true,"specialHandling": null,"nadacPerUnitUsd": null,"currency": "USD","matchedDrugName": "atorvastatin","matchedNdc": null,"url": "https://www.costplusdrugs.com/medications/atorvastatin-10mg-tablet/?utm_source=api&utm_content=pricing-api","scrapedAt": "2026-11-11T02:30:00.000Z"}
A NADAC record (shortened: the Cost Plus Drugs fields are present and null):
{"source": "nadac","priceType": "pharmacy_acquisition_cost_benchmark","recordId": "nadac:58151015577","drugName": "LIPITOR 10 MG TABLET","brandOrGeneric": "brand","ndc": "58151-0155-77","pricePerUnitUsd": null,"nadacPerUnitUsd": 13.4182,"nadacPricingUnit": "EA","nadacEffectiveDate": "2026-10-21","nadacAsOfDate": "2026-11-11","nadacClassification": "B","nadacPharmacyType": "C/I","nadacExplanationCodes": ["1"],"otc": false,"correspondingGenericNadacPerUnitUsd": 0.02301,"correspondingGenericEffectiveDate": "2026-10-21","currency": "USD","matchedDrugName": "lipitor","scrapedAt": "2026-11-11T02:30:00.000Z"}
How much does drug price data cost?
You pay per price record saved to the dataset, plus a small start fee. Searches without a match, rejected inputs and failed lookups are never charged. Platform usage is included in the price.
| Apify plan tier | Per price record | Per 1,000 price records | Start fee per run |
|---|---|---|---|
| Free | USD 0.002 | USD 2.00 | USD 0.005 |
| Bronze (2.5% off) | USD 0.00195 | USD 1.95 | USD 0.005 |
| Silver (5% off) | USD 0.0019 | USD 1.90 | USD 0.005 |
| Gold, Platinum, Diamond (20% off) | USD 0.0016 | USD 1.60 | USD 0.005 |
The start fee is charged once per started GB of allocated memory; the default 256 MB run pays it once. Worked totals on the Free tier: one drug name with 15 records costs USD 0.035, and the whole Cost Plus Drugs price list (about 2,400 records) costs about USD 4.79. Set a maximum cost on the run and the Actor stops saving records when it is reached.
How do I compare generic drug prices with NADAC?
Run a drug name with source set to both. Take pricePerUnitUsd from the costplusdrugs records and nadacPerUnitUsd from the nadac records of the same drug and strength. The NADAC description carries the strength and form (for example METFORMIN HCL 500 MG TABLET), and many NDCs of one drug share one NADAC rate, so group NADAC records by drugName. Schedule the same input weekly to follow medication prices over time: NADAC is refreshed weekly and the Cost Plus Drugs list changes as its costs change.
When should I use it, and when not?
Use it when you need a US cash price list for prescription medications from one mail-order pharmacy, the national acquisition-cost benchmark, or both side by side.
Do not use it for:
- Prices at local pharmacies or coupon prices. It reads the Cost Plus Drugs mail-order price list and NADAC only.
- Drugs Cost Plus Drugs does not sell. Its list has about 2,400 products, mostly generics; a drug that is not listed returns no Cost Plus Drugs record.
- Reading NADAC as a retail price. NADAC is the average cost pharmacies pay, before any dispensing fee or margin.
- NADAC history. Only the latest weekly NADAC file is read.
- The whole NADAC file in one run. NADAC needs a drug name or an NDC.
- Medical advice or ordering medication. The Actor only reads published prices.
- Prices outside the United States.
Can I use it from an AI assistant?
Yes. Claude, ChatGPT, Cursor and any other MCP client can run it through Apify's MCP server at https://mcp.apify.com/?tools=muhammadafzal/prescription-drug-prices-scraper. Connect that URL, then ask something like: "What does a 30-day supply of atorvastatin 20mg cost at Cost Plus Drugs, and what is its NADAC per tablet?" The assistant sees the input fields, the price per record and the output fields before it runs.
How do I call it from code?
JavaScript:
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('muhammadafzal/prescription-drug-prices-scraper').call({drugNames: ['atorvastatin'],strengths: ['20mg'],source: 'both',maxResults: 50,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Python:
import osfrom apify_client import ApifyClientclient = ApifyClient(os.environ["APIFY_TOKEN"])run = client.actor("muhammadafzal/prescription-drug-prices-scraper").call(run_input={"treatmentCategories": ["Diabetes"],"brandOrGeneric": "generic","maxResults": 200,})for item in client.dataset(run.default_dataset_id).iterate_items():print(item["drugName"], item["strength"], item["pricePerUnitUsd"], item["fillTotalWithShippingUsd"])
FAQ
How much does metformin cost?
Run the Actor with drugNames: ["metformin"]. Each strength and form is one record with the price per unit and the price of a default 30-count fill, with and without fees.
What is NADAC pricing? NADAC is the National Average Drug Acquisition Cost published weekly by Medicaid on data.medicaid.gov. It is the average invoice cost retail pharmacies pay per unit of a drug, listed per NDC.
Is there a Cost Plus Drugs price list I can download?
Yes. Leave every filter empty and set maxResults to 5,000 to export the whole Cost Plus Drugs price list as JSON, CSV or Excel.
What is the difference between the unit price, the pack price and the fill price?
pricePerUnitUsd is the price of one tablet, capsule, mL or gram. packPriceUsd is that price times the manufacturer pack size. fillPriceUsd is the price of the default fill, usually 30 units; fillTotalWithShippingUsd adds the dispensing fee and standard shipping.
Why is a price field null? The source does not give that value for the record. NADAC records have no retail price, and Cost Plus Drugs records have no NADAC. Nothing is estimated.
Why did my drug return nothing? Cost Plus Drugs does not list it, or the spelling differs. Try the generic name, a shorter part of the name, or the NDC. NADAC descriptions are abbreviated (for example HCL, ER), so a shorter name works better there.
How current are the prices?
Both sources are read live on every run. scrapedAt is the lookup time and nadacAsOfDate is the date of the weekly NADAC file.
What happens if a source does not answer?
The Actor retries a few times. With source: both, records from the source that answered are still saved and the OUTPUT record lists the failed lookup. Nothing is charged for a failed lookup.
Last verified: 2026-11-11