ParseForge Scrapers

Medicaid Drug Formulary Scraper

parseforge/medicaid-formulary-scraper

Other

Scrapes Medicaid drug formulary entries by quarter and NDC code. Returns each drug as a flat row with rebate details.

Run this scraper See the API call
Total users
2
Monthly active
1
Total runs
103
Bookmarked
0
Rating
Not rated yet
Last modified
9 days ago

Overview

ParseForge

Medicaid Drug Formulary Scraper

Scrape Medicaid drug formulary data by quarter and NDC code, up to a million drugs per run. Each drug comes with its rebate period, NDC, and full formulary details. No login or API key. Export to CSV, JSON, Excel, or XML.

Medicaid's official drug rebate data is locked behind a web portal with no public API. This actor reads the public formulary pages directly, filtered by quarter and NDC code, and returns each matching drug in one fixed schema.

Who uses it What they scrape Medicaid.gov for
Pharmacy benefit managers Which drugs are covered in a given quarter
Healthcare consultants Compare formulary changes across quarters
Pharmaceutical manufacturers Track rebate eligibility for their products
Policy researchers Analyze Medicaid drug coverage trends

What it does

This Actor collects Medicaid drug formulary entries by quarter and NDC code, and returns each drug as a flat row.

  • ๐Ÿ“… Quarter filter: select any quarter from 2024-Q1 through 2025-Q4.
  • ๐Ÿ” NDC contains: narrow results to drugs whose NDC code contains a given string.
  • ๐Ÿ“Š Flat rows: every drug is returned as a single record with all formulary fields.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

What you can do with Medicaid.gov data

๐Ÿ“ˆ Track formulary changes.

A pharmacy benefit manager runs the scraper for each quarter and compares the drug lists to see what was added or removed.

๐Ÿ”Ž Verify rebate eligibility.

A pharmaceutical manufacturer checks whether their drug's NDC appears in the latest quarter's formulary.

๐Ÿ“Š Build coverage datasets.

A policy researcher collects all drugs for a year and analyzes coverage patterns across states.

๐Ÿงช Monitor specific drugs.

A healthcare consultant uses the NDC contains filter to track a particular product across multiple quarters.

Why choose this scraper

What you get
Quarter selection Pick the exact Medicaid rebate reporting period you need
NDC substring filter Find drugs by partial National Drug Code
Scalable output Collect up to one million drugs in a single run

How it compares

No other Store actor targets Medicaid.gov the same way, so the honest comparison is with the alternatives teams actually weigh.

Medicaid Drug Formulary Scraper Build it in-house By hand
Setup Run it now, zero config Days of engineering None, but hours per pull
When Medicaid.gov changes Maintained for you You fix it You re-learn the page
Proxies, retries, anti-bot Built in Your problem Browser only
Output Fixed JSON schema, CSV/Excel export Whatever you build Copy-paste
Cost Pay per result Engineering time Analyst hours

Configure the run

Drive the Actor with a quarter and an optional NDC substring, and set a maximum number of drugs to collect per run. The Input tab lists every parameter.

A first run with the defaults:

{
  "maxItems": 10
}

A larger pull:

{
  "maxItems": 200
}

Pricing

Pay-per-result: $0.021 per result collected. You pay only for the results written to your dataset.

Results collected Approximate cost
100 results $2.10
1,000 results $21.00
10,000 results $210.00

New Apify accounts start with $5 in free credit.

Free users

Free-plan runs return up to 10 results as a preview. Upgrade your Apify plan to collect up to 1,000,000 results per run.

Run it

  1. Create a free Apify account with $5 in credit.
  2. Open the Medicaid Drug Formulary Scraper.
  3. Set your inputs and any filters, then click Start.
  4. Export the results as CSV, Excel, JSON, or XML from the Dataset tab.

Run it programmatically through the Apify API (run-sync-get-dataset-items) or the ApifyClient for JavaScript and Python.

Use with AI agents (MCP)

Give an AI agent live access to Medicaid.gov through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/medicaid-formulary-scraper"

Then prompt it in plain language to run the scraper and read back the results.

Troubleshooting

Why am I getting no results?

Check your NDC Contains filter. If it is too specific, no drugs will match. Try leaving it empty or using a shorter substring.

The run stops before collecting all drugs.

Increase the Maximum drugs setting. The default is 10, but you can set it up to 1,000,000.

I selected a quarter but the data looks old.

Make sure you selected the correct quarter. The actor only returns data for the quarter you specify.

The output has fewer rows than expected.

The NDC Contains filter is case-sensitive. Try using uppercase letters or a partial code.

FAQ

Question Answer
What is a Medicaid drug formulary? It is the list of drugs covered under Medicaid's drug rebate program for a given quarter. Each entry includes the NDC and other rebate details.
Which quarters can I scrape? The actor supports quarters from 2024-Q1 through 2025-Q4. Select one per run.
Can I filter by NDC code? Yes, use the NDC Contains field to return only drugs whose NDC contains the text you enter.
How many drugs can I collect in one run? You can set the maximum number of drugs, up to 1,000,000 per run.
What output formats are supported? The actor exports to CSV, JSON, Excel, and XML.
Do I need a Medicaid.gov account? No, the actor reads the public formulary pages without any login.
Is the data updated? The actor pulls the latest published data for the quarter you select.
Can I schedule this scraper? Yes, you can schedule runs on Apify to collect data automatically.

Related actors

Browse the full ParseForge collection for more scrapers.

๐Ÿ†˜ Need help? Email parseforge@protonmail.com with your run ID, your input, and what you expected.

โš ๏ธ Disclaimer. This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Centers for Medicare & Medicaid Services. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

Input

FieldTypeWhat it doesDefault
maxItems integer How many drugs to collect per run. 10
quarter string (8 options) Quarter 2024-Q4
ndcContains string NDC Contains not set

Pricing

from $19.00 per 1,000 results

Charged forWhat it isPrice each
result Single result in the default dataset. $0.019 to $0.021

Tiered: the lower figure is the price on a higher Apify plan. Billing and the free credit live on Apify.

API

One POST returns the dataset directly. Same shape for every scraper in the library, so swapping the slug is the only change.

POST ยท run and get results
curl -X POST "https://api.apify.com/v2/acts/parseforge~medicaid-formulary-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "helloWorld": 123
  }'

Examples

Input that runs as-is.

input.json
{
  "helloWorld": 123
}

Reviews

No reviews yet. Be the first.

Issues

We build and maintain this scraper, so a problem with it comes to us. Report it on the Apify listing and the thread stays attached to the scraper where the next person can find it: open an issue.

Broken and urgent, or you would rather not post in public? Write to parseforge@protonmail.com and it reaches the people who wrote it.

Related scrapers

Run Medicaid Drug Formulary Scraper on Apify All scrapers