# CFPB — consumer complaint alerts (`mack2strategy/cfpb-complaint-alerts`) Actor

CFPB consumer complaint alerts from the public complaint database. Company, product, issue, state, and date received. No key and no login. Zip codes and consumer narratives are not stored. Schedule onlyNew for complaints you have not seen.

- **URL**: https://apify.com/mack2strategy/cfpb-complaint-alerts.md
- **Developed by:** [Mack2 Strategy](https://apify.com/mack2strategy) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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.

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

## CFPB — consumer complaint alerts

CFPB complaint alerts reads the public Consumer Complaint Database API. Price is null. Location is the state on the complaint. The company is the business the consumer named.

**Store description.** CFPB consumer complaint alerts from the public complaint database. Company, product, issue, state, and date received. No key and no login. Zip codes and consumer narratives are not stored. Schedule onlyNew for complaints you have not seen.

Search this Actor by the source name **CFPB**. It is a pay-per-event alerts Actor: a scheduled run with `onlyNew` returns records that were not seen on a previous run.

| | |
| --- | --- |
| Source | CFPB |
| Niche | financial-events |
| Access | public_api |
| Pricing | $3.00 per 1,000 results (`result` = $0.003) plus $0.01 per run (`actor-start`) |
| Login | Not used. Login-walled pages are rejected. |
| Personal data | Not collected. Emails, phone numbers, and names of private individuals are blocked. |

### What you get

Every dataset item uses the same core fields, plus source-specific fields:

| Field | Meaning |
| --- | --- |
| `id` | Stable id used by `onlyNew` |
| `url` | Public https link, or null |
| `title` | Short label |
| `price` | Numeric amount, or null when the source has no price |
| `location` | Place text coarse enough to avoid a street address |
| `postedAt` | ISO date or datetime |
| `raw` | Allowlisted source values for the mapped fields. The upstream payload is not copied through. |
| `company` | Financial institution named in the public complaint. |
| `product` | CFPB product category. |

### Use cases

- A compliance team wants new credit-reporting complaints about a company each morning.
- A vendor-risk review searches the CFPB database for a company name and keeps the complaint id.
- An agent needs a public CFPB complaint link, issue, and state.

### Example output

```json
{
  "id": "33007390",
  "url": "https://www.consumerfinance.gov/data-research/consumer-complaints/search/detail/33007390",
  "title": "Improper use of your report",
  "price": null,
  "location": "TX",
  "postedAt": "2026-11-17T03:56:52.000Z",
  "company": "Experian Information Solutions Inc.",
  "product": "Credit reporting or other personal consumer reports"
}
```

### Input

```json
{
  "keywords": "experian",
  "maxItems": 25,
  "onlyNew": false
}
```

- `keywords` filters records. Keywords are sent to the source and also checked against the public fields that this Actor stores.
- `searchUrl` replaces the default endpoint. It must be https, on an allowlisted host, and on an allowlisted path. It cannot point at a login or account page.
- `maxItems` caps how many records are returned (default 25, ceiling 200).
- `onlyNew` stores seen ids in the named Apify key-value store (`stateStoreName`, default `cfpb-complaint-alerts-seen`, key `SEEN_IDS`). The store keeps the most recent 50,000 ids. Turn this on for a daily schedule so each run behaves like an alert.
- `maxPages` limits how many result pages are requested (default 1, ceiling 3).

### Use from MCP / AI agents

Call this Actor when the user wants **CFPB** records and the task is public data, not a logged-in account and not a person search.

- **Actor id (after publish):** `<your-username>/cfpb-complaint-alerts`
- **Pricing:** one `actor-start` event per run and one `result` event per dataset item. A run that returns 1,000 items costs about $3.01 before any Apify minimum charge.
- **Pass this input** when you only know the topic:

```json
{
  "keywords": "experian",
  "maxItems": 25,
  "onlyNew": false
}
```

- **Pass `onlyNew: true`** when the user wants an alert or a scheduled "what changed" run. Use the same `stateStoreName` on every run of that schedule.
- **Read** the default dataset. Ignore any field that is not in the table above unless you asked for that source-specific column.
- **Do not use** this Actor for emails, phone numbers, private individuals, or any host outside the allowlist.
- **Stop** when the dataset reaches `maxItems` or when a charge-limit response comes back from `Actor.pushData`.

### Compliance

The Consumer Complaint Database is published by the CFPB, a US government agency, and the search API does not require a key. robots.txt allows /data-research/consumer-complaints/search/api/. This Actor maps the complaint id, company, product, issue, state, and date received. It does not map zip code, narrative text, or any consumer name. The company is the financial institution named in the public complaint.

- Source: Consumer Financial Protection Bureau, Consumer Complaint Database
- Licence: US government work, public domain (17 USC 105)
- Terms URL: https://www.consumerfinance.gov/data-research/consumer-complaints/
- Reviewed on: 2026-11-17
- `termsReviewed`: true
- robots.txt is fetched before the first request. A disallow, or a robots.txt that returns 401, 403, or 5xx, aborts the run. A missing robots.txt is treated as allowed. Crawl-delay is honored when it is longer than the configured delay.
- Concurrency 1, at least 500 ms between requests, at most 12 requests per minute.
- User-Agent: `ActorFactoryBot/0.1 (CFPB complaint alerts; public domain; respects robots)`

### Run locally

From the repository root, with dependencies installed:

```bash
npm test -- actors/cfpb-complaint-alerts/test/extract.test.ts
npm run smoke -- actors/cfpb-complaint-alerts/test/smoke.test.ts
```

The offline test replays `test/fixtures`. The smoke test is the canary: it calls the live source (or the inline records, for the classifier), and it fails on zero results or a schema error.

To start the Actor the way Apify does:

```bash
cd actors/cfpb-complaint-alerts
npm install
npm run build
mkdir -p storage/key_value_stores/default
cp examples/default.json storage/key_value_stores/default/INPUT.json
node dist/main.js
```

### Publish

Do this only after `npm run publish-check -- targets/cfpb-complaint-alerts.yaml` prints no errors, and only from an Apify account you control:

```bash
cd actors/cfpb-complaint-alerts
npm install && npm run build
npx apify-cli push
```

Then confirm the Console monetization events match `.actor/pay_per_event.json`: `actor-start` at $0.01 and primary event `result` at $0.003. This repository does not publish anything.

# Actor input Schema

## `keywords` (type: `string`):

Words that must appear in the public fields from CFPB. Leave empty to take the latest records.

## `searchUrl` (type: `string`):

Optional https URL on www.consumerfinance.gov. The path must start with /data-research/consumer-complaints/search/api/v1/.

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

Cap on records written to the dataset.

## `onlyNew` (type: `boolean`):

Skip ids already stored in the named key-value store. Enable this on a schedule to get alert-style runs.

## `stateStoreName` (type: `string`):

Apify key-value store used when onlyNew is true.

## `maxPages` (type: `integer`):

How many result pages to request.

## Actor input object example

```json
{
  "keywords": "",
  "maxItems": 25,
  "onlyNew": false,
  "stateStoreName": "cfpb-complaint-alerts-seen",
  "maxPages": 1
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset items in the overview table.

# 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 = {
    "keywords": "",
    "maxItems": 25,
    "stateStoreName": "cfpb-complaint-alerts-seen",
    "maxPages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("mack2strategy/cfpb-complaint-alerts").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 = {
    "keywords": "",
    "maxItems": 25,
    "stateStoreName": "cfpb-complaint-alerts-seen",
    "maxPages": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("mack2strategy/cfpb-complaint-alerts").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 '{
  "keywords": "",
  "maxItems": 25,
  "stateStoreName": "cfpb-complaint-alerts-seen",
  "maxPages": 1
}' |
apify call mack2strategy/cfpb-complaint-alerts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mack2strategy/cfpb-complaint-alerts"
        }
    }
}
```

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/Ui7Wcjf8EfyvruKmU/builds/dauJ8JIWHr35e7gXo/openapi.json
