# Search FDA databases

Search and read FDA databases records through the Assyro API: openFDA drug labels, approvals, adverse event reports, recalls, and device 510(k), PMA and…

Source: https://www.assyro.com/docs/sources/openfda

`GET https://api.assyro.com/v1/sources/openfda/search`

> **Note:** Preview: `api.assyro.com` is not serving production data yet. This page follows the API's published description and may change before launch.

Search and read FDA databases records from your own code: openFDA drug labels, approvals, adverse event reports, recalls, and device 510(k), PMA and classification records. Adverse event counts are reports, not incidence, and do not establish causation. Published by U.S. Food and Drug Administration; answered from Assyro's copy.

Licence: public domain (see the [terms](https://open.fda.gov/terms/)). Each record links to its page at the source.

Example: "What 510(k)s cleared the FreeStyle Libre?"

## Databases

Every search and read names one database with `dataset`.

**FDA databases databases on the Assyro API**

| Database | dataset | Refreshed |
|---|---|---|
| Drugs@FDA | `drug_approvals` | daily 12:00 UTC |
| FDA Drug Labels | `drug_label` | daily 11:00 UTC |
| FDA Adverse Event Reporting System (FAERS) | `drug_adverse_events` | daily 11:00 UTC |
| FDA Drug Shortages | `drug_shortages` | daily 12:00 UTC |
| NDC Directory | `drug_ndc` | daily 11:00 UTC |
| FDA Complete Response Letters | `complete_response_letters` | daily 12:00 UTC |
| FDA 510(k) Premarket Notifications | `device_510k` | daily 06:30 UTC |
| FDA Premarket Approvals (PMA) | `device_pma` | daily 06:30 UTC |
| FDA Product Classification | `device_classification` | daily 12:00 UTC |
| MAUDE Device Adverse Events | `device_adverse_events` | daily 11:00 UTC |
| FDA Medical Device Recalls | `device_recalls` | daily 11:00 UTC |
| FDA Establishment Registration & Device Listing | `device_registrations` | daily 11:00 UTC |
| FDA Enforcement Reports (Recalls) | `drug_recalls`, `device_enforcement`, `food_recalls` | daily 11:00 UTC |
| CFSAN Adverse Event Reporting System (CAERS) | `food_adverse_events` | daily 12:00 UTC |
| FDA Cosmetic Adverse Event Reports | `cosmetic_adverse_events` | daily 12:00 UTC |
| FDA Animal Drug Adverse Events (CVM) | `animal_adverse_events` | daily 11:00 UTC |
| FDA Tobacco Product Problem Reports | `tobacco_problem_reports` | daily 12:00 UTC |

## Search

`GET https://api.assyro.com/v1/sources/openfda/search` with any of these query parameters. Repeat a parameter for a list (`?phase=PHASE2&phase=PHASE3`). An unknown parameter is refused by name.

### Search parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `dataset` | string | yes | DRUGS. drug_label: structured product labels (indications, dosing, boxed warnings). drug_approvals: Drugs@FDA applications (NDA/ANDA/BLA), approval and supplement history. drug_ndc: NDC directory (labeler, packages, marketing category). drug_shortages: FDA drug shortage and discontinuation entries. drug_adverse_events: FAERS reports. drug_recalls: drug recall enforcement reports (class I-III). complete_response_letters: FDA complete response letters to NDAs/BLAs, full text. DEVICES. device_510k: 510(k) and De Novo decisions. device_pma: PMA approvals and supplements. device_classification: product codes with class and regulation. device_registrations: establishment registrations and their device listings. device_udi: GUDID device identifiers (UDI-DI) and attributes. device_recalls: device recalls with root cause and 510(k)/PMA numbers. device_enforcement: the same device recalls (Z-numbers) as enforcement reports, with recall class I-III. device_adverse_events: MAUDE reports. OTHER. food_recalls: food and dietary supplement recall enforcement reports. food_adverse_events: CAERS reports on foods and dietary supplements. cosmetic_adverse_events: cosmetic adverse event reports. animal_adverse_events: animal drug adverse event reports. tobacco_problem_reports: tobacco product problem reports. substances: FDA substance registry (GSRS): UNII, CAS and other codes, names, structure. |
| `query` | string | no | Free text; every word must appear somewhere in the record (e.g. "sterility", "kink"). Also finds identifiers inside records: a CAS number in substances, "761438" in complete_response_letters. |
| `productName` | string | no | Drug brand or generic name, or device name (e.g. "Keytruda", "warfarin", "catheter"). animal_adverse_events: active ingredient. substances: the exact substance name (use query for part of a name). complete_response_letters: a word or phrase in the letter. |
| `company` | string | no | Manufacturer, applicant, sponsor, labeler or recalling firm (e.g. "Merck", "Penumbra"). Not for device_classification, food_adverse_events, cosmetic_adverse_events, animal_adverse_events, tobacco_problem_reports, substances. |
| `productCode` | string | no | Three-letter FDA device product code (e.g. "DQY"). Only for device_510k, device_pma, device_classification, device_registrations, device_udi, device_recalls, device_adverse_events. |
| `dateFrom` | string | no | Earliest date, YYYY-MM-DD, on the dataset's own date: label effective date, approval or decision date, report received date, recall report/posting date, shortage update date, letter date, marketing start. Not for device_classification, device_registrations, substances. |
| `dateTo` | string | no | Latest date, YYYY-MM-DD, same date as dateFrom. |
| `dateField` | string | no | Adverse event reports: the date dateFrom/dateTo, the order and countBy year use. received (default); event: when the event happened (device_adverse_events); latest: latest information received (drug_adverse_events). One of: `received`, `event`, `latest`. |
| `eventType` | string | no | Outcome the report states. device_adverse_events: death, injury, malfunction, other. One of: `death`, `injury`, `malfunction`, `other`. |
| `seriousness` | string | no | Serious or not, or one serious outcome. drug_adverse_events: serious, not_serious, death, life_threatening, hospitalization, disability, congenital_anomaly, other_serious. One of: `serious`, `not_serious`, `death`, `life_threatening`, `hospitalization`, `disability`, `congenital_anomaly`, `other_serious`. |
| `reportSource` | string | no | Who sent the report. drug_adverse_events: physician, pharmacist, other_health_professional, lawyer, consumer. device_adverse_events: manufacturer, user_facility, distributor, voluntary. One of: `physician`, `pharmacist`, `other_health_professional`, `lawyer`, `consumer`, `manufacturer`, `user_facility`, `distributor`, `voluntary`. |
| `deviceProblem` | string | no | device_adverse_events: one term exactly as countBy device_problem lists it (e.g. "Break"), case included. |
| `patientProblem` | string | no | device_adverse_events: one term exactly as countBy patient_problem lists it (e.g. "Break"), case included. |
| `countBy` | string | no | Adverse event datasets only. drug_adverse_events: reaction, drug, country, year. device_adverse_events: device_problem, patient_problem, event_type, device_brand, year. food_adverse_events: reaction, outcome. cosmetic_adverse_events: reaction, outcome. animal_adverse_events: reaction, drug, species, outcome. tobacco_problem_reports: health_problem, product_problem. Returns the top terms with report counts (year: reports per year over the chosen date, newest first); the other filters narrow which reports are counted. One of: `reaction`, `drug`, `country`, `outcome`, `device_problem`, `patient_problem`, `event_type`, `device_brand`, `species`, `health_problem`, `product_problem`, `year`. |
| `limit` | integer | no | Records (or terms) to return, 1 to 10; default 8. |

Each result is a record; read one in full with [Get a record](https://www.assyro.com/docs/sources/openfda/records).

## What a record holds

- `id`, `title`, `url`: the source's identifier, its title and its page at the source, to verify it.
- `authority`, `publishedDate`, `version`: who published it, when, and the edition read.
- `snippet` and `fields`: the matching text and the source's own fields.
- `asOf`: the day Assyro's copy of the source was read.

## Example request

curl:

```bash
curl "https://api.assyro.com/v1/sources/openfda/search?dataset=device_510k&productName=FreeStyle+Libre"
```

Python:

```python
import requests

response = requests.get(
    "https://api.assyro.com/v1/sources/openfda/search",
    params={
        "dataset": "device_510k",
        "productName": "FreeStyle Libre"
    },
)
response.raise_for_status()
print(response.json())
```

JavaScript:

```javascript
const response = await fetch("https://api.assyro.com/v1/sources/openfda/search?dataset=device_510k&productName=FreeStyle+Libre");
const result = await response.json();
```
