OpenFDA Drug Product Label¶
Queries the OpenFDA Drug Label endpoint to retrieve information from FDA-approved drug labeling. You can search or count results across specific label sections (e.g., warnings, adverse reactions) with optional exact matching and a configurable limit.

Usage¶
Use this node when you need structured information from FDA drug product labels, such as warnings, precautions, or adverse reactions. Typical workflow: choose the label section (field), set your search term (field_value), decide between search or count, optionally enable exact match for precise term lookups, and set the desired result limit. The node returns JSON-formatted results and metadata as strings suitable for downstream parsing or display.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| field_value | True | STRING | The search term or phrase to look for within the selected label field. | aspirin |
| field | True | CHOICE | The specific section of the drug label to query. Options map to OpenFDA label fields. | warnings |
| action | True | CHOICE | Select 'search' to retrieve matching records or 'count' to get aggregate counts grouped by the chosen field. | search |
| exact_match | True | BOOLEAN | If true, performs an exact match on the selected field (uses the field's .exact variant). | false |
| limit | True | INT | Maximum number of results to return. Must be 1 or greater. | 3 |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| results | STRING | JSON string of the OpenFDA API response results. For 'search', this is a list of matching records; for 'count', this is a list of count buckets. | [{"id": "...", "warnings": ["..."]}] |
| metadata | STRING | JSON string containing OpenFDA metadata (e.g., disclaimer, license, last_updated). | {"disclaimer": "...", "last_updated": "..."} |
Important Notes¶
- Field options: abuse, adverse reactions, components, drug interactions, effective time, general_precautions, instructions for use, nursing_mothers, overdosage, precautions, warnings.
- Exact match behavior: Enabling exact_match queries the '.exact' variant of the selected field, which can significantly reduce or refine results.
- Action differences: 'search' returns matching records; 'count' returns aggregated counts under results, not full records.
- Output format: Both outputs are JSON strings. Parse them as JSON before further structured processing.
- Limits and availability: The OpenFDA API may enforce rate limits or return empty results depending on data availability and your query parameters.
Troubleshooting¶
- No results returned: Try disabling exact_match, choosing a different field, broadening field_value, or increasing limit.
- Unexpected output shape with 'count': Remember that 'count' returns buckets (key/value pairs) under results, not full label documents.
- Network or timeout errors: Check network connectivity and retry later. The node returns JSON strings indicating an error when a network or parsing issue occurs.
- Malformed JSON when parsing: Ensure you are parsing the outputs as JSON strings. If an error JSON is returned, handle it gracefully before parsing into downstream steps.