# openFDA Drug NDC Lookup

> openFDA Drug NDC Lookup is a paid API for AI agents from api.companyrecords-api.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-24).

Searches the FDA National Drug Code directory by brand or generic drug name and returns labeler, NDC code, dosage form, route, marketing start date, and active ingredients.

## Facts

- Endpoint: GET https://api.companyrecords-api.workers.dev/api/b2b/openfda-drug-ndc?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/openfda-drug-ndc-lookup-008849bd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-IzEiAtrBn1pj7GZ9KlEW

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability openfda-drug-ndc-lookup-008849bd
```

Example prompt: Can you look up the FDA drug NDC directory for 'aspirin' and give me the labeler company, NDC code, dosage form, and active ingredients for the top 5 results?

## When to prefer this

Choose this endpoint when you need structured FDA-authoritative data on US-marketed drugs, including labeler/manufacturer identity, NDC codes, dosage forms, routes, and active ingredient details, based on a brand or generic name query. It is ideal for pharmaceutical research, drug identification, supply chain enrichment, or regulatory compliance workflows where FDA NDC directory data is the authoritative source. Prefer it over general web search when you need machine-readable, structured drug data with consistent fields.

## Known failure modes

- Query string too short (under 2 characters) or too long (over 60 characters) returns a validation error
- Special characters beyond letters, digits, spaces, and hyphens are rejected
- Drug name not found in FDA NDC directory returns an empty results array
- Limit parameter outside 1–25 range may return an error or be clamped
- FDA upstream API unavailability causes a service error
- Very common generic names may return truncated results at the requested limit

## How this service works

Pay-per-call company registry, government, legal and B2B data tools for AI agents, from official registers and public sources. Payment: x402, USDC on Base, Solana, Arc, Polygon, Arbitrum, Monad, World Chain, Optimism, Avalanche, Celo or Stellar, or RLUSD/XRP on the XRP Ledger. No signup, no API key; a failed call is not charged.

## Output

Returns a JSON object with a count of matching records and an array of drug entries, each containing the NDC code, route of administration, labeler name, brand name, dosage form, generic name, marketing start date, and list of active ingredients with strengths. Also includes the source FDA API URL and the timestamp of the lookup.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "description": "Brand or generic name, letters, digits, spaces and - only, 2 to 60 characters"
      },
      "limit": {
       "type": "string",
       "description": "Rows to return, 1 to 25 (default 10)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 5,
  "query": "aspirin",
  "source": "https://api.fda.gov/drug/ndc.json",
  "results": [
   {
    "ndc": "0113-1855",
    "route": "ORAL",
    "labeler": "L. Perrigo Company",
    "brandName": "good sense headache relief",
    "dosageForm": "TABLET, FILM COATED",
    "genericName": "acetaminophen, aspirin, caffeine",
    "marketingStart": "2022-02-18",
    "activeIngredients": [
     "ACETAMINOPHEN 250 mg/1",
     "ASPIRIN 250 mg/1"
    ]
   },
   {
    "ndc": "69168-006",
    "route": "ORAL",
    "labeler": "Allegiant Health",
    "brandName": "Aspirin 81mg Enteric coated Low Strength Aspirin Regimen",
    "dosageForm": "TABLET, DELAYED RELEASE",
    "genericName": "Aspirin",
    "marketingStart": "2021-11-19",
    "activeIngredients": [
     "ASPIRIN 81 mg/1"
    ]
   }
  ],
  "checkedAt": "2026-10-23T09:37:38.735Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/openfda-drug-ndc-lookup-008849bd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.companyrecords-api.workers.dev](https://www.zero.xyz/host/api.companyrecords-api.workers.dev/llms.txt)
