# DailyMed Drug Label Scraper - FDA SPL, NDC & Labeler Data (`ninhothedev/dailymed-scraper`) Actor

$0.5/1K 🔥 DailyMed scraper! FDA drug labels — brand, generic, labeler, NDC & packaging. No key. JSON, CSV, Excel or API in seconds. Power pharmacy data & compliance ⚡

- **URL**: https://apify.com/ninhothedev/dailymed-scraper.md
- **Developed by:** [ninhothedev](https://apify.com/ninhothedev) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## DailyMed Drug Label Scraper — FDA SPL, NDC & Labeler Data

Scrape **FDA drug labels (Structured Product Labeling / SPL)** from [DailyMed](https://dailymed.nlm.nih.gov/), the official NIH / U.S. National Library of Medicine drug label database. Search by drug name or pull labels in bulk and get clean, structured JSON, CSV or Excel — **no API key, no login, no proxies required**.

DailyMed is the authoritative source for every prescription and over-the-counter drug label marketed in the United States (150,000+ SPL documents). This Actor turns those labels into a ready-to-use dataset: brand name, generic name, labeler (the company that markets the drug), dosage form, SPL version, publication date, NDC codes and package descriptions.

### What you get

| Field | Description |
| --- | --- |
| `setid` | DailyMed SPL set ID (stable UUID for the label) |
| `title` | Full SPL title as published by DailyMed |
| `spl_version` | Label version number (increments on every revision) |
| `published_date` | Publication date, normalized to ISO `YYYY-MM-DD` |
| `brand_name` | Brand / trade name parsed from the title |
| `generic_name` | Generic / active ingredient name |
| `labeler` | Labeling company (manufacturer, repackager or distributor) |
| `dosage_forms` | Dosage form, e.g. `TABLET, FILM COATED`, `CREAM`, `INJECTION` |
| `ndc_count` | Number of National Drug Codes on the label |
| `ndcs` | NDC codes (up to 20) |
| `packages` | Package descriptions, e.g. `150 in 1 BOTTLE, PLASTIC` |
| `detail_url` | Direct link to the label on DailyMed |
| `source` | Always `dailymed` |
| `scraped_at` | UTC timestamp of the scrape |

#### Sample output

```json
{
  "setid": "955484a6-2a7a-4b15-a9b4-e888ed5de04c",
  "title": "ASPIRIN TABLET [DOLGENCORP, LLC]",
  "spl_version": 16,
  "published_date": "2026-07-20",
  "brand_name": "ASPIRIN",
  "generic_name": "Aspirin",
  "labeler": "DOLGENCORP, LLC",
  "dosage_forms": "TABLET",
  "ndc_count": 1,
  "ndcs": ["55910-249-29"],
  "packages": ["150 in 1 BOTTLE, PLASTIC"],
  "detail_url": "https://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?setid=955484a6-2a7a-4b15-a9b4-e888ed5de04c",
  "source": "dailymed",
  "scraped_at": "2026-07-28T12:34:59.010599+00:00"
}
```

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `mode` | select | `labels` | `labels` = search SPL labels by drug name, `detail` = look up specific setids |
| `drugName` | string | — | Drug name to search, e.g. `aspirin`. Empty = all labels, newest first |
| `setids` | array | `[]` | SPL setids to resolve in `detail` mode |
| `fetchNdcs` | boolean | `false` | Also fetch NDC codes for each label (one extra request per label) |
| `maxItems` | integer | `200` | Maximum labels to return (max 2000) |

#### Example: all aspirin labels with NDC codes

```json
{
  "mode": "labels",
  "drugName": "aspirin",
  "fetchNdcs": true,
  "maxItems": 500
}
```

#### Example: look up specific labels

```json
{
  "mode": "detail",
  "setids": ["955484a6-2a7a-4b15-a9b4-e888ed5de04c"]
}
```

### Pricing

Pay-per-result: **~$0.50 per 1,000 drug labels**. A 200-label test run costs about $0.10. No subscription, no API key, no proxy costs — DailyMed is a free public NIH service and this Actor talks to it directly.

### Use cases

- **Pharmacy data** — build and refresh a drug catalog with NDC codes, package sizes and labelers for pharmacy or e-commerce systems.
- **Drug labeling** — monitor SPL versions and publication dates to detect when a competitor or supplier revises a label.
- **Healthcare apps** — power medication search, drug lookup and patient-facing information features with authoritative FDA label data.
- **Compliance** — track which companies label which products, verify NDC codes against the official source, and keep audit-ready records.

### How it works

The Actor calls the official DailyMed web services (v2) at `dailymed.nlm.nih.gov/dailymed/services/v2/`, paginates through `spls.json` results, and optionally enriches each label with `ndcs.json` and `packaging.json`. Requests use a Chrome TLS fingerprint with a plain-HTTP fallback, retries with exponential backoff, and never crash on unusual label titles.

### FAQ

**Do I need an API key?** No. DailyMed is a free public service from the U.S. National Library of Medicine.

**Do I need proxies?** No. Datacenter IPs work fine.

**How fresh is the data?** DailyMed publishes label updates daily; the Actor always reads the live database.

**Can I get the full label text?** This Actor returns label metadata, NDC and packaging data. Full SPL narrative sections (indications, warnings, dosage) are not included.

**Is this legal?** Yes — DailyMed data is U.S. government public-domain information provided for public reuse.

### Related Actors

- [RxNorm Scraper](https://apify.com/ninhothedev/rxnorm-scraper) — normalized drug names, RxCUIs and ingredient relationships
- [openFDA Scraper](https://apify.com/ninhothedev/openfda-scraper) — adverse events, recalls and FDA enforcement data
- [ChEMBL Scraper](https://apify.com/ninhothedev/chembl-scraper) — bioactivity and chemical compound data
- [Clinical Trials Scraper](https://apify.com/ninhothedev/clinical-trials-scraper) — ClinicalTrials.gov study records

***

Data source: [DailyMed](https://dailymed.nlm.nih.gov/), U.S. National Library of Medicine. This Actor is not affiliated with NIH, NLM or the FDA.

# Actor input Schema

## `mode` (type: `string`):

What to scrape. 'labels' searches DailyMed SPL labels by drug name (or lists every label when no drug name is given). 'detail' resolves the exact SPL setids you provide and returns their label metadata plus NDC and packaging data.

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

Drug name to search for in 'labels' mode, for example 'aspirin', 'ibuprofen' or 'metformin'. Matches brand and generic names. Leave empty to scrape all DailyMed labels (newest first).

## `setids` (type: `array`):

List of DailyMed SPL setids (UUIDs) to look up in 'detail' mode, e.g. '955484a6-2a7a-4b15-a9b4-e888ed5de04c'. You can copy them from a DailyMed drugInfo.cfm URL or from a previous 'labels' run. Ignored in 'labels' mode.

## `fetchNdcs` (type: `boolean`):

Fetch the National Drug Code (NDC) list for every label. This adds one extra request per label, so runs are slower but each item then includes ndc\_count and up to 20 NDC codes. Detail mode always returns NDCs from the packaging endpoint.

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

Maximum number of drug labels to push to the dataset. Keeps runs cheap and predictable. Minimum 1, maximum 2000.

## Actor input object example

```json
{
  "mode": "labels",
  "drugName": "aspirin",
  "setids": [],
  "fetchNdcs": false,
  "maxItems": 200
}
```

# 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 = {
    "setids": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("ninhothedev/dailymed-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 = { "setids": [] }

# Run the Actor and wait for it to finish
run = client.actor("ninhothedev/dailymed-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "setids": []
}' |
apify call ninhothedev/dailymed-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ninhothedev/dailymed-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/pJhiavNmDySsd4dUg/builds/TqpI23NwnP3en2BIA/openapi.json
