{
  "openapi": "3.0.1",
  "info": {
    "title": "CFPB Consumer Complaints - US Financial",
    "description": "The US CFPB consumer complaint database (public open data, no key, 17.7M complaints): what consumers complained about and how the company answered - product, issue, company, narrative, company response, whether it was timely, and the state. Filter or aggregate.",
    "version": "0.0",
    "x-build-id": "gkqJc73cvw9qVDhEl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~cfpb-complaints/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-cfpb-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/j0401~cfpb-complaints/runs": {
      "post": {
        "operationId": "runs-sync-j0401-cfpb-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/j0401~cfpb-complaints/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-cfpb-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "rows",
              "aggregate"
            ],
            "type": "string",
            "description": "rows = complaint records matching your filters, newest received first (default). aggregate = one count row per group for the chosen groupBy dimension.",
            "default": "rows"
          },
          "searchTerm": {
            "title": "Search term",
            "type": "string",
            "description": "Free-text search across the complaint record, e.g. 'foreclosure' (~32k complaints), 'overdraft', 'identity theft'. Blank = any.",
            "default": ""
          },
          "company": {
            "title": "Company",
            "type": "string",
            "description": "EXACT company name as the Bureau normalizes it, e.g. 'EQUIFAX, INC.' (~4.7M), 'TRANSUNION INTERMEDIATE HOLDINGS, INC.', 'Experian Information Solutions Inc.'. A partial or lowercase value matches nothing — use searchTerm instead. Blank = any.",
            "default": ""
          },
          "product": {
            "title": "Product",
            "enum": [
              "",
              "Credit reporting or other personal consumer reports",
              "Credit reporting, credit repair services, or other personal consumer reports",
              "Debt collection",
              "Mortgage",
              "Checking or savings account",
              "Credit card",
              "Credit card or prepaid card",
              "Money transfer, virtual currency, or money service",
              "Credit reporting",
              "Student loan",
              "Vehicle loan or lease",
              "Bank account or service",
              "Payday loan, title loan, personal loan, or advance loan",
              "Consumer Loan",
              "Payday loan, title loan, or personal loan",
              "Prepaid card",
              "Debt or credit management",
              "Payday loan",
              "Money transfers",
              "Other financial service",
              "Virtual currency"
            ],
            "type": "string",
            "description": "Exact product (all 21 values the Bureau publishes). Credit reporting dominates at ~12.2M, Debt collection ~1.19M, Mortgage ~460k. Blank = any.",
            "default": ""
          },
          "issue": {
            "title": "Issue",
            "type": "string",
            "description": "EXACT issue name (178 values), e.g. 'Incorrect information on your report' (~8.0M), 'Improper use of your report', 'Attempts to collect debt not owed'. A partial value matches nothing. Blank = any.",
            "default": ""
          },
          "state": {
            "title": "Consumer state",
            "enum": [
              "",
              "TX",
              "FL",
              "CA",
              "GA",
              "NY",
              "IL",
              "PA",
              "NC",
              "NJ",
              "MD",
              "AL",
              "SC",
              "LA",
              "MI",
              "OH",
              "VA",
              "MS",
              "AZ",
              "TN",
              "NV",
              "MA",
              "IN",
              "MO",
              "WA",
              "WI",
              "CT",
              "CO",
              "AR",
              "MN",
              "OK",
              "DE",
              "KY",
              "PR",
              "DC",
              "OR",
              "UT",
              "KS",
              "RI",
              "IA",
              "NM",
              "HI",
              "NE",
              "WV",
              "NH",
              "ID",
              "ME",
              "ND",
              "AK",
              "MT",
              "SD",
              "WY",
              "VT",
              "VI",
              "AE",
              "UNITED STATES MINOR OUTLYING ISLANDS",
              "AP",
              "GU",
              "AS",
              "AA",
              "FM",
              "MP",
              "PW",
              "MH"
            ],
            "type": "string",
            "description": "Exact two-letter state of the consumer (all 63 values the source returns, including territories and military codes). TX ~2.44M, FL ~2.43M, CA ~1.76M. Blank = any.",
            "default": ""
          },
          "tags": {
            "title": "Special population tag",
            "enum": [
              "",
              "Servicemember",
              "Older American",
              "Older American, Servicemember"
            ],
            "type": "string",
            "description": "The Bureau's own special-population tag. Servicemember ~512k, Older American ~235k, both ~59k. Blank = any.",
            "default": ""
          },
          "companyResponse": {
            "title": "Company response",
            "enum": [
              "",
              "Closed with explanation",
              "Closed with non-monetary relief",
              "In progress",
              "Closed with monetary relief",
              "Untimely response",
              "Closed without relief",
              "Closed",
              "Closed with relief"
            ],
            "type": "string",
            "description": "Exact company response (all 8 values). 'Closed with explanation' ~10.9M, 'Closed with non-monetary relief' ~5.9M, 'In progress' ~624k. Blank = any.",
            "default": ""
          },
          "timely": {
            "title": "Timely response",
            "enum": [
              "",
              "Yes",
              "No"
            ],
            "type": "string",
            "description": "Whether the company responded within the period set by statute. Yes ~17.6M, No ~109k. Blank = any.",
            "default": ""
          },
          "submittedVia": {
            "title": "Submitted via",
            "enum": [
              "",
              "Web",
              "Referral",
              "Phone",
              "Postal mail",
              "Fax",
              "Email"
            ],
            "type": "string",
            "description": "The channel the complaint came through. Web ~17.1M, Referral ~279k, Phone ~221k, Postal mail ~111k. Blank = any.",
            "default": ""
          },
          "hasNarrative": {
            "title": "Has published narrative",
            "enum": [
              "",
              "true",
              "false"
            ],
            "type": "string",
            "description": "Leave blank for all complaints. 'true' = only complaints whose consumer narrative was published (~3.85M). 'false' = only those without one. Blank is NOT the same as 'false' — 'false' excludes every narrative record.",
            "default": ""
          },
          "dateFrom": {
            "title": "Received on or after",
            "type": "string",
            "description": "Only complaints received on or after this date (YYYY-MM-DD). Takes precedence over recentDays. Blank = any.",
            "default": ""
          },
          "dateTo": {
            "title": "Received on or before",
            "type": "string",
            "description": "Only complaints received on or before this date (YYYY-MM-DD). Blank = any.",
            "default": ""
          },
          "recentDays": {
            "title": "Received in the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "'Received in the last N days' (e.g. 30). 0 = no window of its own — which is the default, and how you get a company's or a product's FULL history. A run with no other filter and 0 here still works (it pages the whole register). Ignored when dateFrom is set.",
            "default": 0
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "product",
              "subProduct",
              "issue",
              "state",
              "companyResponse",
              "submittedVia",
              "timely",
              "tags",
              "hasNarrative"
            ],
            "type": "string",
            "description": "Dimension to count by in mode=aggregate: product (21 values), subProduct (86), issue (178), state (63), companyResponse (8), submittedVia (6), timely (2), tags (3), hasNarrative (2). Not used in rows mode.",
            "default": "product"
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap on records pushed in rows mode (0 = up to 10,000, the source's own result window). Each record is metered individually, so there is no per-run charge cap. Aggregate mode returns every group.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}