# x402stock FDA Drug Shortages

> x402stock FDA Drug Shortages is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-24).

Retrieves current FDA drug shortage data including generic name, company, status, dosage form, therapeutic category, and reason for shortage, optionally filtered by company name.

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/fda/shortages?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-fda-drug-shortages-8e1e2ed3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5xe4UEdiY-D8qKGck5mBj

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 x402stock-fda-drug-shortages-8e1e2ed3
```

Example prompt: What drug shortages does Pfizer currently have listed with the FDA? Show me up to 50 results.

## When to prefer this

Use this endpoint when you need current FDA drug shortage data — especially when filtering by a specific pharmaceutical company — without needing an API key or subscription. Ideal for AI agents that need pay-per-use access to regulatory drug supply data, pharmaceutical research, or supply chain monitoring. Prefer over scraping the FDA website directly or using general web search when structured, machine-readable shortage data is needed.

## Known failure modes

- No shortages found for the specified company — returns empty shortages array with total_matched of 0
- Invalid limit value (<=0 or >100) — schema validation error
- Company string too short (<2 chars) or too long (>120 chars) — schema validation error
- Payment failure via x402/USDC — 402 Payment Required response
- FDA upstream data unavailable — potential 503 or stale as_of timestamp

## How this service works

Current and resolved US drug shortages from openFDA, newest update first. Optional `?company=Pfizer` narrows to one manufacturer (omit for market-wide); `?limit=` (max 100). Each carries the generic name, company, status, therapeutic category, dosage form, presentation, posting/update dates, and reason. A supply-side catalyst for generic makers. From x402stock

## Output

A JSON object containing the source ('fda'), an as_of timestamp, the company filter applied (or null), total_matched count, count of returned records, and an array of shortage records each with generic_name, company_name, status, dosage_form, presentation, therapeutic_category, posted_date, updated_date, update_type, reason, and an FDA attribution string.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "limit"
     ],
     "properties": {
      "limit": {
       "type": "integer",
       "default": 20,
       "maximum": 100,
       "exclusiveMinimum": 0
      },
      "company": {
       "type": "string",
       "maxLength": 120,
       "minLength": 2
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "source",
      "as_of",
      "company",
      "total_matched",
      "count",
      "shortages",
      "attribution"
     ],
     "properties": {
      "as_of": {
       "type": "string"
      },
      "count": {
       "type": "number"
      },
      "source": {
       "type": "string",
       "const": "fda"
      },
      "company": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "shortages": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "generic_name",
         "company_name",
         "status",
         "therapeutic_category",
         "dosage_form",
         "presentation",
         "posted_date",
         "updated_date",
         "update_type",
         "reason"
        ],
        "properties": {
         "reason": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ]
         },
         "status": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ]
         },
         "dosage_form": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"

… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "as_of": "2026-06-18T12:00:00.000Z",
  "count": 1,
  "source": "fda",
  "company": "Pfizer",
  "shortages": [
   {
    "reason": "Discontinuation of the manufacture of the drug",
    "status": "To Be Discontinued",
    "dosage_form": "Injection",
    "posted_date": "2026-06-01",
    "update_type": "New",
    "company_name": "Pfizer Inc.",
    "generic_name": "Clindamycin Phosphate Injection",
    "presentation": "Cleocin Phosphate, Injection, 600 mg/4 mL (150 mg/mL); 4 mL Vial",
    "updated_date": "2026-06-01",
    "therapeutic_category": [
     "Anti-Infective"
    ]
   }
  ],
  "attribution": "Source: openFDA, U.S. Food and Drug Administration",
  "total_matched": 297
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-fda-drug-shortages-8e1e2ed3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.xyz](https://www.zero.xyz/host/x402stock.xyz/llms.txt)
