fda_count
Count and aggregate FDA data by specific fields across drug, device, food, veterinary, and tobacco endpoints to identify patterns and trends in regulatory information.
Instructions
Count/aggregate any OpenFDA endpoint by a specific field. Returns top terms with counts. Works on ALL FDA endpoints. IMPORTANT: Use '.exact' suffix for full phrase counts (e.g. 'brand_name.exact'). Without '.exact', multi-word values like 'Class III' are split into separate word counts.
Endpoints: drug/event, drug/label, drug/ndc, drug/enforcement, drug/drugsfda, drug/shortages, device/event, device/510k, device/classification, device/enforcement, device/recall, device/pma, device/udi, food/enforcement, food/event, animalandveterinary/event, tobacco/problem.
Example count_field values per endpoint:
drug/ndc → pharm_class.exact, dea_schedule, dosage_form.exact
drug/shortages → update_type, status.exact, therapeutic_category.exact
device/510k → country_code, advisory_committee, clearance_type.exact
tobacco/problem → tobacco_products.exact, reported_health_problems.exact
food/event → reactions.exact, outcomes.exact
animalandveterinary/event → animal.species.exact, primary_reporter.exact
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endpoint | Yes | OpenFDA endpoint path (e.g. 'drug/ndc', 'device/510k', 'tobacco/problem') | |
| count_field | Yes | Field to count. Use '.exact' for full phrases (e.g. 'pharm_class.exact') | |
| search | No | Optional search filter to narrow results before counting | |
| limit | No | Max count results (default: API default) |