{
  "openapi": "3.0.1",
  "info": {
    "title": "CFPB Consumer Complaints Monitor",
    "description": "Search and monitor the official CFPB Consumer Complaint Database by company, product, issue, state and date. New-since-last-run alerts or per-company trend summaries with response stats. Published fields only, 3-digit ZIP. No API key.",
    "version": "0.2",
    "x-build-id": "OCguqN2ZpCjq7ncQ9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/transparent_meteorite~cfpb-consumer-complaints-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-transparent_meteorite-cfpb-consumer-complaints-monitor",
        "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/transparent_meteorite~cfpb-consumer-complaints-monitor/runs": {
      "post": {
        "operationId": "runs-sync-transparent_meteorite-cfpb-consumer-complaints-monitor",
        "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/transparent_meteorite~cfpb-consumer-complaints-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-transparent_meteorite-cfpb-consumer-complaints-monitor",
        "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": [
              "complaints",
              "newSince",
              "companySummary"
            ],
            "type": "string",
            "description": "Complaints = list matching complaints, newest first. New since last run = same, but never returns a complaint you already received (schedule it for monitoring). Company summary = one row per company with counts, change vs the previous period, monthly trend, top products/issues/states and response stats.",
            "default": "complaints"
          },
          "companies": {
            "title": "Companies",
            "type": "array",
            "description": "Company names, for example Wells Fargo, Chase, Navy Federal. Matched by words, so Wells Fargo finds WELLS FARGO & COMPANY. Leave empty for all companies (in summary mode: the top companies by complaint volume).",
            "default": [
              "Wells Fargo"
            ],
            "items": {
              "type": "string"
            }
          },
          "exactCompanyName": {
            "title": "Exact company name",
            "type": "boolean",
            "description": "Match the company name exactly as CFPB spells it (for example WELLS FARGO & COMPANY) instead of by words.",
            "default": false
          },
          "products": {
            "title": "Products",
            "type": "array",
            "description": "CFPB product names, for example Credit card, Debt collection, Mortgage, Checking or savings account. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "issues": {
            "title": "Issues",
            "type": "array",
            "description": "CFPB issue names, for example Fraud or scam. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Consumer states",
            "type": "array",
            "description": "Two-letter state codes of the consumer, for example MI, TX. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lookbackDays": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Date range start = today minus this many days. Ignored when you set a start date.",
            "default": 30
          },
          "dateFrom": {
            "title": "Start date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD, date the complaint was received. Overrides the look-back.",
            "default": ""
          },
          "dateTo": {
            "title": "End date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD. Empty = up to the latest data.",
            "default": ""
          },
          "companyResponses": {
            "title": "Company responses",
            "type": "array",
            "description": "Keep only these outcomes, for example Closed with monetary relief, Closed with explanation, In progress. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "timelyResponse": {
            "title": "Timely response",
            "enum": [
              "any",
              "Yes",
              "No"
            ],
            "type": "string",
            "description": "Filter on whether the company answered on time.",
            "default": "any"
          },
          "submittedVia": {
            "title": "Submitted via",
            "type": "array",
            "description": "Channel the complaint came in, for example Web, Phone, Referral, Postal mail. Empty = all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchText": {
            "title": "Search text",
            "type": "string",
            "description": "Free text matched against the published complaint fields. Ignored for a company when a company name is set.",
            "default": ""
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on rows delivered (and charged) this run, up to 5,000. In summary mode: the number of companies, up to 100. Start with 25.",
            "default": 25
          },
          "trendMonths": {
            "title": "Trend months (summary mode)",
            "minimum": 2,
            "maximum": 24,
            "type": "integer",
            "description": "How many calendar months of history to include in each company summary.",
            "default": 6
          },
          "skipSeen": {
            "title": "Skip complaints already delivered (new-since mode)",
            "type": "boolean",
            "description": "In new-since mode, never return a complaint delivered in an earlier run. Turn off to return everything again.",
            "default": true
          },
          "maxApiRequests": {
            "title": "Max API requests",
            "minimum": 5,
            "maximum": 3000,
            "type": "integer",
            "description": "Safety cap on calls to the CFPB API for this run. A run that hits it returns what it found and says so.",
            "default": 200
          },
          "maxRunSeconds": {
            "title": "Max run time (seconds)",
            "minimum": 30,
            "maximum": 3600,
            "type": "integer",
            "description": "The run stops after this long and delivers what it found.",
            "default": 600
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Name of the key-value store remembering delivered complaints. Change it to keep separate monitors.",
            "default": "cfpb-consumer-complaints-monitor-seen"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}