# FDA Warning Letters (`fda.warning_letters`)

FDA warning letters as posted on fda.gov: company, issuing office, subject, letter and posted dates, letter link and any response or close-out letter, newest first.

Docs: https://primaryapi.com/docs/api-reference/fda/warning_letters

- Endpoint: `POST https://api.primaryapi.com/v1/run/fda.warning_letters`
- Category: Compliance & Records · Platform: `fda` · Kind: list · Status: live
- Price: 1 credit per call. Every call costs the same, including calls that were retried automatically.
- Billing unit: per successful call
- Reliability: routed to a healthy upstream and retried automatically when an attempt fails; live 30-day status: `GET https://api.primaryapi.com/v1/status/apis?sku=fda.warning_letters`
- Execution: synchronous (answers 202 only if it outlives the wait window)

## Input

| Field | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
| `company` | string | no |  | max 120 chars | Company name contains this text (case and punctuation ignored), for example "Walgreen" or "Medtronic". |
| `issuingOffice` | string | no |  | max 120 chars | Issuing office contains this text, for example "Center for Devices" or "Human Foods Program". |
| `subject` | string | no |  | max 120 chars | Subject contains this text, for example "CGMP" or "Unapproved New Drugs". |
| `dateFrom` | string | no |  | pattern: ^\d{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[12]\d\|3[01])$ | Only records whose posted date is on or after this date (YYYY-MM-DD). Default: 90 days before dateTo. |
| `dateTo` | string | no |  | pattern: ^\d{4}-(0[1-9]\|1[0-2])-(0[1-9]\|[12]\d\|3[01])$ | Only records whose posted date is on or before this date (YYYY-MM-DD). Default: today (UTC). |
| `limit` | integer | no | 25 | 1–100 | Maximum number of results to return (1-100, default 25). |
| `cursor` | string | no |  |  | Opaque pagination cursor: pass the previous response's nextCursor. |

Unknown fields are rejected with `400 invalid_input`. The routing controls `preferLatencyUnderMs` and `maxCredits` may be sent in the same JSON body.

## Output

When `output.found` is `true`, `output.data` has this shape:

| Field | Type | Description |
|---|---|---|
| `letters` | object[] | Matching letters, newest posted date first |
| `letters[].letterId` | string | FDA letter id (the number in the letter URL) |
| `letters[].companyName` | string |  |
| `letters[].postedDate` | string | Date FDA posted the letter on fda.gov, YYYY-MM-DD |
| `letters[].letterIssueDate` | string \| null | Date on the letter, YYYY-MM-DD |
| `letters[].issuingOffice` | string \| null | FDA center or office that issued the letter |
| `letters[].subject` | string \| null | Subject line, e.g. "CGMP/Finished Pharmaceuticals/Adulterated" |
| `letters[].url` | string | Letter page on www.fda.gov |
| `letters[].responseLetterDate` | string \| null | Date of the posted response letter, YYYY-MM-DD; null when none |
| `letters[].responseLetterUrl` | string \| null |  |
| `letters[].closeoutLetterDate` | string \| null | Date of the posted close-out letter, YYYY-MM-DD; null when none |
| `letters[].closeoutLetterUrl` | string \| null |  |
| `nextCursor` | string \| null |  |

When the thing you asked about does not exist (or a search matches nothing) the call still succeeds: `output.found` is `false`, `output.data` is `null` and `output.reason` says why (`not_found`, `private`, `no_results`, …). Misses are free unless the notes below say misses are billed.

Pagination: pass the previous response’s `nextCursor` as `cursor` to get the next page; `nextCursor: null` means there are no more results.

## Example request

```bash
curl -sS -X POST "https://api.primaryapi.com/v1/run/fda.warning_letters" \
  -H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company":"USV Private","dateFrom":"2026-11-01","dateTo":"2026-11-15","limit":1}'
```

## Example response

_Values are placeholders that follow the output schema; `credits` is what this call would cost at the usual price._

```json
{
  "output": {
    "found": true,
    "data": {
      "letters": [
        {
          "letterId": "735938",
          "companyName": "USV Private Limited",
          "postedDate": "2026-11-10",
          "letterIssueDate": "2026-11-02",
          "issuingOffice": "Center for Drug Evaluation and Research (CDER)",
          "subject": "CGMP/Finished Pharmaceuticals/Adulterated",
          "url": "https://www.fda.gov/inspections-compliance-enforcement-and-criminal-investigations/warning-letters/usv-private-limited-735938-11022026",
          "responseLetterDate": null,
          "responseLetterUrl": null,
          "closeoutLetterDate": null,
          "closeoutLetterUrl": null
        }
      ],
      "nextCursor": null
    }
  },
  "provider": "PrimaryAPI",
  "credits": 1,
  "items": 1,
  "requestId": "req_01JBXK6Y2N9V8T4R3Q2P1M0A7Z",
  "nextCursor": null
}
```

## Pricing and reliability

- Usual price: 1 credit per call
- Price ceiling: the usual price, even when a call is retried. A quote’s `maxCredits` is the most a given call can cost; the `maxCredits` routing control caps it per call
- Live 30-day status, success rate, uptime and latency: `GET https://api.primaryapi.com/v1/status/apis?sku=fda.warning_letters`

## Errors to handle

`invalid_input`, `unauthorized`, `insufficient_balance`, `key_limit_reached`, `trial_cap_reached`, `forbidden`, `not_found`, `idempotency_conflict`, `rate_limited`, `all_sources_failed`, `service_unavailable`, `timeout`. See https://primaryapi.com/docs/errors.

## Notes

Letters FDA posts on fda.gov (about 3,800 online as of 2026-11-15), refreshed from the fda.gov listing at most every 30 minutes. Text filters are case-insensitive "contains" matches and combine with AND. Newest posted date first, ties by letter date then letter id (descending). A response or close-out letter appearing on an existing row changes the output, which a monitor reports. Without dateFrom the window is the 90 days up to dateTo (default today, UTC); the response hint says so. For a monitor, pin dateFrom to a fixed date (for example the day you create it): the output then changes only when a record is added or updated, never because an old one ages out of a rolling window. Empty results are free.

## Legal

Source: U.S. Food and Drug Administration, Warning Letters (https://www.fda.gov), public domain. The letter text on fda.gov is authoritative; a listed letter does not mean the matter is still open (see the close-out letter).

