# openFDA Animal & Veterinary Events Scraper (`parseforge/openfda-vet-events-scraper`) Actor

Scrapes animal and veterinary adverse event reports from openFDA. Returns each event as a flat row with drug, reaction, animal, and outcome fields. Supports Lucene search and max items control.

- **URL**: https://apify.com/parseforge/openfda-vet-events-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Other, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $19.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### openFDA Animal & Veterinary Events Scraper

**Scrape animal and veterinary adverse event reports from openFDA, up to a million per run.** Every event comes with its drug, reaction, animal species, and outcome. No API key or login. Export to CSV, JSON, Excel, or XML.

The openFDA API needs a key, rate-limits you, and returns nested JSON that is painful to flatten. This reads the public animal and veterinary adverse event endpoint directly, filters by Lucene search, and returns each event as one flat row.

| Who uses it | What they scrape openFDA Animal & Veterinary Events for |
|---|---|
| Veterinary pharmacovigilance teams | Monitor adverse reactions to animal drugs across species |
| Animal health researchers | Build datasets of drug and reaction pairs for analysis |
| Pet owners and advocates | Check reported side effects for a specific drug or species |
| Regulatory affairs consultants | Track safety signals for veterinary products |

### What it does

This Actor collects animal and veterinary adverse event reports from openFDA and returns each one as a flat row.

- 🔍 **Lucene search:** filter by animal.species, drug.brand\_name, reaction, or any openFDA field.
- 📊 **Flat rows:** each event is returned as a single record with drug, reaction, animal, and outcome fields.
- ⚙️ **Max items control:** set a hard cap from 1 to 1,000,000 events per run.
- 📦 **Multiple exports:** download as CSV, JSON, Excel, or XML from the Apify dataset.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with openFDA Animal & Veterinary Events data

**🐶 Monitor a drug's safety profile.**

A veterinary pharmacovigilance team runs the Actor weekly with a search for a specific drug brand name and reviews new adverse events for signal detection.

**📈 Build a research dataset.**

An animal health researcher collects all events for a species, exports to CSV, and joins with other data to study reaction patterns.

**🔔 Track emerging reactions.**

A regulatory consultant sets a search for a drug class and receives a flat file of recent events to include in a safety report.

**🐱 Check a pet medication.**

A pet owner searches for a drug name and species to see reported side effects before giving a new medication.

### Why choose this scraper

| | What you get |
|---|---|
| **No API key** | The openFDA API requires a key, but this Actor uses the public endpoint directly. |
| **Flattened output** | Nested JSON is converted to one row per event, ready for Excel or pandas. |
| **Full coverage** | Access all animal and veterinary adverse event reports, not a sample. |
| **Flexible filtering** | Use Lucene syntax to target species, drugs, reactions, or any field. |

### How it compares

This Actor focuses on animal and veterinary adverse events with flexible Lucene search and a high item cap, while the competitors below offer overlapping or broader FDA data coverage.

| Feature | ParseForge | FDA Animal & Veterinary Adverse Event Scraper | FDA Data Scraper - openFDA Recalls & Events |
|---|---|---|---|
| Animal and veterinary adverse events | Yes | Yes | Not listed |
| Lucene search filtering | Yes | Not listed | Not listed |
| Max items control | Yes | Not listed | Not listed |
| Date-range filtering | Yes (via Lucene search) | Yes | Not listed |
| Flattened output | Yes | Yes | Not listed |
| No API key required | Yes | Not listed | Yes |

### Configure the run

Drive the Actor with an optional Lucene search term and a maximum item count, and only matching events reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "maxItems": 10
}
```

A larger pull:

```json
{
 "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.021 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $2.10 |
| 1,000 results | $21.00 |
| 10,000 results | $210.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [openFDA Animal & Veterinary Events Scraper](https://apify.com/parseforge/openfda-vet-events-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to openFDA Animal & Veterinary Events through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/openfda-vet-events-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check your search term. Lucene syntax is strict: field names must match exactly, and values must be quoted if they contain spaces. Try a broader search or remove the search term to see all events.

**Why did the run stop before reaching maxItems?**

The openFDA API may have a limit on the number of results returned for a single query. Try narrowing your search or increasing the maxItems in steps.

**Why are some fields empty?**

Not all adverse event reports contain every field. Empty fields mean the data was not reported for that event.

**How do I search for a phrase with spaces?**

Wrap the phrase in double quotes, for example drug.brand\_name:"Heartgard Plus".

**Can I use wildcards in search?**

Yes, Lucene supports wildcards like \* and ?. For example, animal.species:Do\* matches Dog and Donkey.

### FAQ

| Question | Answer |
|---|---|
| Do I need an openFDA API key? | No. This Actor uses the public openFDA endpoint and does not require a key or login. |
| What is the maximum number of events I can scrape? | You can set maxItems up to 1,000,000 per run. The openFDA API may have its own limits, but the Actor will collect as many as allowed. |
| Can I filter by animal species? | Yes. Use the search field with Lucene syntax, for example animal.species:"Dog" or animal.species:"Cat". |
| Can I filter by drug name? | Yes. Use drug.brand\_name:"Bravecto" or drug.generic\_name:"fluralaner" in the search field. |
| What output formats are supported? | You can export the dataset as CSV, JSON, Excel, or XML from the Apify platform. |
| How is the data structured? | Each adverse event is returned as one flat row with fields for drug, reaction, animal, and outcome. Nested JSON is flattened. |
| Can I schedule this Actor to run automatically? | Yes. Use Apify's scheduler to run it daily, weekly, or on any cron schedule. |
| Is this data from the FDA? | Yes. The data comes from the openFDA Animal & Veterinary Adverse Event endpoint, which is maintained by the U.S. Food and Drug Administration. |
| What is Lucene search syntax? | Lucene is a query language used by openFDA. You can use field:value pairs, boolean operators, and wildcards. See the openFDA documentation for details. |
| Can I get only recent events? | Yes. Use the search field with a date range, for example receiptdate:\[2024-01-01+TO+2024-12-31]. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by U.S. Food and Drug Administration. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `maxItems` (type: `integer`):

How many veterinary adverse events to collect per run.

## `search` (type: `string`):

Optional openFDA Lucene search (e.g. animal.species:"Dog" or drug.brand\_name:"Bravecto").

## Actor input object example

```json
{
  "maxItems": 10
}
```

# Actor output Schema

## `results` (type: `string`):

Scraped records.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/openfda-vet-events-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxItems": 10 }

# Run the Actor and wait for it to finish
run = client.actor("parseforge/openfda-vet-events-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxItems": 10
}' |
apify call parseforge/openfda-vet-events-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/openfda-vet-events-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/cL9Fl8mTZv3I8gP2c/builds/EsvMNxiWLbpYlBw42/openapi.json
