{
  "openapi": "3.0.1",
  "info": {
    "title": "CFPB & NHTSA Consumer Complaints & Safety Defect Leads Scraper",
    "description": "Scrapes public consumer complaints, regulatory disputes, manufacturer safety defects, and recalls from CFPB and NHTSA registries. Extracts complaint narratives, company responses, crash/fire indicators, and litigation risk scores.",
    "version": "1.0",
    "x-build-id": "T8lhjGUo1uRdBeHL8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apex-b2b-data~consumer-complaints-cfpb-nhtsa-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apex-b2b-data-consumer-complaints-cfpb-nhtsa-leads",
        "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/apex-b2b-data~consumer-complaints-cfpb-nhtsa-leads/runs": {
      "post": {
        "operationId": "runs-sync-apex-b2b-data-consumer-complaints-cfpb-nhtsa-leads",
        "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/apex-b2b-data~consumer-complaints-cfpb-nhtsa-leads/run-sync": {
      "post": {
        "operationId": "run-sync-apex-b2b-data-consumer-complaints-cfpb-nhtsa-leads",
        "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": {
          "source": {
            "title": "Complaint Data Source",
            "enum": [
              "CFPB",
              "NHTSA",
              "BOTH"
            ],
            "type": "string",
            "description": "Target regulatory registry: 'CFPB' for Consumer Financial Protection Bureau complaints, 'NHTSA' for National Highway Traffic Safety Administration vehicle defects, or 'BOTH' to combine both sources.",
            "default": "CFPB"
          },
          "size": {
            "title": "Max Records to Extract",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Total maximum number of complaint records to retrieve and enrich (1 to 5,000).",
            "default": 20
          },
          "searchTerm": {
            "title": "Search Term / Keyword",
            "type": "string",
            "description": "Free-text search query across complaint narratives, issues, and company names.",
            "default": ""
          },
          "company": {
            "title": "Company Name (CFPB)",
            "type": "string",
            "description": "Filter CFPB complaints by target institution (e.g. 'Wells Fargo', 'Bank of America', 'JPMorgan Chase', 'Equifax', 'TransUnion').",
            "default": ""
          },
          "product": {
            "title": "Product Category (CFPB)",
            "type": "string",
            "description": "Filter CFPB complaints by financial product (e.g. 'Credit reporting', 'Debt collection', 'Mortgage', 'Checking or savings account').",
            "default": ""
          },
          "state": {
            "title": "US State (2-letter code)",
            "type": "string",
            "description": "Filter complaints by 2-letter US State postal code (e.g. 'CA', 'TX', 'FL', 'NY').",
            "default": ""
          },
          "hasNarrativeOnly": {
            "title": "Narratives Only",
            "type": "boolean",
            "description": "Only return complaints containing consumer-written dispute descriptions.",
            "default": false
          },
          "nhtsaMake": {
            "title": "Vehicle Make (NHTSA)",
            "type": "string",
            "description": "Vehicle make for NHTSA queries (e.g. 'toyota', 'ford', 'chevrolet', 'tesla', 'honda'). Used when source is NHTSA or BOTH.",
            "default": "toyota"
          },
          "nhtsaModel": {
            "title": "Vehicle Model (NHTSA)",
            "type": "string",
            "description": "Vehicle model for NHTSA queries (e.g. 'camry', 'f-150', 'silverado', 'model 3'). Used when source is NHTSA or BOTH.",
            "default": "camry"
          },
          "nhtsaModelYear": {
            "title": "Vehicle Model Year (NHTSA)",
            "type": "integer",
            "description": "4-digit model year for NHTSA queries (e.g. 2021, 2022, 2023). Used when source is NHTSA or BOTH.",
            "default": 2021
          },
          "minRiskScore": {
            "title": "Minimum Consumer Risk Score (0-100)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Filter out complaints with risk score below this threshold.",
            "default": 0
          },
          "includeRawData": {
            "title": "Include Raw API Response",
            "type": "boolean",
            "description": "Attach the original unmodified upstream API response under `raw_data` for downstream compliance or deep auditing.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}