NDC API
Look up National Drug Code (NDC) information for prescription and over-the-counter medications.
Overview
The NDC (National Drug Code) is a unique 10 or 11-digit identifier for drug products in the United States. FHIRfly provides fast lookups against the FDA NDC Directory.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /v1/ndc/:code | Single NDC lookup |
| POST | /v1/ndc/_batch | Batch NDC lookup (up to 500) |
| GET | /v1/ndc/shapes | List available response shapes |
Single Lookup
Look up Sotalol Hydrochloride by NDC
Request
curl -X GET "https://api.fhirfly.io/v1/ndc/60505008100" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Response
NDC Formats
FHIRfly accepts multiple NDC formats and normalizes them:
| Format | Example | Description |
|---|---|---|
| 11-digit | 60505008100 | Normalized format (recommended) |
| 10-digit with dashes | 6050-0081-00 | Standard hyphenated format |
| 10-digit no dashes | 6050008100 | Also accepted |
Batch Lookup
Fetch multiple NDCs in a single request (up to 500):
Look up multiple drug products
Request
curl -X POST "https://api.fhirfly.io/v1/ndc/_batch" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"codes": [
"60505008100",
"50090030300",
"43547042850"
]
}'Response
Response Shapes
Control the level of detail in responses with the shape query parameter:
| Shape | Description |
|---|---|
compact | Minimal data for lists and autocomplete |
standard | Core structured data (default) |
full | Complete data with provenance for AI agents |
# Minimal data
GET /v1/ndc/60505008100?shape=compact
# Standard data (default)
GET /v1/ndc/60505008100?shape=standard
# Full data with provenance
GET /v1/ndc/60505008100?shape=full
See Response Shapes for field details.
Required Scopes
ndc:read- Single lookupsndc:batch- Batch lookups