# openFDA Device Enforcement Status Watch API (`soilair/openfda-device-enforcement-status-watch-api`) Actor

Read a bounded device enforcement report-date slice with recall status/class declarations and change hashes. Dataset freshness and coverage are explicit; no clinical or safety advice.

- **URL**: https://apify.com/soilair/openfda-device-enforcement-status-watch-api.md
- **Developed by:** [Salih Can Kurnaz](https://apify.com/soilair) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 metadata observations

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## openFDA Device Enforcement Status Watch API

Query the official openFDA device/enforcement endpoint once with an explicit report_date range, report_date descending order and affordable limit of one to twenty records. Keep recall/event identifiers, classification, status, report/initiation/termination date declarations, recalling firm, product description, quantity text and dataset update date. Addresses, personal profiles, code lists, GMDN terms, patient/adverse-event data and contact details are omitted. Product descriptions are literal source text, not parsed device identity or independent classification. A source total greater than returned rows means incomplete coverage; tied dates do not establish a stable page or complete history. No pagination, drug/food query, clinical interpretation, severity scoring, patient-specific recommendation or assertion that a product is safe or that a particular unit is recalled. Data provided by the U.S. Food and Drug Administration. Do not rely on openFDA for medical-care decisions. Source data can be delayed, revised or unvalidated. Anonymous shared-IP access has provider limits; no key or workaround is supplied. Source404 is an error, not a clean zero-recall conclusion.

### Input example

```json
{
  "reportDateFrom": "20200101",
  "reportDateTo": "20261014",
  "maxResults": 2
}
```

### Results, snapshots and coverage

Each saved observation is a dataset row with itemKey, contentHash, observedAt and sourceUrl. The hash covers selected semantic fields and excludes volatile retrieval times and request URLs. Copy SNAPSHOT.previousHashes into the next input to compare the same watchlist: NO_BASELINE, FIRST_SEEN, UNCHANGED or CHANGED. There is no automatic durable cross-run memory; only the baseline you provide is compared. Unchanged successful rows are still billed. Missing rows never prove deletions. OUTPUT reports rowsEmitted, actual requestCount, source coverage, errors and completion status. The snapshot complete flag is false when any source fails, a provider stops further requests, or the result/budget cap prevents completion.

### Pricing and budget protection

Pay per event: $0.005 startup plus $0.001 per saved observation. Startup quantity follows Apify memory rules (minimum one). Default memory256 MB and timeout120 seconds. No browser, proxy, paid external API, credentials or account-wide permissions. The runtime checks the effective result budget before contacting sources and before saving rows; zero affordable rows causes no source work. Provider list limits are reduced to the remaining affordable capacity. The run has a90-second fetch deadline, two-MiB decoded-body limit, no network retries and no pagination. API rate403/429 or Retry-After stops additional sources. All-source failure exits with an error and a preserved OUTPUT; partial successful observations remain available. Public data or its upstream API may be free: the event fee pays for this bounded workflow, data selection, output validation, snapshots and Apify execution. It does not buy exclusive data or imply endorsement by the provider.

### Access and limitations

Only constructed official HTTPS API endpoints are contacted. Arbitrary URLs, private addresses, cross-provider redirects and credential-bearing input are rejected. Provider rate limits and shared-IP quotas apply across runs; do not use parallel runs to defeat a provider limit. For large/bulk extraction use the provider's supported bulk service. This is selected metadata, not independent validation of every source declaration. No guarantee of source availability, completeness, commercial return or suitability for high-stakes decisions is made.

### Official source documentation

- https://open.fda.gov/apis/device/enforcement/
- https://open.fda.gov/terms/
- https://open.fda.gov/apis/authentication/

# Actor input Schema

## `reportDateFrom` (type: `string`):

Explicit YYYYMMDD report date.

## `reportDateTo` (type: `string`):

Explicit YYYYMMDD report date.

## `maxResults` (type: `integer`):

1..20 rows across all inputs. Coverage is explicitly partial when truncated.

## `previousHashes` (type: `object`):

At most500 itemKey/SHA256 pairs from SNAPSHOT. Missing rows are not deletion evidence.

## Actor input object example

```json
{
  "reportDateFrom": "20200101",
  "reportDateTo": "20261014",
  "maxResults": 20,
  "previousHashes": {}
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

## `snapshot` (type: `string`):

No description

# 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 = {
    "reportDateFrom": "20200101",
    "reportDateTo": "20261014"
};

// Run the Actor and wait for it to finish
const run = await client.actor("soilair/openfda-device-enforcement-status-watch-api").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 = {
    "reportDateFrom": "20200101",
    "reportDateTo": "20261014",
}

# Run the Actor and wait for it to finish
run = client.actor("soilair/openfda-device-enforcement-status-watch-api").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 '{
  "reportDateFrom": "20200101",
  "reportDateTo": "20261014"
}' |
apify call soilair/openfda-device-enforcement-status-watch-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,soilair/openfda-device-enforcement-status-watch-api"
        }
    }
}
```

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/b0p5PF2DRdOKgO2W1/builds/pIH0mebFfdZ1sAlmO/openapi.json
