openFDA Drug Labels Search: SPL Product Labeling
Pricing
$1.00 / 1,000 drug label records
openFDA Drug Labels Search: SPL Product Labeling
Search openFDA Structured Product Labeling by keyword, brand or generic name, manufacturer, NDC, product type, route and date. Output is compact: chosen sections, with long text trimmed. Unofficial, not affiliated with or endorsed by the FDA.
Pricing
$1.00 / 1,000 drug label records
Rating
0.0
(0)
Developer
fecklesspleb
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
9 days ago
Last modified
Categories
Features
Share
openFDA Drug Labels Search
Search Structured Product Labeling (SPL) in openFDA, the U.S. Food and Drug Administration's public API, by keyword, brand or generic name, manufacturer, product NDC, product type, route, and a date range on the label's effective time. Output is compact: only chosen sections are saved, and long section text is trimmed by maxSectionChars (default 2,000 characters), except boxed_warning and contraindications, which are never trimmed. Each result also has the document id, set id, version, effective time (ISO), brand and generic names, manufacturer, product NDC, product type, route, the openfda annotation when one is present, a source URL, and a DailyMed URL when a set_id is present.
Data provided by the U.S. Food and Drug Administration (https://open.fda.gov). Unofficial, not affiliated with or endorsed by the FDA.
Disclaimer (verbatim from openFDA)
From https://open.fda.gov/apis/drug/label/, under "Responsible use of the data":
Do not rely on openFDA to make decisions regarding medical care. Always speak to your health provider about the risks and benefits of FDA-regulated products. We may limit or otherwise restrict your access to the API in line with our Terms of Service.
Under "Disclaimer":
Please be aware of the following when using information from this API: The drug labels and other drug-specific information provided in this API represent the most recent drug listing information companies have submitted to the Food and Drug Administration (FDA). (See 21 CFR part 207.) The drug labeling and other information has been reformatted to make it easier to read but its content has neither been altered nor verified by FDA. The drug labeling provided in this API may not be the labeling on currently distributed products or identical to the labeling that is approved. Most OTC drugs are not reviewed and approved by FDA; however, they may be marketed if they comply with applicable regulations and policies described in monographs. Drugs marked 'OTC monograph final' or 'OTC monograph not final' are not checked for conformance to the monograph. Drugs marked 'unapproved medical gas', 'unapproved homeopathic' or 'unapproved drug other' have not been evaluated by FDA for safety and efficacy and their labeling has not been approved. In addition, FDA is not aware of scientific evidence to support homeopathy as effective.
What you get
| Field | Meaning |
|---|---|
recordType | item for a label record, status for a free status row (see below) |
id, set_id, version, effective_time | SPL document id, set id, version, and effective time as YYYY-MM-DD |
brand_name, generic_name, manufacturer_name, product_ndc, product_type, route | Taken from the openfda annotation when present |
| chosen sections | Only the sections you asked for (see Input). Default compact set: boxed_warning, indications_and_usage, purpose, dosage_and_administration, contraindications, warnings, warnings_and_cautions, do_not_use, ask_doctor, ask_doctor_or_pharmacist, stop_use, adverse_reactions, drug_interactions, pregnancy_or_breast_feeding, active_ingredient, inactive_ingredient, keep_out_of_reach_of_children, description |
sectionsTruncated | Names of sections that were trimmed to maxSectionChars. Trimmed sections are incomplete; read the full label (sourceUrl, or DailyMed by set_id) before relying on any section |
maxSectionChars | The trim length used for this row. boxed_warning and contraindications are never trimmed |
dailyMedUrl | DailyMed lookup URL when a set_id is present (https://dailymed.nlm.nih.gov/dailymed/lookup.cfm?setid=<set_id>) |
openfda | openFDA's annotation object when present. GMDN fields are removed. |
sourceUrl | openFDA query URL for this document id |
dataSource | Attribution and the unofficial note |
disclaimer | The required short disclaimer, with the source URL |
Unlisted sections (including long table fields and questions, which often holds a phone number or e-mail address) are omitted unless you name them in sections. E-mail addresses and phone numbers are removed from saved section text.
Input
| Field | Default | Notes |
|---|---|---|
keyword | none | Optional text search |
brandName, genericName, manufacturerName | none | Name filters (openfda fields) |
productNdc | none | Product NDC in the openfda annotation |
productType, route | none | Type and route |
sections | the compact default set above | openFDA section field names. Empty means the default set |
maxSectionChars | 2000 | 0 means do not trim; maximum 20,000. boxed_warning and contraindications are never trimmed |
dateField | effective_time | Used for the date range and sort |
dateFrom, dateTo | none | Inclusive YYYY-MM-DD range |
sort | newest | newest or oldest |
maxItems | 10 | Up to 25,000 |
onlyNew | false | When true, returns only records not seen in previous runs, identified by id, set_id and version |
stateKey | default | Name of the seen-record list used when onlyNew is true |
apiKey | none | Your own free openFDA API key (secret). Recommended, see below |
The default input ({}) returns about 10 recent labels, finishes in seconds, costs at most $0.01, and is never empty.
Why an openFDA API key helps
A key is optional. openFDA's authentication page says a key is required, but keyless calls are accepted and are limited to 240 requests per minute and 1,000 requests per day per IP address (https://open.fda.gov/apis/authentication/). On Apify, other users can share your IP address, so that daily budget can be used up by someone else. Adding your own free openFDA key raises the daily limit to 120,000 requests per key. There is no team key. The key is stored encrypted, sent only as the api_key query parameter, and never logged or saved.
If openFDA answers HTTP 429, the Actor backs off and retries a few times, then stops and writes a free status row telling you to add your own key (when the run was keyless). It does not use a proxy or rotate IP addresses.
Status rows (free)
The dataset is never empty. When nothing could be saved (no matches, invalid input, openFDA rate limit, robots.txt refusal, the 25,000 skip cap, or a maximum cost per run too low for one record), the run writes one row with recordType: "status" and a message. Status rows are never charged. Skip them in your code as shown below. Invalid input ends SUCCEEDED with a status row; nothing is requested or charged.
Pricing
Pay per event: $0.001 per record saved ($1 per 1,000). No start fee; status rows are free. The default input saves at most 10 records ($0.01). The run stops at your maximum cost per run.
Use it from code
Python (apify-client 3.x):
from apify_client import ApifyClientclient = ApifyClient('<YOUR_APIFY_TOKEN>')run = client.actor('<USERNAME>/openfda-drug-labels-search').call(run_input={'brandName': 'ibuprofen','sections': ['boxed_warning', 'indications_and_usage', 'warnings'],'maxSectionChars': 2000,'maxItems': 50,})for item in client.dataset(run.default_dataset_id).iterate_items():if item.get('recordType') != 'item':print('status:', item.get('message'))continueprint(item['effective_time'], item.get('brand_name'), item.get('indications_and_usage', '')[:80])
JavaScript (apify-client):
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });const run = await client.actor('<USERNAME>/openfda-drug-labels-search').call({brandName: 'ibuprofen',sections: ['boxed_warning', 'indications_and_usage', 'warnings'],maxSectionChars: 2000,maxItems: 50,});const { items } = await client.dataset(run.defaultDatasetId).listItems();for (const item of items) {if (item.recordType !== 'item') continue; // free status rowsconsole.log(item.effective_time, item.brand_name);}
Data source and licence
Data comes from the openFDA drug label endpoint only (https://api.fda.gov/drug/label.json). Other openFDA endpoints are not used.
openFDA terms (https://open.fda.gov/terms/, fetched 2026-11-13): unless otherwise noted, "the content, data, documentation, code, and related materials on openFDA is public domain and made available with a Creative Commons CC0 1.0 Universal dedication" and "You can copy, modify, distribute, and perform the work, even for commercial purposes, all without asking permission." Attribution is requested, not required. The example citation is: Data provided by the U.S. Food and Drug Administration (https://open.fda.gov). The licence page (https://open.fda.gov/license/) repeats the CC0 dedication and says "When using or citing the work, you should not imply endorsement by the author or the affirmer." This Actor is unofficial and is not affiliated with or endorsed by the FDA. No FDA logos are used.
GMDN content is excluded. The licence page states that GMDN Term Code, Name and Definition are supplied by The GMDN Agency under license and that extracting that content for commercial services requires a license from The GMDN Agency. This Actor drops every GMDN field, including any inside the openfda sub-object.
Each row records the source in dataSource and the short disclaimer in disclaimer.
Limits
- Paging uses
skipandlimit. openFDA documents: "Currently, the largest allowed value for the skip parameter is 25000." (https://open.fda.gov/apis/query-parameters/) and "Using combinations of the skip/limit parameters you can page through a result set that has up to 26,000 hits" (https://open.fda.gov/apis/paging/). When the next page would go past that skip cap, the run stops and writes a free status row. Narrow the search or date range rather than paging further. limitis at most 1,000 per request (openFDA's documented maximum).- Keyless runs share the per-IP daily budget; add your own key for reliable use. A 429 is retried with a short backoff, then the run stops (no proxy).
api.fda.gov/robots.txtis checked before the first request. A 4xx response counts as no rules (allowed).- Full SPL records can be large. This Actor does not save every section by default, and it trims saved section text. Trimmed sections are incomplete; read the full label (
sourceUrl, or DailyMed byset_id) before relying on any section.boxed_warningandcontraindicationsare never trimmed.