openFDA Drug NDC Directory Scraper
parseforge/openfda-drug-ndc-scraper
BusinessOtherEducation
Scrapes the FDA National Drug Code Directory via openFDA. Returns drug listings with NDC, brand name, generic name, manufacturer, and product type as flat rows.
- Total users
- 2
- Monthly active
- 1
- Total runs
- 106
- Bookmarked
- 0
- Rating
- Not rated yet
- Last modified
- 9 days ago
Overview
openFDA Drug NDC Directory Scraper
Scrape the FDA National Drug Code Directory through openFDA, up to a million records per run. Every listing returns the NDC, brand name, generic name, manufacturer, dosage form, and route. No API key required. Export to CSV, JSON, Excel, or XML.
The FDA's openFDA API for the National Drug Code (NDC) Directory requires pagination handling and JSON parsing to get a flat dataset. This Actor reads the drug listing endpoint directly, filters by brand name, generic name, manufacturer, or product type, and returns each match in one consistent row. It is built for pharmaceutical researchers, healthcare data analysts, and anyone who needs a clean, structured extract of the U.S. drug product registry.
| Who uses it | What they scrape openFDA for |
|---|---|
| Pharmaceutical market analysts | Tracking which manufacturers are producing a given generic drug and in what dosage forms. |
| Healthcare data integrators | Building a master drug database by pulling the latest NDC listings for a specific brand or manufacturer. |
| Regulatory compliance teams | Verifying current NDC codes and labeler information for a list of products. |
| E-commerce pharmacy platforms | Populating product catalogs with official FDA drug names, NDCs, and manufacturer details. |
What it does
This Actor collects drug product listings from the openFDA NDC Directory and returns each one as a flat row with its NDC, brand name, generic name, manufacturer, and product type.
- ๐ Filter by brand name: Pull all NDCs for a specific brand like Tylenol or Lipitor.
- ๐งฌ Filter by generic name: Get every listing for a non-proprietary name such as acetaminophen or atorvastatin.
- ๐ญ Filter by manufacturer: Search by labeler company name to see a firm's full product catalog.
- ๐ Filter by product type: Narrow results to Human Prescription, Human OTC, Vaccine, Bulk Ingredient, and more.
- ๐ฏ Exact NDC lookup: Enter a complete product NDC code to retrieve a single matching record.
Results export to CSV, JSON, Excel, or XML, or straight from the API.
What you can do with openFDA data
๐ Build a drug formulary database.
A health plan analyst runs the Actor with productType set to HUMAN PRESCRIPTION DRUG and a high maxItems value to compile a current list of all prescription NDCs for formulary review.
๐ญ Audit a manufacturer's product line.
A compliance officer enters a manufacturer name to pull every NDC listing for that labeler, then cross-references the output with internal supply chain records.
๐ Resolve a single NDC code.
A pharmacist enters an exact product NDC to instantly retrieve the official brand name, generic name, and manufacturer for verification.
๐ Compare OTC product listings.
A market researcher filters by HUMAN OTC DRUG and a generic name like ibuprofen to see all over-the-counter versions, their manufacturers, and dosage forms.
Why choose this scraper
| What you get | |
|---|---|
| No API key or registration | Queries the public openFDA endpoint with no authentication required. |
| Flat, consistent schema | Every drug listing is returned as a single row, ready for CSV or database import. |
| Up to 1,000,000 records | Set a high maxItems value to pull the full directory or a large filtered subset. |
| Multiple filter combinations | Combine brand name and product type, or generic name and manufacturer, to isolate exactly the records you need. |
How it compares
This Actor focuses on the openFDA NDC product directory, while the listed competitors target different FDA datasets like recalls, labeler details, or adverse events.
| Feature | ParseForge | FDA Recalls Scraper | FDA Drug NDC & Labeler Directory Scraper | openFDA Drug Adverse Events Scraper |
|---|---|---|---|---|
| NDC product directory listings | Yes | Not listed | Yes | Not listed |
| Filter by brand name | Yes | Not listed | Yes | Not listed |
| Filter by generic name | Yes | Not listed | Yes | Not listed |
| Filter by manufacturer | Yes | Not listed | Yes | Not listed |
| Filter by product type | Yes | Not listed | Not listed | Not listed |
| Drug recall enforcement data | Not listed | Yes | Not listed | Not listed |
| Drug adverse event reports | Not listed | Not listed | Not listed | Yes |
Configure the run
Drive the Actor with an exact product NDC, a brand name, a generic name, a manufacturer substring, or a product type, alone or in combination, and filters run as each record is read so only matches reach your dataset. The Input tab lists every parameter.
A first run with the defaults:
{
"maxItems": 10
}
A larger pull:
{
"maxItems": 200
}
Pricing
Pay-per-result: $0.016 per result collected. You pay only for the results written to your dataset.
| Results collected | Approximate cost |
|---|---|
| 100 results | $1.60 |
| 1,000 results | $16.00 |
| 10,000 results | $160.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
- Create a free Apify account with $5 in credit.
- Open the openFDA Drug NDC Directory Scraper.
- Set your inputs and any filters, then click Start.
- 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 openFDA 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/openfda-drug-ndc-scraper"
Then prompt it in plain language to run the scraper and read back the results.
Troubleshooting
Why am I getting no results?
Check that your filter values are spelled correctly and match the FDA's naming conventions. Try running with no filters and a small maxItems value first to confirm the endpoint is reachable, then add filters one at a time.
The run is taking a long time.
Large maxItems values with broad filters will take longer because the Actor must paginate through many API responses. Reduce maxItems or add more specific filters to speed up the run.
I got fewer results than my maxItems setting.
The Actor stops when it has fetched all matching records from the API. If your filters are narrow, the total available records may be less than your maxItems value.
The manufacturer filter is not finding the company I searched for.
The manufacturer filter uses a substring match. Try a shorter, partial name. Also verify the exact labeler name as it appears in the FDA NDC Directory.
Can I search by NDC without the dashes?
The productNdc filter expects the code in the standard format with dashes, such as 80489-001. Enter the code exactly as it appears on the product label.
FAQ
| Question | Answer |
|---|---|
| What is an NDC code? | The National Drug Code (NDC) is a unique product identifier for human drugs in the United States. It is composed of three segments: the labeler code, the product code, and the package code. |
| Do I need an API key to use this Actor? | No. This Actor queries the public openFDA API endpoint, which does not require an API key or registration. |
| Can I search by both brand name and manufacturer at the same time? | Yes. You can combine any of the filter fields, such as brandName and manufacturer, to narrow results to only the records that match all criteria. |
| What product types can I filter by? | You can filter by Human Prescription Drug, Human OTC Drug, Vaccine, Bulk Ingredient, Cellular Therapy, Plasma Derivative, Non-Standardized Allergenic, and Standardized Allergenic. |
| How many records can I pull in one run? | You can set maxItems up to 1,000,000 records. The actual number returned depends on how many records match your filters in the openFDA database. |
| Does this Actor return package-level NDC codes? | The Actor returns product-level NDC data from the openFDA NDC Directory. Package-level codes are available in the full openFDA dataset and may be included in the returned fields. |
| Is the data updated in real time? | The data comes directly from the openFDA API, which reflects the FDA's published NDC Directory. The Actor fetches fresh data on every run. |
| Can I export the results to Excel? | Yes. You can export the dataset to CSV, JSON, Excel, or XML from the Apify platform. |
| What is the difference between brand name and generic name? | The brand name is the proprietary name given by the manufacturer, such as Tylenol. The generic name is the non-proprietary active ingredient name, such as acetaminophen. |
| Can I schedule this Actor to run daily? | Yes. You can set up a scheduled run on Apify to pull the latest NDC data at any interval you choose. |
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 U.S. Food and Drug Administration. 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
| Field | Type | What it does | Default |
|---|---|---|---|
| maxItems | integer | How many drug records to collect per run. | 10 |
| productNdc | string | Exact product NDC code, e.g. 80489-001. | not set |
| brandName | string | Brand (proprietary) name, e.g. Tylenol, Advil, Lipitor. | not set |
| genericName | string | Generic (non-proprietary) name, e.g. acetaminophen, ibuprofen, atorvastatin. | not set |
| manufacturer | string | Manufacturer or labeler company name (substring match). | not set |
| productType | string (9 options) | Filter by FDA product type. | not set |
Pricing
from $12.00 per 1,000 results
| Charged for | What it is | Price each |
|---|---|---|
| Result Item | Charged once per result collected. | $0.012 to $0.016 |
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.
curl -X POST "https://api.apify.com/v2/acts/parseforge~openfda-drug-ndc-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"helloWorld": 123
}' Examples
Input that runs as-is.
{
"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 openFDA Drug NDC Directory Scraper on Apify All scrapers
