# Consumer Protection Alerts Scraper (`datapilot/consumer-protection-alerts-scraper`) Actor

Consumer Alert Scraper collects safety alerts from Federal Trade Commission, U.S. Consumer Product Safety Commission, and U.S. Food and Drug Administration. It filters by keyword, extracts titles and links, and outputs structured JSON for monitoring recalls and consumer warnings. 🚨📢

- **URL**: https://apify.com/datapilot/consumer-protection-alerts-scraper.md
- **Developed by:** [Data Pilot](https://apify.com/datapilot) (community)
- **Categories:** Developer tools, Automation, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 scraped results

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

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Consumer Protection Alerts Scraper

🛡️ **Consumer Protection Alerts Scraper** is a powerful Apify Actor designed to extract and track comprehensive **Consumer Protection** alerts, recalls, and safety notifications from authoritative government agencies. This tool aggregates **Consumer Protection** information from FTC Consumer Alerts, CPSC Recalls, and FDA Recalls, providing real-time **Consumer Protection** intelligence for product safety, recalls, and consumer welfare. Whether you're monitoring **Consumer Protection** issues, tracking product recalls, or conducting consumer safety research, the Consumer Protection Alerts Scraper delivers critical **Consumer Protection** data efficiently.

With multi-source aggregation, intelligent keyword filtering, proxy support, and real-time dataset integration, the Consumer Protection Alerts Scraper ensures comprehensive tracking of **Consumer Protection** alerts and recalls across three major US government agencies. It focuses on key **Consumer Protection** metrics including alerts, recalls, safety warnings, and marketplace withdrawals, making it an essential tool for **Consumer Protection** research and safety monitoring.



### 🔥 Features

- **Comprehensive Consumer Protection Aggregation** – Collects **Consumer Protection** alerts from three major government sources (FTC, CPSC, FDA).
- **Multi-Source Integration** – Aggregates **Consumer Protection** data from FTC, CPSC, and FDA simultaneously.
- **Keyword Filtering** – Filter **Consumer Protection** alerts by product type, issue, or company name.
- **FTC Consumer Alerts** – Tracks FTC **Consumer Protection** alerts and fraud warnings.
- **CPSC Recalls** – Monitors Consumer Product Safety Commission **Consumer Protection** recalls.
- **FDA Recalls** – Tracks FDA safety recalls and market withdrawals.
- **Real-Time Tracking** – Captures **Consumer Protection** alerts as they're published.
- **Link Extraction** – Extracts direct links to full **Consumer Protection** alert details.
- **Web Scraping** – Intelligent HTML parsing for reliable data extraction.
- **Proxy Support** – Apify residential proxy support for reliable access.
- **Error Handling** – Graceful error handling with detailed logging.
- **Rate Limiting** – Automatic delays respect server resources.
- **Bulk Processing** – Supports configurable result limits.
- **Timestamp Recording** – Records alert detection time for tracking.
- **Real-Time Dataset Push** – Pushes results to Apify Dataset immediately.
- **403 Handling** – Smart handling of access-denied errors with proxy switching recommendations.



### ⚙️ How It Works

The Consumer Protection Alerts Scraper takes a keyword as input and searches three government **Consumer Protection** sources simultaneously. It extracts alert titles, links, and metadata, filters by keyword if provided, and pushes results to the Apify Dataset. The actor handles 403 errors intelligently and provides recommendations for proxy configuration issues.

**Key Processing Steps:**

1. **Input Parsing** – Accept keyword and max_results from Actor input
2. **Proxy Configuration** – Set up Apify proxy if configured
3. **Source Iteration** – Process FTC, CPSC, and FDA sources
4. **Page Fetch** – Retrieve HTML from each source
5. **HTML Parsing** – Extract links using BeautifulSoup
6. **Link Processing** – Filter by minimum length and keyword
7. **URL Resolution** – Convert relative URLs to absolute
8. **Result Compilation** – Aggregate **Consumer Protection** alerts
9. **Dataset Push** – Push results to Apify Dataset in real-time
10. **Error Logging** – Log any issues with recommendations

**Key Benefits:**

- Monitor **Consumer Protection** alerts across three major agencies
- Filter alerts by keyword (product type, company, issue)
- Track product recalls and safety warnings
- Research consumer protection trends
- Build consumer safety datasets
- Receive alerts on dangerous products

---

### 📥 Input

The Actor accepts the following input parameters:

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `keyword` | string | "" | Filter **Consumer Protection** alerts by keyword (product, company, issue) |
| `max_results` | integer | `20` | Maximum **Consumer Protection** alerts to return (1-100) |
| `proxyConfiguration` | object | - | Proxy settings for reliable access |

**Example Inputs:**

```json
{
  "keyword": "batteries",
  "max_results": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
````

```json
{
  "keyword": "recall",
  "max_results": 30
}
```

```json
{
  "keyword": "food",
  "max_results": 25
}
```

***

### 📤 Output

The Actor pushes **Consumer Protection** alert records with the following structure:

| Field | Type | Description |
|-------|------|-------------|
| `title` | string | Alert/recall title |
| `agency` | string | Source agency (FTC, CPSC, FDA) |
| `source_url` | string | Direct link to full alert details |
| `published_date` | string | ISO 8601 timestamp of detection |

**Example Output Records:**

```json
{
  "title": "Samsung Galaxy Note 7 Battery Recall",
  "agency": "CPSC Recalls",
  "source_url": "https://www.cpsc.gov/Recalls/2024/...",
  "published_date": "2025-02-14T12:00:00Z"
}
```

```json
{
  "title": "FTC Warns Consumers About Facebook Scam",
  "agency": "FTC Consumer Alerts",
  "source_url": "https://consumer.ftc.gov/consumer-alerts/2024/...",
  "published_date": "2025-02-14T12:00:00Z"
}
```

```json
{
  "title": "FDA Recalls Lettuce Due to E. coli",
  "agency": "FDA Recalls",
  "source_url": "https://www.fda.gov/safety/recalls/...",
  "published_date": "2025-02-14T12:00:00Z"
}
```

***

### 🧰 Technical Stack

- **HTTP:** requests library for website fetching
- **HTML Parsing:** BeautifulSoup4 for content extraction
- **Headers:** User-Agent rotation and proper request headers
- **SSL:** SSL verification disabled for compatibility
- **Proxy:** Apify Proxy with RESIDENTIAL support
- **Timeout:** 30 seconds per request
- **Logging:** Apify Actor logging system
- **Platform:** Apify Actor serverless environment
- **Timestamps:** ISO 8601 with UTC timezone

### 🎯 Use Cases

- **Consumer Safety Monitoring** – Track **Consumer Protection** alerts for dangerous products
- **Product Recall Tracking** – Monitor recalls of specific product categories
- **Fraud Alert Monitoring** – Stay informed about current consumer fraud schemes
- **Food Safety** – Track food recalls and contamination alerts
- **Drug Safety** – Monitor pharmaceutical recalls and safety warnings
- **Medical Device Safety** – Track medical device recalls and failures
- **Brand Protection** – Monitor recalls affecting your brand
- **Consumer Research** – Study consumer protection trends
- **Risk Assessment** – Identify product categories with high recall rates
- **Compliance Monitoring** – Track regulatory recalls and warnings
- **Insurance Analysis** – Analyze product liability risk
- **Market Research** – Research safety issues in product categories
- **Business Intelligence** – Competitor product safety analysis
- **Regulatory Intelligence** – Track FDA/CPSC regulatory actions
- **Public Health** – Monitor disease outbreaks and health warnings

***

### 🚀 Quick Start

#### **1. Prepare Input**

Go to Apify Console and enter:

```json
{
  "keyword": "batteries",
  "max_results": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

#### **2. Run the Actor**

Click **Start** button. The Actor will:

- Connect to FTC, CPSC, and FDA
- Search for keyword matches
- Extract alert links
- Push results to Dataset

#### **3. Monitor Progress**

Console shows:

```
Starting scrape. Keyword: 'batteries' | Proxy: Enabled
Scraping source: FTC Consumer Alerts
Found 8 items in FTC Consumer Alerts
Scraping source: CPSC Recalls
Found 15 items in CPSC Recalls
Scraping source: FDA Recalls
Found 5 items in FDA Recalls
Task finished. Total items found: 28
```

#### **4. View & Download Results**

- **Results Tab**: All alerts and recalls
- **Export**: JSON, CSV, Excel
- **Filter**: By agency or keyword
- **Alert**: Review critical recalls

### 🚨 Safety Alerts Types

#### **FTC Alerts**

- Fraud warnings
- Identity theft alerts
- Phishing scams
- Data breach notices
- Imposter scams
- Consumer protection tips

#### **CPSC Recalls**

- Product recalls
- Safety hazards
- Risk of injury
- Choking hazards
- Burn hazards
- Chemical hazards

#### **FDA Recalls**

- Food recalls
- Drug recalls
- Medical device recalls
- Contamination warnings
- Market withdrawals
- Adverse event alerts

#### **Data Quality**

- **Authority** – Data from official US government agencies
- **Accuracy** – As accurate as official sources
- **Completeness** – May not capture all alerts in real-time
- **Freshness** – Point-in-time snapshots
- **Verification** – Always verify with official sources

#### **Best Practices**

- Check official sources regularly
- Verify all product information independently
- Don't rely solely on automated alerts
- Review full details on government websites
- Subscribe to agency notifications directly

### 📦 Changelog

**Initial Release:**

- FTC Consumer Alerts integration
- CPSC Recalls scraping
- FDA Recalls extraction
- Multi-source aggregation
- Keyword filtering
- Link extraction with URL resolution
- Relative URL to absolute URL conversion
- Error handling with proxy recommendations
- 403 error detection and guidance
- Apify Dataset integration
- Real-time result push
- ISO 8601 timestamp recording
- Configurable result limits
- Proxy configuration support
- SSL warning suppression
- User-Agent rotation
- Referer header inclusion
- Keep-alive connection support

***

### 🧑‍💻 Support & Feedback

- **Issues:** Submit via Apify console
- **Documentation:** Check Actor details page
- **Community:** Apify forum discussions
- **Feature Requests:** Suggest new agencies or filters
- **Bug Reports:** Include keyword and error details

### 📚 Related Tools

- Website Technology Stack Scraper
- Business Social Media Finder
- Smart Article Extractor
- Fast News Content Scraper

# Actor input Schema

## `keyword` (type: `string`):

Enter keyword to filter results (e.g. recall, fraud, safety).

## `max_results` (type: `integer`):

Maximum number of items to scrape.

## `proxyConfiguration` (type: `object`):

Select the proxy to use for requests.

## Actor input object example

```json
{
  "keyword": "recall",
  "max_results": 20,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "keyword": "recall"
};

// Run the Actor and wait for it to finish
const run = await client.actor("datapilot/consumer-protection-alerts-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 = { "keyword": "recall" }

# Run the Actor and wait for it to finish
run = client.actor("datapilot/consumer-protection-alerts-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "keyword": "recall"
}' |
apify call datapilot/consumer-protection-alerts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=datapilot/consumer-protection-alerts-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Consumer Protection Alerts Scraper",
        "description": "Consumer Alert Scraper collects safety alerts from Federal Trade Commission, U.S. Consumer Product Safety Commission, and U.S. Food and Drug Administration. It filters by keyword, extracts titles and links, and outputs structured JSON for monitoring recalls and consumer warnings. 🚨📢",
        "version": "0.0",
        "x-build-id": "vcNZ8Evex4pGGGZLm"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/datapilot~consumer-protection-alerts-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-datapilot-consumer-protection-alerts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/datapilot~consumer-protection-alerts-scraper/runs": {
            "post": {
                "operationId": "runs-sync-datapilot-consumer-protection-alerts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/datapilot~consumer-protection-alerts-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-datapilot-consumer-protection-alerts-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "keyword"
                ],
                "properties": {
                    "keyword": {
                        "title": "Search Keyword",
                        "type": "string",
                        "description": "Enter keyword to filter results (e.g. recall, fraud, safety)."
                    },
                    "max_results": {
                        "title": "Max Results",
                        "type": "integer",
                        "description": "Maximum number of items to scrape.",
                        "default": 20
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Select the proxy to use for requests.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
