DailyMed Drug Labels Scraper avatar

DailyMed Drug Labels Scraper

Pricing

from $0.86 / 1,000 item extracteds

Go to Apify Store
DailyMed Drug Labels Scraper

DailyMed Drug Labels Scraper

Search official DailyMed labels and export current SPL identities, NDCs, ingredients, dosage forms, manufacturers, warnings, normalized sections, dates, and source URLs.

Pricing

from $0.86 / 1,000 item extracteds

Rating

0.0

(0)

Developer

Automation Lab

Automation Lab

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Categories

Share

Search DailyMed drug labels and export current Structured Product Labeling (SPL) records from the official U.S. National Library of Medicine service. Each result combines label identity, product and package NDCs, ingredients, dosage forms, manufacturer, warning sections, normalized label sections, dates, and authoritative source links.

The Actor uses DailyMed's public REST and XML services directly. It needs no API key, browser, login, or proxy.

What can you do with this Actor?

  • Search current labels by brand name, generic drug name, or NDC.
  • Resolve an exact SPL set ID or DailyMed label URL.
  • Build recurring snapshots for pharmaceutical research and safety-data pipelines.
  • Export normalized warning, contraindication, and precaution sections.
  • Join SPL identity, product identifiers, ingredients, forms, and source documents in one row.

The Actor creates current snapshots. Schedule repeated runs and compare datasets in your own workflow when you need change monitoring; it does not send alerts or calculate diffs itself.

Who is it for?

Pharmaceutical researchers can collect consistent label evidence for analysis. Drug-safety and regulatory teams can refresh warning and section text. Data engineers can feed stable SPL IDs and NDC fields into warehouses. Healthcare software teams can resolve source records without implementing HL7 SPL XML parsing.

This is source data, not medical advice and not a substitute for professional clinical or regulatory judgment.

Data extracted

FieldMeaning
setId, splId, splVersionStable label set, current document, and version identities
title, documentTypeOfficial label title and SPL document type
effectiveDate, publishedDateDates exposed by the SPL and DailyMed index
manufacturerRepresented label organization
productNames, genericNamesProduct and generic medicine names
dosageFormsCoded dosage-form display names
productNdcCodes, packageNdcCodesProduct-level and package-level NDC identifiers
ingredientsNames, UNII codes, display strengths, source classCode, role (active/inactive/other), and source numerator/denominator values and units
warningsWarning, contraindication, and precaution sections
sectionsAll normalized coded label sections when requested
sourceUrl, xmlUrl, pdfUrlHuman-readable and downloadable official sources
scrapedAtUTC extraction timestamp

Getting started

  1. Open the Actor in Apify Console.
  2. Enter one or more drug/NDC searches, SPL set IDs, or DailyMed URLs.
  3. Choose whether to include every normalized section.
  4. Set maxItems to bound the dataset and run cost.
  5. Click Start and open the default dataset.
  6. Export JSON, CSV, Excel, XML, or RSS through Apify dataset exports.

A useful first input is:

{
"queries": [{ "term": "aspirin", "type": "drugName" }],
"maxItems": 10,
"includeSections": true
}

Input parameters

queries

An array of { "term", "type" } searches. drugName searches brand and generic terms using DailyMed's matching rules, not local exact-phrase matching. ndc interprets the term as an NDC. Searches run in input order; their union is deduplicated case-insensitively by set ID. Exact set IDs take priority, followed by label URLs, then searches. Discovery stops once the global eligible unique-label budget is filled; it is skipped when exact inputs already fill that budget.

setIds

An array of exact UUID-form DailyMed SPL set IDs. Use this for reproducible identity-based retrieval.

labelUrls

DailyMed label URLs containing a valid setid. URLs from other hosts fail validation.

publishedAfter

An optional inclusive YYYY-MM-DD calendar-day filter for discovered search results. It is sent to DailyMed as published_date with comparison gte, then checked defensively before filling the unique-result limit. Exact set IDs and label URLs always bypass this search-only filter, including when the same ID also appears in a search. Their index publication date may be absent.

includeSections

Defaults to true. Disable it for smaller rows when you only need identity, product fields, ingredients, and the always-included warning-related sections.

maxItems

Maximum unique labels saved across all inputs, after deduplication and search-date filtering, from 1 to 1,000. The default is 25. A genuine exhausted search can return fewer labels. Pages use a stable size within each search. Discovery has a global 100-page safety bound (at most 10,000 candidates); reaching it without filling the budget or exhausting all searches fails clearly instead of claiming a complete export. Split unusually overlapping searches into separate runs. Runtime and run-charge limits also apply. The default timeout is 300 seconds; for large snapshots, allow a longer timeout in Console Run options because upstream Retry-After waits consume runtime.

Example output

{
"setId": "7ce4807e-7bd5-41f1-a9c7-1f3af6acdc09",
"splId": "63a94bb1-ef72-4982-b862-567d4a2949ad",
"splVersion": 6,
"title": "Drug Facts",
"documentType": "HUMAN OTC DRUG LABEL",
"effectiveDate": "2026-09-09",
"publishedDate": "Sep 10, 2026",
"manufacturer": "Strategic Sourcing Services LLC",
"productNames": ["Low Dose Aspirin"],
"genericNames": ["Aspirin"],
"dosageForms": ["TABLET, COATED"],
"productNdcCodes": ["70677-1150"],
"ingredients": [{ "name": "ASPIRIN", "unii": "R16CO5Y76E", "strength": "81 mg", "classCode": "ACTIB", "role": "active", "numeratorValue": "81", "numeratorUnit": "mg", "denominatorValue": "1", "denominatorUnit": "1" }],
"warnings": [{ "code": "50565-1", "title": "Warnings", "text": "..." }],
"sourceUrl": "https://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?setid=7ce4807e-7bd5-41f1-a9c7-1f3af6acdc09"
}

Long section text is shortened above only for readability. Dataset rows contain normalized plain text in source reading order, not rendered HTML. Warning-related child sections remain available even when their own titles do not repeat the parent warning heading.

Ingredient quantities are source strings, not calculated clinical equivalences. classCode is the SPL ingredient code: ACTIB, ACTIM, and ACTIP map to role: "active"; IACT maps to "inactive"; other or missing codes map to "other". Missing quantities stay absent. For example, the public liquid label 2771d699-3f70-4318-e063-6394a90a89cc includes these ingredient excerpts:

[
{ "name": "ACETAMINOPHEN", "classCode": "ACTIB", "role": "active", "strength": "325 mg per 15 mL", "numeratorValue": "325", "numeratorUnit": "mg", "denominatorValue": "15", "denominatorUnit": "mL" },
{ "name": "SORBITOL", "classCode": "IACT", "role": "inactive" }
]

Dimensional denominators are retained even at a value of 1 (for example, per 1 mL). Only a unitless denominator of 1 is omitted from the display string; structured source fields are still retained.

How much does it cost to extract DailyMed drug labels?

Pay-per-event billing has a small one-time Actor start fee plus one item event for each successfully parsed label saved. Failed, duplicate, or filtered labels are not charged as items. Your Apify plan determines the active event tier shown in Console.

At the BRONZE rate of $0.00144 per label plus the $0.002 start event, 10 labels cost about $0.0164, 100 cost about $0.146, and 1,000 cost about $1.442. Platform compute is included under PPE billing. Check the live pricing panel before a production run because published prices and plan tiers can change.

Reliability and limits

DailyMed is the authoritative upstream source and controls freshness, availability, fields, and rate limits. The Actor makes at most three attempts for network, HTTP 429, and server failures, with bounded exponential backoff and jitter. A supplied Retry-After is honored up to 60 seconds per retry. Permanent client errors fail after one attempt. Invalid JSON/XML is not retried as a transport failure. Repeated pages, invalid pagination, and mismatched XML label identity fail clearly.

An exhausted request fails the run rather than reporting a partial extraction as successful. Rows already saved before a failure remain in the dataset and retain their item charges; failed runs do not roll them back. The Actor saves small ordered batches of at most 10 parsed labels to reduce platform overhead. A run-charge limit stops further saved output using the SDK's charge-aware dataset path; it does not fetch additional labels beyond the remaining item budget. Inspect the terminal status before treating a dataset as a complete snapshot.

Runs log bounded index/detail request, retry, duplicate/filtered candidate, and saved-item counters. Failed operations send sanitized diagnostic input, exceptions, operational counters, and Actor/build/run IDs to our private GlitchTip service for repair. Secret fields, drug-search terms, and URL queries are removed. Reports are retained for 30 days.

Only current SPL documents are fetched. Historical version archives, label diffs, clinical interpretation, pill-image recognition, adverse-event records, and automated notifications are outside this Actor's scope.

Tips for recurring pharmaceutical research

  • Store setId and splVersion as your comparison keys.
  • Use publishedAfter and conservative limits for frequent scheduled refreshes.
  • Disable includeSections if downstream work needs identifiers rather than full text.
  • Keep the official sourceUrl beside transformed data for auditability.
  • Use Apify webhooks to trigger your own database load or comparison job after a scheduled run.

Apify API with cURL

curl -X POST "https://api.apify.com/v2/acts/automation-lab~dailymed-drug-labels-spl-records/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"queries":[{"term":"aspirin","type":"drugName"}],"maxItems":10}'

JavaScript API example

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/dailymed-drug-labels-spl-records').call({
queries: [{ term: 'acetaminophen', type: 'drugName' }],
maxItems: 25,
includeSections: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python API example

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/dailymed-drug-labels-spl-records').call(run_input={
'setIds': ['7ce4807e-7bd5-41f1-a9c7-1f3af6acdc09'],
'includeSections': True,
'maxItems': 1,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Use with MCP and AI agents

Add the Actor to Claude Code:

claude mcp add --transport http apify \
"https://mcp.apify.com?tools=automation-lab/dailymed-drug-labels-spl-records"

Claude Desktop, Cursor, and VS Code setup

Use this HTTP MCP configuration in Claude Desktop, Cursor, or VS Code:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=automation-lab/dailymed-drug-labels-spl-records"
}
}
}

Example prompts: “Fetch the current SPL for this DailyMed set ID and summarize which warning sections changed in my stored copy” or “Export the first 20 current acetaminophen labels with NDC and manufacturer fields.” Treat model summaries as secondary analysis, not source or medical advice.

Integrations

Connect datasets to Google Sheets, Make, Zapier, webhooks, cloud storage, SQL warehouses, or custom applications. Stable keys make the output suitable for upserts, while splVersion and dates support downstream comparison logic.

Legality and responsible use

This Actor is an independent Automation Lab tool, not affiliated with or endorsed by NLM, DailyMed, or Apify. It uses no AI models and sends no label data to an AI provider. Public source snapshots are saved in your Apify run dataset; retention and deletion follow your account/platform settings, not a separate Actor cache. Delete the run storage in Console or through the API when no longer needed. For help, open the Actor's Issues tab with the run link and a non-sensitive description; do not post private health information.

DailyMed provides public label information. Follow NLM/DailyMed terms and attribution guidance, respect service capacity, and keep source links. Do not use output alone for diagnosis, prescribing, dispensing, treatment, or emergency decisions. Validate material regulatory conclusions against the current official document and qualified experts.

Troubleshooting

Why did my run return no labels? Check whether the drug spelling or NDC format appears in DailyMed. An empty genuine search is valid. Try a broader drug-name term.

Why was my input rejected? SPL IDs must be full UUIDs, and explicit URLs must use dailymed.nlm.nih.gov and contain a valid set ID.

Why did the run fail after some upstream errors? DailyMed may be unavailable or rate-limiting traffic. Retry later or lower the scheduled frequency. No proxy setting is required or exposed.

Why is a section absent? SPL content varies by document type and labeler. The Actor only emits sections present in the current source XML.

FAQ

Does this Actor use the official DailyMed API?

Yes. Discovery uses the official DailyMed v2 REST index, and details come from the official current SPL XML resource.

Can it retrieve labels by NDC?

Yes. Set a query's type to ndc. The output includes product and package NDCs found in the resolved SPL.

Does it monitor label changes automatically?

It produces timestamped current snapshots that work well in scheduled tasks. Diffing, persistence between datasets, alert rules, and notifications remain downstream responsibilities.

Are warnings normalized?

Warning, contraindication, and precaution sections are selected from coded/title sections and emitted as structured { code, title, text } objects. The complete normalized section list is optional.

Is this medical advice?

No. Output is public source data for research and automation. Consult qualified professionals and the current official label for decisions.

These Actors solve separate jobs and do not enrich or validate DailyMed records automatically.