> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oneshotagent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Drug Shortages

> Say whether the US Food and Drug Administration lists a drug as in shortage, and for each listed presentation who makes it, whether it is available and why it is short.

Say whether the US Food and Drug Administration lists a drug as in shortage, from a drug name matched against the generic name and the brand name. A name of several words is matched as a phrase. `status` narrows the list to `current` shortages, drugs `to_be_discontinued` or shortages that are `resolved`. Each listed presentation gives the generic name, the brand names, the company, the status, whether it is available, the dosage form, the presentation and its package NDC, the therapeutic categories, the reason it is short, any related information and the dates it was first posted and last updated. Most recently updated first. `total` is how many presentations matched, including any beyond `limit`, and is 0 when the drug is not on the list. A drug that is not listed is not in shortage on this list, which says nothing about a particular pharmacy's stock. The source says its data must not be relied on for decisions about medical care.

## Authentication

Requires x402 payment in the `payment-signature` header.

## Request Body

<ParamField body="drug_name" type="string" required>
  The drug's generic or brand name, for example quinapril or sodium chloride. 2 to 100 characters.
</ParamField>

<ParamField body="status" type="string">
  Only presentations with this status: current, to\_be\_discontinued or resolved. Default all three. One of `current`, `to_be_discontinued`, `resolved`.
</ParamField>

<ParamField body="limit" type="integer">
  The most presentations to return. Default 10. From 1 to 25. Defaults to `10`.
</ParamField>

<Snippet file="audit-context-params.mdx" />

## Response (200 OK)

Top-level envelope: `success` (boolean) and `data` (object). All fields below are nested under `data`.

<ResponseField name="data.request_id" type="string">
  Durable job ID for audit and lookup
</ResponseField>

<ResponseField name="data.status" type="string">
  Job status: `completed`
</ResponseField>

<ResponseField name="data.tool" type="string">
  Always `product_drug_shortages`
</ResponseField>

<ResponseField name="data.result" type="object">
  The answer, described under Result below
</ResponseField>

<ResponseField name="data.evidence" type="object">
  Where the answer came from and when
</ResponseField>

<ResponseField name="data.evidence.source" type="string">
  The public body the data comes from. Always `US Food and Drug Administration`.
</ResponseField>

<ResponseField name="data.evidence.source_kind" type="string">
  `public` when the data comes from a public body, `commercial` otherwise
</ResponseField>

<ResponseField name="data.evidence.retrieved_at" type="string">
  When the lookup was made, as an ISO 8601 UTC time
</ResponseField>

<ResponseField name="data.evidence.as_of" type="string">
  When the source says the fact was last updated, or `null` when the source gives no date
</ResponseField>

## Result

Nested under `data.result`.

<ResponseField name="data.result.total" type="number">
  How many presentations matched, including any beyond `limit`.
</ResponseField>

<ResponseField name="data.result.shortages" type="object[]">
  The matching presentations, most recently updated first.
</ResponseField>

<ResponseField name="data.result.shortages[].generic_name" type="string">
  The generic name, with the dosage form. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.shortages[].brand_names" type="string[]">
  The brand names.
</ResponseField>

<ResponseField name="data.result.shortages[].company" type="string">
  The company that makes it. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.shortages[].status" type="string">
  Current, To Be Discontinued or Resolved. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.shortages[].availability" type="string">
  Whether it is available, for example Unavailable or Limited Availability. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.shortages[].dosage_form" type="string">
  The dosage form, for example Tablet. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.shortages[].presentation" type="string">
  The strength and package. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.shortages[].package_ndc" type="string">
  The package National Drug Code. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.shortages[].therapeutic_categories" type="string[]">
  The therapeutic categories.
</ResponseField>

<ResponseField name="data.result.shortages[].reason" type="string">
  Why it is short. Null when the source gives none. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.shortages[].related_info" type="string">
  Related information from the source. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.shortages[].first_posted_on" type="string">
  The date it was first posted, YYYY-MM-DD. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.shortages[].updated_on" type="string">
  The date it was last updated, YYYY-MM-DD. `null` when the source gives no value.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://win.oneshotagent.com/v1/tools/lookup/product-drug-shortages \
    -H "Content-Type: application/json" \
    -H "payment-signature: <base64 x402 payment>" \
    -d '{
      "drug_name": "quinapril",
      "status": "current",
      "limit": 1
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://win.oneshotagent.com/v1/tools/lookup/product-drug-shortages", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "payment-signature": paymentProof,
    },
    body: JSON.stringify({
      "drug_name": "quinapril",
      "status": "current",
      "limit": 1
    }),
  });
  ```

  ```typescript SDK theme={null}
  const result = await agent.tool('lookup/product-drug-shortages', {
    drug_name: 'quinapril',
    status: 'current',
    limit: 1
  });
  console.log(result.data.result);
  console.log(result.data.evidence);
  ```
</RequestExample>

<ResponseExample>
  ```json Response (200) theme={null}
  {
    "success": true,
    "data": {
      "request_id": "uuid",
      "receipt_id": "rcpt_...",
      "status": "completed",
      "tool": "product_drug_shortages",
      "result": {
        "total": 22,
        "shortages": [
          {
            "generic_name": "Quinapril Hydrochloride Tablet",
            "brand_names": [
              "QUINAPRIL"
            ],
            "company": "Aurobindo Pharma USA",
            "status": "Current",
            "availability": "Unavailable",
            "dosage_form": "Tablet",
            "presentation": "Quinapril Hydrochloride, Tablet, 40 mg (NDC 65862-620-90)",
            "package_ndc": "65862-620-90",
            "therapeutic_categories": [
              "Cardiovascular"
            ],
            "reason": "Discontinuation of the manufacture of the drug",
            "related_info": "Discontinuation of the manufacture of the drug",
            "first_posted_on": "2023-01-19",
            "updated_on": "2025-10-02"
          }
        ]
      },
      "evidence": {
        "source": "US Food and Drug Administration",
        "source_kind": "public",
        "retrieved_at": "2026-01-15T12:00:00.000Z",
        "as_of": "2025-10-12"
      }
    }
  }
  ```
</ResponseExample>

<Info>Price: \$0.005 per lookup. See [Pricing](/pricing) for every tool.</Info>

## Notes

* Results return inline. The finished job stays available at `/v1/requests/{request_id}`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.