{
  "openapi": "3.0.1",
  "info": {
    "title": "CFPB Complaint Narratives - Consumer Text Archive",
    "description": "Complaint narratives from the CFPB public database (public data, ~3.85M complaints, March 2015-Aug 2026, CFPB-redacted): filter by date, product, issue, company, state or tag, or search the narrative text. The live register no longer publishes narratives; this is the archived text.",
    "version": "0.0",
    "x-build-id": "3GIp4AIdETXemhpkY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~cfpb-complaint-narratives/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-cfpb-complaint-narratives",
        "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-complaint-narratives/runs": {
      "post": {
        "operationId": "runs-sync-j0401-cfpb-complaint-narratives",
        "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-complaint-narratives/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-cfpb-complaint-narratives",
        "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 = narrative-bearing complaints matching your filters, newest first. aggregate = one count row per group for the chosen groupBy dimension.",
            "default": "rows"
          },
          "dateFrom": {
            "title": "Received from",
            "type": "string",
            "description": "Earliest date received (YYYY-MM-DD). Required for a filtered run; one run covers at most two quarters (half a year). The archive carries narratives received 2015-03-19 through 2026-08-14.",
            "default": ""
          },
          "dateTo": {
            "title": "Received to",
            "type": "string",
            "description": "Latest date received (YYYY-MM-DD), inclusive. Narratives were published only through 2026-08-14 (the register itself starts in 2011).",
            "default": ""
          },
          "product": {
            "title": "Product",
            "type": "string",
            "description": "Exact product name, e.g. 'Credit reporting or other personal consumer reports', 'Debt collection', 'Mortgage'. Blank = any.",
            "default": ""
          },
          "subProduct": {
            "title": "Sub-product",
            "type": "string",
            "description": "Exact sub-product, e.g. 'Credit reporting', 'Checking account'. Blank = any.",
            "default": ""
          },
          "issue": {
            "title": "Issue",
            "type": "string",
            "description": "Exact issue, e.g. \"Incorrect information on your report\". Blank = any.",
            "default": ""
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Two-letter state code, e.g. TX. Blank = any.",
            "default": ""
          },
          "company": {
            "title": "Company",
            "type": "string",
            "description": "Exact company name as the Bureau normalizes it, e.g. 'EQUIFAX, INC.'. Blank = any.",
            "default": ""
          },
          "tags": {
            "title": "Tags",
            "type": "string",
            "description": "Special-population tag: 'Servicemember', 'Older American' or 'Older American, Servicemember'. Blank = any.",
            "default": ""
          },
          "companyResponse": {
            "title": "Company response",
            "type": "string",
            "description": "Exact response, e.g. 'Closed with explanation'. Blank = any.",
            "default": ""
          },
          "timely": {
            "title": "Timely response",
            "enum": [
              "",
              "Yes",
              "No"
            ],
            "type": "string",
            "description": "Whether the company responded in time. Blank = any.",
            "default": ""
          },
          "submittedVia": {
            "title": "Submitted via",
            "type": "string",
            "description": "Submission channel. The archive carries only \"Web\"; any other value fails as not present. Blank = any.",
            "default": ""
          },
          "searchTerm": {
            "title": "Search term",
            "type": "string",
            "description": "Case-insensitive substring match across the narrative text and the product / issue / company fields. Blank = any.",
            "default": ""
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "product",
              "subProduct",
              "issue",
              "state",
              "companyResponse",
              "timely",
              "submittedVia",
              "tags"
            ],
            "type": "string",
            "description": "Dimension to count by in mode=aggregate. Not used in rows mode.",
            "default": "product"
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on delivered narrative records (default 50, up to 5000). Does not apply in aggregate mode. The scan behind it is not billed.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}