API reference
CFPB complaints
POST /cfpb/complaints counts the consumer complaints a company received at the CFPB: total, monthly trend, top products and issues, responses and timely-response share.
https://api.qelka.com/v1/cfpb/complaintsSee how many consumer complaints a bank, lender, card issuer, debt collector or credit bureau has received through the Consumer Financial Protection Bureau (CFPB): the all-time total, the count month by month over the last 12 months, the products and issues consumers complain about most, how the company closed them, and the share it answered on time. Each lookup costs 1 credit, found or not; errors and test keys are never billed.
Request
companystringRequiredWELLS FARGO & COMPANY.freshbooleanDefault falsetrue skips the 24-hour result cache and counts again.One lookup sends a query to the CFPB search API for each month of the trend, plus a few more, so every snippet sets a 60-second client timeout.
curl https://api.qelka.com/v1/cfpb/complaints \
--max-time 60 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"company": "Wells Fargo"}'
const response = await fetch('https://api.qelka.com/v1/cfpb/complaints', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ company: 'Wells Fargo' }),
signal: AbortSignal.timeout(60_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/cfpb/complaints",
headers={"Authorization": f"Bearer {api_key}"},
json={"company": "Wells Fargo"},
timeout=60,
)
result = response.json()
print(result)
<?php
$ch = curl_init('https://api.qelka.com/v1/cfpb/complaints');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('QELKA_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['company' => 'Wells Fargo']),
CURLOPT_TIMEOUT => 60,
]);
$result = json_decode(curl_exec($ch), true);
print_r($result);
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
"time"
)
func main() {
payload, _ := json.Marshal(map[string]any{"company": "Wells Fargo"})
request, _ := http.NewRequest(http.MethodPost, "https://api.qelka.com/v1/cfpb/complaints", bytes.NewReader(payload))
request.Header.Set("Authorization", "Bearer "+os.Getenv("QELKA_API_KEY"))
request.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 60 * time.Second}
response, err := client.Do(request)
if err != nil {
panic(err)
}
defer response.Body.Close()
var result map[string]any
if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
panic(err)
}
fmt.Println(result)
}
require 'json'
require 'net/http'
uri = URI('https://api.qelka.com/v1/cfpb/complaints')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{ENV.fetch('QELKA_API_KEY')}"
request['Content-Type'] = 'application/json'
request.body = JSON.generate({ company: 'Wells Fargo' })
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true, read_timeout: 60) do |http|
http.request(request)
end
result = JSON.parse(response.body)
puts result
Response
Every lookup gets a 200, found or not. Read status first: found or not_found.
idstringlkp_ followed by 26 characters.objectstringcfpb_complaints.inputstringcompany you sent, without surrounding spaces.statusstringfound when the matched company has at least one complaint, not_found otherwise.companystring or nullnull when no name matched.totalintegerlast_12_monthsintegerwindow.monthsarray of objectswindow, oldest first.months.monthstringYYYY-MM.months.complaintsintegermonths.partialbooleantrue for the current month, which is not over.top_productsarray of objectswindow.top_products.namestringCredit card.top_products.complaintsintegerwindow.top_products.sharenumberlast_12_months, from 0 to 1, three decimals.top_issuesarray of objectswindow, with the same fields.company_responsesarray of objectswindow, such as Closed with explanation or Closed with monetary relief, with the same fields.timely_response_sharenumber or nullwindow that the CFPB marks as answered on time, from 0 to 1, four decimals. null when none is marked either way.windowobjectwindow.fromstringYYYY-MM-DD.window.tostringYYYY-MM-DD.data_updatedstring or nullother_companiesarray of stringscredits_usedinteger0 with a test key.cachedbooleantrue when the answer came from the 24-hour cache.{
"id": "lkp_01M8CFQ9KCP29ZEMZ02Q3PP5RS",
"object": "cfpb_complaints",
"input": "Wells Fargo",
"status": "found",
"company": "WELLS FARGO & COMPANY",
"total": 179241,
"last_12_months": 22840,
"months": [
{ "month": "2025-12", "complaints": 2117, "partial": false },
{ "month": "2026-01", "complaints": 2251, "partial": false },
{ "month": "2026-02", "complaints": 1822, "partial": false },
{ "month": "2026-03", "complaints": 2287, "partial": false },
{ "month": "2026-04", "complaints": 2209, "partial": false },
{ "month": "2026-05", "complaints": 2025, "partial": false },
{ "month": "2026-06", "complaints": 1896, "partial": false },
{ "month": "2026-07", "complaints": 1766, "partial": false },
{ "month": "2026-08", "complaints": 1784, "partial": false },
{ "month": "2026-09", "complaints": 1749, "partial": false },
{ "month": "2026-10", "complaints": 1994, "partial": false },
{ "month": "2026-11", "complaints": 940, "partial": true }
],
"top_products": [
{ "name": "Checking or savings account", "complaints": 10083, "share": 0.441 },
{ "name": "Credit card", "complaints": 3738, "share": 0.164 },
{
"name": "Credit reporting or other personal consumer reports",
"complaints": 3344,
"share": 0.146
},
{ "name": "Debt collection", "complaints": 2034, "share": 0.089 },
{
"name": "Money transfer, virtual currency, or money service",
"complaints": 1596,
"share": 0.07
}
],
"top_issues": [
{ "name": "Managing an account", "complaints": 6027, "share": 0.264 },
{ "name": "Incorrect information on your report", "complaints": 1998, "share": 0.087 },
{
"name": "Problem with a lender or other company charging your account",
"complaints": 1495,
"share": 0.065
},
{
"name": "Problem with a purchase shown on your statement",
"complaints": 1405,
"share": 0.062
},
{
"name": "Took or threatened to take negative or legal action",
"complaints": 1093,
"share": 0.048
}
],
"company_responses": [
{ "name": "Closed with explanation", "complaints": 17485, "share": 0.766 },
{ "name": "Closed with non-monetary relief", "complaints": 2593, "share": 0.114 },
{ "name": "Closed with monetary relief", "complaints": 1926, "share": 0.084 },
{ "name": "In progress", "complaints": 836, "share": 0.037 }
],
"timely_response_share": 0.9999,
"window": { "from": "2025-12-01", "to": "2026-11-26" },
"data_updated": "2026-11-26T12:00:00-05:00",
"other_companies": [],
"credits_used": 1,
"cached": false
}
Act on the status
status |
What it means | What to do |
|---|---|---|
found |
A company of the database matches the name and has complaints. | Check that company is the company you meant, then read the trend in months and the mix in top_products and top_issues. |
not_found with other_companies |
The name is not close enough to any name of the database. | Send one of other_companies as company. |
not_found without other_companies |
No name of the database resembles the one you sent. | Try the legal name of the company or of its parent group: the CFPB records complaints under one company name, which can be the parent, as WELLS FARGO & COMPANY is for Wells Fargo. |
Every status is billed 1 credit, because the lookup ran.
Test keys never call the CFPB. They know one fictional company, SAMPLE FINANCIAL SERVICES, INC., found by names whose words start words of its name, such as Sample Financial, with fixed counts; its months and window follow today's date. Any other name is not_found.
Read the counts with care
A complaint is what a consumer told the CFPB, not a finding against the company: the CFPB does not verify every claim, and it publishes a complaint only after the company responds or after 15 days, whichever comes first. A large company gets more complaints because it has more customers, so compare counts with the company's size, and look at the trend and the issues rather than the total alone.
Timely responses
The CFPB sends each complaint to the company, which is expected to respond within 15 days, and marks in its database whether the response came on time. timely_response_share is the share of complaints received in window that are marked as answered on time, out of those marked either way.
How the company is matched
The name you send goes to the CFPB company suggestion search. A suggestion with the same name, once case and punctuation are ignored, is taken; otherwise the closest one, if it is close enough. The counts then come from the CFPB search API, filtered on that exact company name: one query for the total, one for the products, issues, responses and timely flags of window, and one per month.
Where the data comes from
Counts come from the CFPB Consumer Complaint Database search API, queried at request time. The CFPB publishes the database under the CC0 public domain dedication. See the data sources page.
Look up a company with a test key
With a test key in QELKA_API_KEY, this request returns the fictional company, with months that follow the day you call. Called on 2026-11-26, it returned:
curl https://api.qelka.com/v1/cfpb/complaints \
--max-time 60 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"company": "Sample Financial"}'
const response = await fetch('https://api.qelka.com/v1/cfpb/complaints', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ company: 'Sample Financial' }),
signal: AbortSignal.timeout(60_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/cfpb/complaints",
headers={"Authorization": f"Bearer {api_key}"},
json={"company": "Sample Financial"},
timeout=60,
)
result = response.json()
print(result)
{
"id": "lkp_01M8CGA9X6TF0R5M8BQH2ZD7JW",
"object": "cfpb_complaints",
"input": "Sample Financial",
"status": "found",
"company": "SAMPLE FINANCIAL SERVICES, INC.",
"total": 3120,
"last_12_months": 540,
"months": [
{ "month": "2025-12", "complaints": 46, "partial": false },
{ "month": "2026-01", "complaints": 47, "partial": false },
{ "month": "2026-02", "complaints": 41, "partial": false },
{ "month": "2026-03", "complaints": 48, "partial": false },
{ "month": "2026-04", "complaints": 42, "partial": false },
{ "month": "2026-05", "complaints": 49, "partial": false },
{ "month": "2026-06", "complaints": 43, "partial": false },
{ "month": "2026-07", "complaints": 50, "partial": false },
{ "month": "2026-08", "complaints": 44, "partial": false },
{ "month": "2026-09", "complaints": 51, "partial": false },
{ "month": "2026-10", "complaints": 45, "partial": false },
{ "month": "2026-11", "complaints": 52, "partial": true }
],
"top_products": [
{ "name": "Credit card", "complaints": 260, "share": 0.481 },
{ "name": "Checking or savings account", "complaints": 180, "share": 0.333 },
{ "name": "Debt collection", "complaints": 100, "share": 0.185 }
],
"top_issues": [
{ "name": "Problem with a purchase shown on your statement", "complaints": 150, "share": 0.278 },
{ "name": "Managing an account", "complaints": 120, "share": 0.222 },
{ "name": "Fees or interest", "complaints": 90, "share": 0.167 }
],
"company_responses": [
{ "name": "Closed with explanation", "complaints": 470, "share": 0.87 },
{ "name": "Closed with monetary relief", "complaints": 50, "share": 0.093 },
{ "name": "In progress", "complaints": 20, "share": 0.037 }
],
"timely_response_share": 0.9907,
"window": { "from": "2025-12-01", "to": "2026-11-26" },
"data_updated": "2026-01-01T12:00:00-05:00",
"other_companies": [],
"credits_used": 0,
"cached": false
}
Errors
| Status | Type | When |
|---|---|---|
| 400 | invalid_request | company missing, shorter than 2 or longer than 200 characters, a body that is not a JSON object, or a field the request table does not list |
| 401 | invalid_api_key | The key is missing, unknown or revoked |
| 402 | insufficient_credits | Your balance is less than 1 credit (live keys only) |
| 403 | forbidden | The key is restricted to other endpoints |
| 405 | invalid_request | The method is not POST |
| 422 | unprocessable_input | The company name has no word of two letters or more |
| 429 | rate_limited | Too many requests: wait Retry-After seconds |
| 500 | internal_error | Unexpected error on our side: retry with backoff |
| 502 | upstream_unavailable | The CFPB API could not be reached, answered with an error or did not answer within 10 seconds: retry later |
No error is billed. A company without complaints is not an error: it is a 200 with status: "not_found".
Related
- CFPB complaint data API
- Free tool: CFPB complaints
- Bank lookup (FDIC) and SEC company data
- Batch: up to 100 lookups in one call, each item with
type: "cfpb_complaints" - Bulk: a whole file of company names with
type=cfpb_complaints - Caching, Errors, Test mode