OpenFDA Drug Product Label¶
Queries the OpenFDA Drug Label endpoint to retrieve labeling information such as warnings, adverse reactions, and precautions. Supports both search and count actions with optional exact matching. Returns results and response metadata as JSON strings.

Usage¶
Use this node when you need authoritative drug labeling data from the FDA, e.g., to look up warnings, adverse reactions, or instructions for use for a specific drug. Typical workflow: set a target field (like "warnings"), provide a search term (e.g., a drug name), choose between search or count, optionally enable exact match, and set a result limit. The outputs can be fed into downstream parsing, analysis, or display nodes.
Inputs¶
| Field | Required | Type | Description | Example | 
|---|---|---|---|---|
| field_value | True | STRING | The value to query for within the selected field (e.g., a drug name or keyword). | aspirin | 
| field | True | ENUM | The product label field to query. Options map to OpenFDA label fields. | warnings | 
| action | True | ENUM | Choose between 'search' to retrieve matching records or 'count' to get aggregated counts for the selected field. | search | 
| exact_match | True | BOOLEAN | If true, performs an exact match against the selected field. If false, uses a broader query. | false | 
| limit | True | INT | Maximum number of results to return (min 1). For 'count', limits the number of buckets returned by the API. | 5 | 
Outputs¶
| Field | Type | Description | Example | 
|---|---|---|---|
| results | STRING | JSON string of the OpenFDA results array for the query. | [{...}, {...}] | 
| metadata | STRING | JSON string of the OpenFDA response metadata (e.g., paging, disclaimers). | {"disclaimer": "...", "results": {"skip": 0, "limit": 5, "total": 1234}} | 
Important Notes¶
- Field options: The selectable fields include abuse, adverse reactions, components, drug interactions, effective time, general_precautions, instructions for use, nursing_mothers, overdosage, precautions, and warnings.
- Exact match behavior: Enabling exact_match applies an exact match query on the chosen field, which may significantly narrow results.
- API endpoint: Queries the OpenFDA Drug Label endpoint (/drug/label.json).
- Rate limits: The OpenFDA API enforces rate limiting; frequent or large queries may be throttled.
- Output format: Both outputs are JSON strings; parse them downstream if structured access is needed.
Troubleshooting¶
- Empty results: Try disabling exact_match, adjusting the field, or using a broader field_value.
- Network error: If the API is unreachable or times out, the node returns an error JSON string. Retry later or check connectivity.
- JSON decode error: Indicates an unexpected response format; try again or validate the API status.
- Unexpected field behavior: Ensure the selected field aligns with the intended OpenFDA label attribute; switching fields (e.g., from warnings to adverse reactions) can improve results.
- Count results interpretation: When using 'count', remember the results represent aggregated buckets; 'limit' controls how many buckets are returned.