# NADAC Drug Acquisition Cost Scraper (`parseforge/nadac-drug-prices-scraper`) Actor

Export NADAC (National Average Drug Acquisition Cost) records from data.medicaid.gov. Weekly pharmacy cost benchmark used by Medicaid. Filter by NDC, drug name, dosage form, or date range. Pull NDC, generic name, NADAC per unit, pricing unit, OTC flag, and effective date.

- **URL**: https://apify.com/parseforge/nadac-drug-prices-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Business, Other, E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.75 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

![ParseForge Banner](https://github.com/ParseForge/apify-assets/blob/ad35ccc13ddd068b9d6cba33f323962e39aed5b2/banner.jpg?raw=true)

## 💊 NADAC Drug Acquisition Cost Scraper

> 🚀 **Export the National Average Drug Acquisition Cost benchmark in seconds.** Weekly pharmacy acquisition prices for **every NDC in the U.S. retail market**. The same benchmark Medicaid uses for reimbursement.

> 🕒 **Last updated:** 2026-05-21 · **📊 13 fields** per record · **💊 30,000+ NDCs** · **🇺🇸 weekly U.S. pharmacy benchmark** · **📅 history back to 2013**

The **NADAC Scraper** turns the official Medicaid drug-pricing feed into clean rows. Each record carries the NDC, drug description, NADAC per unit, pricing unit, pharmacy type, brand vs generic classification, OTC flag, effective date, the corresponding generic NADAC, and the as-of file date. NADAC (National Average Drug Acquisition Cost) is produced by the Centers for Medicare & Medicaid Services from retail-pharmacy invoice surveys and is the most widely cited public benchmark for U.S. drug acquisition prices.

Coverage spans **the full NADAC reference file**: brand and generic drugs, both prescription and OTC, across every dosage form on the U.S. market. Files are republished weekly with effective dates that go back to 2013, giving you a long historical series for trend analysis.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| PBM analysts, drug-pricing researchers, employer health plans, 340B program managers, formulary teams, payer actuaries, pharmacy chains, health-policy academics | Reimbursement benchmarking, MAC list construction, drug-pricing trend studies, brand-to-generic substitution analysis, 340B ceiling-price modelling |

---

### 📋 What the NADAC Scraper does

Eight filtering workflows in a single run:

- 💊 **Search by drug name.** Partial match on the NDC description (e.g. `METFORMIN`, `IBUPROFEN`).
- 🔖 **Search by NDC.** Resolve a specific 11-digit National Drug Code.
- 🏷️ **Filter by classification.** Brand (`B`) or generic (`G`) only.
- 💉 **Filter by dosage form.** Tablet, capsule, solution, injection, suspension, cream, ointment, gel, syrup, elixir, powder, patch, inhaler, spray, drops, lotion, suppository, foam.
- 🛒 **Filter by OTC flag.** Over-the-counter only, prescription only, or both.
- 📅 **Filter by effective date range.** Lower and upper bounds on the price effective date.
- 🔁 **Sort newest or oldest first.** Walk the history forwards or backwards.

Each record includes the NDC, drug description, NADAC per unit (USD), the pricing unit (each, mL, gm), pharmacy type indicator, OTC flag, explanation code, brand vs generic classification, the corresponding generic drug NADAC and its effective date for substitution analysis, the file as-of date, and a link to the canonical Medicaid dataset page.

> 💡 **Why it matters:** building a NADAC pipeline yourself means cleaning weekly CSV refreshes, joining brand-generic pairs by hand, and watching for CMS dataset version rotations. This Actor returns clean rows on every run, filtered server-side.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to build a brand-vs-generic price diff table in one run._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td>maxItems</td><td>integer</td><td>10</td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
<tr><td>drugName</td><td>string</td><td>"METFORMIN"</td><td>Partial match on NDC description.</td></tr>
<tr><td>ndc</td><td>string</td><td>""</td><td>Exact 11-digit NDC.</td></tr>
<tr><td>classification</td><td>string</td><td>""</td><td>B (brand), G (generic), or any.</td></tr>
<tr><td>dosageForm</td><td>string</td><td>""</td><td>One of 18 FDA dosage forms.</td></tr>
<tr><td>otc</td><td>string</td><td>""</td><td>Y, N, or any.</td></tr>
<tr><td>effectiveFrom</td><td>string</td><td>""</td><td>YYYY-MM-DD lower bound on effective date.</td></tr>
<tr><td>effectiveTo</td><td>string</td><td>""</td><td>YYYY-MM-DD upper bound on effective date.</td></tr>
<tr><td>sortOrder</td><td>string</td><td>"newest"</td><td>Sort by effective date ascending or descending.</td></tr>
</tbody>
</table>

**Example: latest 100 metformin prices.**

```json
{
    "maxItems": 100,
    "drugName": "METFORMIN",
    "classification": "G",
    "sortOrder": "newest"
}
````

**Example: brand vs generic compare for ibuprofen tablets in 2024.**

```json
{
    "maxItems": 500,
    "drugName": "IBUPROFEN",
    "dosageForm": "TABLET",
    "effectiveFrom": "2024-01-01",
    "effectiveTo": "2024-12-31"
}
```

> ⚠️ **Good to Know:** NADAC reflects acquisition cost surveys from U.S. retail pharmacies. It is not a list price, a 340B ceiling price, or a wholesale acquisition cost (WAC). Use it as the benchmark CMS uses for reimbursement, not as a final purchase price.

***

### 📊 Output

Each NADAC record contains **13 fields**. Download the dataset as CSV, Excel, JSON, or XML.

#### 🧾 Schema

| Field | Type | Example |
|---|---|---|
| 🆔 `ndc` | string | `"00093101901"` |
| 💊 `ndcDescription` | string | `"METFORMIN HCL TAB 500MG"` |
| 💵 `nadacPerUnit` | number | null | `0.02341` |
| 📏 `pricingUnit` | string | null | `"EA"` |
| 📅 `effectiveDate` | string | `"2025-04-23"` |
| 🏪 `pharmacyTypeIndicator` | string | null | `"C/I"` |
| 🛒 `otc` | string | null | `"N"` |
| 🏷️ `explanationCode` | string | null | `"3"` |
| 🅱️ `classificationForRateSetting` | string | `"G"` |
| 💊 `correspondingGenericDrugNadacPerUnit` | number | null | `0.02341` |
| 📅 `correspondingGenericDrugEffectiveDate` | string | null | `"2025-04-23"` |
| 🗓️ `asOfDate` | string | null | `"2025-05-01"` |
| 🔗 `sourceUrl` | string | `"https://data.medicaid.gov/dataset/nadac-..."` |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-20T12:00:00.000Z"` |

#### 📦 Sample records

<details>
<summary><strong>💊 Generic tablet: Metformin HCL 500 mg</strong></summary>

```json
{
    "ndc": "00093101901",
    "ndcDescription": "METFORMIN HCL TAB 500MG",
    "nadacPerUnit": 0.02341,
    "pricingUnit": "EA",
    "effectiveDate": "2025-04-23",
    "pharmacyTypeIndicator": "C/I",
    "otc": "N",
    "explanationCode": "3",
    "classificationForRateSetting": "G",
    "correspondingGenericDrugNadacPerUnit": 0.02341,
    "correspondingGenericDrugEffectiveDate": "2025-04-23",
    "asOfDate": "2025-05-01",
    "sourceUrl": "https://data.medicaid.gov/dataset/nadac-national-average-drug-acquisition-cost",
    "scrapedAt": "2026-05-20T12:00:00.000Z"
}
```

</details>

<details>
<summary><strong>🛒 OTC suspension: Ibuprofen 100 mg / 5 mL</strong></summary>

```json
{
    "ndc": "00904591720",
    "ndcDescription": "IBUPROFEN SUSP 100MG/5ML",
    "nadacPerUnit": 0.01489,
    "pricingUnit": "ML",
    "effectiveDate": "2025-04-23",
    "pharmacyTypeIndicator": "C/I",
    "otc": "Y",
    "classificationForRateSetting": "G",
    "asOfDate": "2025-05-01",
    "sourceUrl": "https://data.medicaid.gov/dataset/nadac-national-average-drug-acquisition-cost",
    "scrapedAt": "2026-05-20T12:00:00.000Z"
}
```

</details>

<details>
<summary><strong>💊 Brand drug with generic match: Lipitor</strong></summary>

```json
{
    "ndc": "00071015523",
    "ndcDescription": "LIPITOR TAB 10MG",
    "nadacPerUnit": 5.31247,
    "pricingUnit": "EA",
    "effectiveDate": "2025-04-23",
    "pharmacyTypeIndicator": "C/I",
    "otc": "N",
    "classificationForRateSetting": "B",
    "correspondingGenericDrugNadacPerUnit": 0.10342,
    "correspondingGenericDrugEffectiveDate": "2025-04-23",
    "asOfDate": "2025-05-01",
    "sourceUrl": "https://data.medicaid.gov/dataset/nadac-national-average-drug-acquisition-cost",
    "scrapedAt": "2026-05-20T12:00:00.000Z"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 💵 | **Authoritative benchmark.** The same NADAC file CMS uses for Medicaid reimbursement, not a third-party estimate. |
| 🔁 | **Weekly refresh.** New effective-date snapshots every week, going back to 2013. |
| 🅱️ | **Brand vs generic pair.** Corresponding generic NADAC right on the brand row, ready for substitution analysis. |
| 🔖 | **NDC join keys.** 11-digit NDC on every row for joining with claims, formularies, and 340B lists. |
| 📅 | **Historical series.** Pull every effective date for one NDC and chart price drift over years. |
| ⚡ | **Fast.** Hundreds of rows per minute on paid plans. |
| 🚫 | **No login.** Public CMS dataset, no token required. |

> 📊 NADAC is the most widely cited public benchmark for U.S. drug acquisition prices and the cornerstone of most state Medicaid reimbursement methodologies.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ NADAC Scraper** *(this Actor)* | $5 free credit, then pay-per-use | **Every U.S. NDC** | **Weekly per run** | name, NDC, class, form, OTC, date | ⚡ 2 min |
| Commercial drug pricing services | $10k+/year | Multi-benchmark | Daily | Many | 🕒 Days |
| Direct CMS file downloads | Free | Full file | Weekly CSV | Build it yourself | 🐢 Hours |
| Manual lookup on data.medicaid.gov | Free | Full file | Weekly | Limited UI | 🐢 Tedious |

Pick this Actor when you want clean, filtered NADAC rows on demand without standing up a CMS data pipeline.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the NADAC Drug Acquisition Cost Scraper page on the Apify Store.
3. 🎯 **Set input.** Pick a drug name, NDC, classification, or date range and set `maxItems`.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your NADAC rows.
5. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to a downloaded NADAC dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 💼 PBM & Payer Analytics

- MAC (Maximum Allowable Cost) list construction
- Reimbursement-rate benchmarking by state
- Variance analysis: paid amount vs NADAC
- Generic substitution policy modelling

</td>
<td width="50%" valign="top">

#### 🏥 Employer & Self-Insured Plans

- Plan-design simulations with real acquisition costs
- High-cost-claimant explainers tied to NDC
- Therapeutic-class spend dashboards
- Specialty drug forecasting

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 🏪 340B & Specialty Pharmacy

- Ceiling-price comparisons with NADAC delta
- Inventory pricing checks against the public benchmark
- Audit-prep data pulls by NDC and date
- Class-of-trade variance studies

</td>
<td width="50%" valign="top">

#### 📰 Policy & Research

- Brand-to-generic price-drop event studies
- Inflation tracking by therapeutic area
- Comparative pricing across years
- Reproducible research datasets for academic papers

</td>
</tr>
</table>

***

### 🔌 Automating NADAC Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. A weekly schedule lines up with the CMS publishing cadence and keeps your pricing tables current.

***

### 🌟 Beyond business use cases

NADAC data also powers research, journalism, advocacy, and personal projects.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Pharmacy-pricing studies for health-economics journals
- Drug-substitution analyses for public-health programs
- Teaching datasets for pharmacy school courses
- Reproducible health-policy research

</td>
<td width="50%">

#### 🎨 Personal and creative

- Patient-facing price transparency tools
- Personal-finance plugins for prescription costs
- Educational dashboards for nursing students
- Blog posts and explainer videos on drug pricing

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Patient-assistance program eligibility checks
- Community-pharmacy benchmarking
- Investigative journalism on price spikes
- Free-clinic budget planning

</td>
<td width="50%">

#### 🧪 Experimentation

- Train pricing-anomaly detectors on real data
- Benchmark drug-cost forecasting models
- Prototype agent pipelines that quote NADAC on demand
- Test pharmacy-claim audit logic with live prices

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20NADAC%20Drug%20Acquisition%20Cost%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20NADAC%20Drug%20Acquisition%20Cost%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20NADAC%20Drug%20Acquisition%20Cost%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20NADAC%20Drug%20Acquisition%20Cost%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

You pass a drug name, NDC, classification, dosage form, OTC flag, or date range. The Actor queries the CMS NADAC dataset, applies your filters server-side, sorts the results, and emits one clean row per record.

#### 📏 What does NADAC measure?

NADAC is the National Average Drug Acquisition Cost. It is the survey-derived average price U.S. retail pharmacies pay to acquire a given NDC. It is not a list price, not a WAC, and not a 340B ceiling.

#### 🔁 How often is the data refreshed?

CMS republishes the NADAC file weekly. Each run of this Actor returns the current published rows. Use date filters to pull historical snapshots.

#### 📅 How far back does the history go?

Effective-date history extends back to 2013, giving you over a decade of weekly snapshots per NDC.

#### 🅱️ Does it cover brand and generic drugs?

Yes. The classification field distinguishes brand (`B`) from generic (`G`), and the corresponding-generic-NADAC columns on brand rows make substitution analysis a one-step join.

#### 🛒 What about OTC drugs?

Yes. The OTC flag covers over-the-counter products alongside prescription drugs. Filter to `Y` for OTC-only or `N` for prescription-only.

#### 💼 Can I use this data commercially?

NADAC is CMS-published open data and may be redistributed. Review the source terms of use for your specific application.

#### ⏰ Can I schedule regular runs?

Yes. A weekly Apify schedule lines up with the CMS publishing cadence and keeps your pricing tables current.

#### 💳 Do I need a paid Apify plan?

No. The free Apify plan covers testing and small runs. Paid plans unlock larger datasets, scheduling, and concurrency.

#### 🔁 What happens if a run fails?

Apify automatically retries transient errors. Partial datasets are preserved so you can adjust the input and re-run.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.

***

### 🔌 Integrate with any app

NADAC Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get run notifications in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe pricing data into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh NADAC rows into your pricing engine, or alert your team in Slack when prices move beyond a threshold.

***

### 🔗 Recommended Actors

- [**💊 DailyMed FDA Drug Labels Scraper**](https://apify.com/parseforge/dailymed-fda-labels-scraper) - FDA prescribing information by NDC
- [**🧬 ClinicalTrials.gov Scraper**](https://apify.com/parseforge/clinicaltrials-gov-scraper) - Drug-trial records by condition or phase
- [**🏥 Florida MQA Licensee Scraper**](https://apify.com/parseforge/florida-mqa-scraper) - Healthcare-practitioner license lookups
- [**🏥 Florida DFS Licensee Scraper**](https://apify.com/parseforge/florida-dfs-licensee-scraper) - State-regulated professional licenses
- [**📊 Figshare Research Scraper**](https://apify.com/parseforge/figshare-scraper) - Research dataset and figure metadata

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more healthcare and policy scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by the Centers for Medicare & Medicaid Services, data.medicaid.gov, or any drug manufacturer. All trademarks mentioned are the property of their respective owners. Only publicly available open pricing data is collected.

# Actor input Schema

## `maxItems` (type: `integer`):

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

## `drugName` (type: `string`):

Match part of the NDC description / drug name (e.g. METFORMIN, IBUPROFEN).

## `ndc` (type: `string`):

Exact 11-digit National Drug Code.

## `classification` (type: `string`):

Brand or generic classification.

## `dosageForm` (type: `string`):

Filter by FDA dosage form.

## `otc` (type: `string`):

Restrict to over-the-counter (Y) or prescription (N) drugs.

## `effectiveFrom` (type: `string`):

Only records with an effective date on or after this date.

## `effectiveTo` (type: `string`):

Only records with an effective date on or before this date.

## `sortOrder` (type: `string`):

Order by effective date.

## Actor input object example

```json
{
  "maxItems": 10,
  "drugName": "METFORMIN",
  "sortOrder": "newest"
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10,
    "drugName": "METFORMIN",
    "sortOrder": "newest"
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/nadac-drug-prices-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "maxItems": 10,
    "drugName": "METFORMIN",
    "sortOrder": "newest",
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/nadac-drug-prices-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10,
  "drugName": "METFORMIN",
  "sortOrder": "newest"
}' |
apify call parseforge/nadac-drug-prices-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/nadac-drug-prices-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "NADAC Drug Acquisition Cost Scraper",
        "description": "Export NADAC (National Average Drug Acquisition Cost) records from data.medicaid.gov. Weekly pharmacy cost benchmark used by Medicaid. Filter by NDC, drug name, dosage form, or date range. Pull NDC, generic name, NADAC per unit, pricing unit, OTC flag, and effective date.",
        "version": "1.0",
        "x-build-id": "UPUpLRTTwnaB3PDbA"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~nadac-drug-prices-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-nadac-drug-prices-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~nadac-drug-prices-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-nadac-drug-prices-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~nadac-drug-prices-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-nadac-drug-prices-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    },
                    "drugName": {
                        "title": "Drug Name (contains)",
                        "type": "string",
                        "description": "Match part of the NDC description / drug name (e.g. METFORMIN, IBUPROFEN)."
                    },
                    "ndc": {
                        "title": "NDC",
                        "type": "string",
                        "description": "Exact 11-digit National Drug Code."
                    },
                    "classification": {
                        "title": "Classification",
                        "enum": [
                            "",
                            "B",
                            "G"
                        ],
                        "type": "string",
                        "description": "Brand or generic classification."
                    },
                    "dosageForm": {
                        "title": "Dosage Form",
                        "enum": [
                            "",
                            "TABLET",
                            "CAPSULE",
                            "SOLUTION",
                            "INJECTION",
                            "SUSPENSION",
                            "CREAM",
                            "OINTMENT",
                            "GEL",
                            "SYRUP",
                            "ELIXIR",
                            "POWDER",
                            "PATCH",
                            "INHALER",
                            "SPRAY",
                            "DROPS",
                            "LOTION",
                            "SUPPOSITORY",
                            "FOAM"
                        ],
                        "type": "string",
                        "description": "Filter by FDA dosage form."
                    },
                    "otc": {
                        "title": "OTC",
                        "enum": [
                            "",
                            "Y",
                            "N"
                        ],
                        "type": "string",
                        "description": "Restrict to over-the-counter (Y) or prescription (N) drugs."
                    },
                    "effectiveFrom": {
                        "title": "Effective Date From (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only records with an effective date on or after this date."
                    },
                    "effectiveTo": {
                        "title": "Effective Date To (YYYY-MM-DD)",
                        "type": "string",
                        "description": "Only records with an effective date on or before this date."
                    },
                    "sortOrder": {
                        "title": "Sort Order",
                        "enum": [
                            "newest",
                            "oldest"
                        ],
                        "type": "string",
                        "description": "Order by effective date."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
