{
  "openapi": "3.0.1",
  "info": {
    "title": "CFPB Consumer Complaints API - Search Bank & Lender Complaints",
    "description": "Search the official CFPB Consumer Complaint Database by company, product, issue, state, ZIP and date. Clean normalized rows, response outcome flags and an only-new mode for complaint monitoring.",
    "version": "0.1",
    "x-build-id": "csgIHb3Qs5xxY9Tvp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/onomatopoeia_dev~cfpb-consumer-complaints/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-onomatopoeia_dev-cfpb-consumer-complaints",
        "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/onomatopoeia_dev~cfpb-consumer-complaints/runs": {
      "post": {
        "operationId": "runs-sync-onomatopoeia_dev-cfpb-consumer-complaints",
        "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/onomatopoeia_dev~cfpb-consumer-complaints/run-sync": {
      "post": {
        "operationId": "run-sync-onomatopoeia_dev-cfpb-consumer-complaints",
        "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",
        "properties": {
          "dateFrom": {
            "title": "Received on or after",
            "type": "string",
            "description": "Absolute date (2026-11-01) or relative (`7 days`, `2 weeks`, `3 months`). Empty means the last 30 days. The date is when the CFPB received the complaint."
          },
          "dateTo": {
            "title": "Received on or before",
            "type": "string",
            "description": "Absolute or relative date. Empty means today."
          },
          "companies": {
            "title": "Companies",
            "type": "array",
            "description": "Company names, one per item (for example `wells fargo`, `equifax`, `Block, Inc.`). Matched case-insensitively against the CFPB's official company names; a short name can match several legal entities. Up to 40 companies.",
            "items": {
              "type": "string"
            }
          },
          "products": {
            "title": "Products",
            "type": "array",
            "description": "Product categories, for example `mortgage`, `credit card`, `debt collection`, `checking or savings account`, `student loan`, `vehicle loan`, `credit reporting`. A partial name also matches renamed categories, so `credit card` includes `Credit card or prepaid card`.",
            "items": {
              "type": "string"
            }
          },
          "subProducts": {
            "title": "Sub-products",
            "type": "array",
            "description": "Narrower product types, for example `FHA mortgage`, `Store credit card`, `Checking account`, `Payday loan`. Combined with Products when both are set.",
            "items": {
              "type": "string"
            }
          },
          "issues": {
            "title": "Issues",
            "type": "array",
            "description": "Issue categories, for example `Incorrect information on your report`, `Problem with a purchase shown on your statement`, `Struggling to pay mortgage`.",
            "items": {
              "type": "string"
            }
          },
          "subIssues": {
            "title": "Sub-issues",
            "type": "array",
            "description": "Narrower issue types, for example `Information belongs to someone else`, `Overdrafts and overdraft fees`.",
            "items": {
              "type": "string"
            }
          },
          "searchTerm": {
            "title": "Keyword search",
            "type": "string",
            "description": "Words to search for. By default they are matched against company, product, issue and sub-issue text (for example `overdraft` or `foreclosure`). Supports AND, OR, NOT and quoted phrases. The CFPB's public API does not publish the free-text complaint narratives, so narratives cannot be searched."
          },
          "searchIn": {
            "title": "Search in",
            "enum": [
              "all",
              "company"
            ],
            "type": "string",
            "description": "Where the keyword is searched.",
            "default": "all"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "The consumer's state. Two-letter codes (`CA`) or names (`California`).",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Five-digit ZIP codes, for example `90210`. The CFPB masks some ZIP codes (for example `902XX`), which can be searched the same way.",
            "items": {
              "type": "string"
            }
          },
          "companyResponses": {
            "title": "Company response",
            "type": "array",
            "description": "How the company answered. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "In progress",
                "Closed",
                "Closed with explanation",
                "Closed with monetary relief",
                "Closed with non-monetary relief",
                "Closed with relief",
                "Closed without relief",
                "Untimely response"
              ]
            }
          },
          "timely": {
            "title": "Timely response",
            "enum": [
              "any",
              "yes",
              "no"
            ],
            "type": "string",
            "description": "Whether the company answered within the CFPB's deadline. Use `No` to find late responses.",
            "default": "any"
          },
          "tags": {
            "title": "Consumer tags",
            "type": "array",
            "description": "Complaints from older Americans or servicemembers (and their families).",
            "items": {
              "type": "string",
              "enum": [
                "Older American",
                "Servicemember"
              ]
            }
          },
          "submittedVia": {
            "title": "Submitted via",
            "type": "array",
            "description": "How the consumer sent the complaint. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "Web",
                "Referral",
                "Phone",
                "Postal mail",
                "Fax",
                "Email"
              ]
            }
          },
          "sortOrder": {
            "title": "Order",
            "enum": [
              "newest",
              "oldest"
            ],
            "type": "string",
            "description": "Newest first (default) or oldest first. Only-new mode always reads oldest first.",
            "default": "newest"
          },
          "onlyNew": {
            "title": "Only new complaints since the last run",
            "type": "boolean",
            "description": "Delivers only complaints you have not received in an earlier run with the same memory name. Re-checks the last 7 days because complaints reach the database a few days after they are received. Reads oldest first, so a run that stops at the maximum continues where it left off next time. You are never billed twice for the same complaint.",
            "default": false
          },
          "stateKey": {
            "title": "Memory name for \"only new\"",
            "type": "string",
            "description": "Name of this saved search. Use a different name for each company or schedule.",
            "default": "default"
          },
          "maxItems": {
            "title": "Maximum complaints",
            "minimum": 1,
            "type": "integer",
            "description": "Total complaints to store. Every complaint is one billed item. Busy filters (credit reporting, last 30 days) match hundreds of thousands, so set this on purpose.",
            "default": 100
          },
          "maxScanned": {
            "title": "Safety limit: complaints to scan",
            "minimum": 100,
            "type": "integer",
            "description": "Stops reading after this many complaints, including ones skipped as already delivered. Rarely needs changing.",
            "default": 100000
          },
          "includeRawRecord": {
            "title": "Include the original record",
            "type": "boolean",
            "description": "Adds the CFPB's original record as `raw`.",
            "default": false
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}