# NLM DailyMed Drug Labels RESTful API Scraper (`plainkitbin/dailymed-spl-labels`) Actor

Get US drug label (SPL) rows by drug name from the DailyMed RESTful API as structured JSON. Not affiliated with National Library of Medicine DailyMed RESTful API.

- **URL**: https://apify.com/plainkitbin/dailymed-spl-labels.md
- **Developed by:** [PlainKit bin](https://apify.com/plainkitbin) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.56 / 1,000 dailymed label rows

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## National Library of Medicine DailyMed RESTful API Scraper

This DailyMed SPL scraper returns US drug label rows from the DailyMed RESTful API by drug name, as structured JSON, ready for drug catalogs, regulatory watch lists and pharmacy data pipelines. This Actor is not affiliated with National Library of Medicine DailyMed RESTful API.

### Introduction

Teams that keep a list of drug labels per drug name need one row per label: the set ID, the title with the labeler, the version and the published date. Pharmacy data teams, regulatory watchers, drug information app builders and analysts who track labeler and version changes all start from that list. One run searches the DailyMed drug labels for one drug name and returns up to your row limit. Each row copies the DailyMed search fields literally and adds the labeler taken from the square brackets at the end of the title. The Actor pages through the search, stops at your limit and never follows redirects.

### Input and output examples

Input for five rows of labels that match a drug name:

```json
{
  "drug_name": "lisinopril",
  "max_items": 5
}
```

One output row, as DailyMed returned it (the labeler is taken from the title brackets):

```json
{
  "labeler": "SAGENT PHARMACEUTICALS",
  "published_date": "Nov 16, 2026",
  "reason_code": "",
  "setid": "146be56d-ba0f-448a-b3b1-61a16c59ae4b",
  "spl_version": "1",
  "title": "BRIMONIDINE TARTRATE SOLUTION/ DROPS [SAGENT PHARMACEUTICALS]"
}
```

This sample row came from an unfiltered DailyMed search that was captured for this example. A run with a drug name returns rows for that drug name only.

### Pricing

Pay per event: $0.0008 per label row on the FREE plan tier. Higher Apify plan tiers pay less per row: BRONZE $0.00072, SILVER $0.00064, GOLD and PLATINUM $0.000557, DIAMOND $0.000533.

The Actor charges event dailymed-spl-row once for each row it has pushed. The row is pushed first and then charged. A failed request produces no row and no charge. A refused request (HTTP 401, 403 or 429) produces one reason row with reason_code API_REFUSED, and that row is never charged.

### Tutorial

1. Open the Actor in Apify Console and enter a drug name, for example lisinopril.
2. Set Maximum Items. The default is 10 and the hard upper bound is 100.
3. Press Start and wait for the run to finish.
4. Download the dataset as JSON, CSV or Excel from the run's output tab.

To run the Actor from code, send the same input to the Apify API with your own token. Keep the token in your environment, never in the input.

### Actor recommendations

Use this Actor with other Actors that read regulatory data when you need recall events for the same drugs. Use the rows from this Actor to build the list of drug names to search, then run this Actor once per name.

### FAQ and support

Does the Actor need an API key? No. The Actor calls the public DailyMed RESTful API and has no key input.

Does the Actor follow redirects? No. A redirect ends the run with an error, no row and no charge.

What happens when DailyMed refuses the request? The run ends with one uncharged row whose reason_code is API_REFUSED. The Actor does not retry a refusal.

Who owns the data? DailyMed publishes the labels. The NLM web policy states that works produced by the U.S. government may be freely used or reproduced without permission in the U.S. and asks users to acknowledge NLM as the source with the phrase "Source: National Library of Medicine." Labels submitted by labelers may carry their own rights, so check the label before reuse.

For questions or problems, use the Issues tab of this Actor in Apify Console.

### Configuration

| Field | Type | Default | Meaning |
| --- | --- | --- | --- |
| `drug_name` | string | none, required | Drug name to search in DailyMed drug labels, at most 100 characters. |
| `max_items` | integer | `10` | Maximum number of label rows in one run, from 1 to 100. |

# Actor input Schema

## `drug_name` (type: `string`):

Drug name to search in the DailyMed drug labels (SPL), for example lisinopril. Required, at most 100 characters.

## `max_items` (type: `integer`):

Maximum number of label rows to output in one run (prefilled default 10, hard upper bound 100).

## Actor input object example

```json
{
  "drug_name": "lisinopril",
  "max_items": 10
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items produced by this run.

# 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 = {
    "drug_name": "lisinopril",
    "max_items": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("plainkitbin/dailymed-spl-labels").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 = {
    "drug_name": "lisinopril",
    "max_items": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("plainkitbin/dailymed-spl-labels").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 '{
  "drug_name": "lisinopril",
  "max_items": 10
}' |
apify call plainkitbin/dailymed-spl-labels --silent --output-dataset

```

## MCP server setup

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

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/OFKvncBLGZB7z0l4K/builds/XMMKV0EWaVDKPRvWf/openapi.json
