cfpb_complaint_trends
Analyze consumer complaint trends over time using CFPB data to identify patterns in financial products, issues, and companies.
Instructions
Get complaint trends over time using the CFPB Trends API. Uses dedicated /trends endpoint with lens-based aggregation. REQUIRED: trend_interval ('month', 'quarter', or 'year') — the API rejects requests without it. Lens options: 'overview' (total counts), 'product' (by product), 'issue' (by issue), 'tags' (by tag). Sub-lens allows drilling into sub-categories within the lens.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lens | No | Trend lens (default: overview) | |
| trend_interval | Yes | Time bucket size for trend aggregation: 'month', 'quarter', or 'year' | |
| sub_lens | No | Sub-lens drill-down | |
| sub_lens_depth | No | Top N sub-aggregations to return (default 10) | |
| focus | No | Focus charts on a specific product or company name | |
| product | No | Financial product: 'Mortgage', 'Debt collection', etc. | |
| company | No | Company name: 'Wells Fargo', 'Equifax', etc. | |
| state | No | Two-letter state code: 'CA', 'TX', 'NY' | |
| issue | No | Issue type filter | |
| date_received_min | No | Start date (YYYY-MM-DD) | |
| date_received_max | No | End date (YYYY-MM-DD) |