{
  "openapi": "3.0.1",
  "info": {
    "title": "NHTSA Vehicle Safety Scraper - Recalls, Complaints & Ratings",
    "description": "Scrape NHTSA vehicle safety data by make/model/year, VIN, NHTSA id or date window: recalls with affected vehicles and PDFs, owner complaints with crash/fire/injury flags, NCAP crash-test ratings, defect investigations, service bulletins, VIN decoding. Monitor mode. No API key.",
    "version": "0.1",
    "x-build-id": "clXTcaNkjQlWgp2J3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~nhtsa-vehicle-safety-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-nhtsa-vehicle-safety-scraper",
        "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/scrapersdelight~nhtsa-vehicle-safety-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-nhtsa-vehicle-safety-scraper",
        "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/scrapersdelight~nhtsa-vehicle-safety-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-nhtsa-vehicle-safety-scraper",
        "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": "Look up by",
            "enum": [
              "vehicles",
              "vins",
              "ids",
              "recent"
            ],
            "type": "string",
            "description": "Vehicles = make, model and year lines. VINs = decode each VIN, then its vehicle's records. NHTSA IDs = recall campaigns, complaint ODI numbers, investigations, bulletins. Latest activity = everything NHTSA logged in the date window.",
            "default": "vehicles"
          },
          "vehicles": {
            "title": "Vehicles",
            "type": "array",
            "description": "One per line: \"Make, Model, Year\". A year range works (\"Ford, F-150, 2015-2018\"); \"Ford, *, 2020\" reads every model NHTSA lists for Ford 2020. Used when Look up by = Vehicles.",
            "items": {
              "type": "string"
            }
          },
          "vins": {
            "title": "VINs",
            "type": "array",
            "description": "17-character VINs, one per line, e.g. 1HGCV1F34LA000001. Each is decoded with NHTSA's vPIC decoder, then its vehicle's records are read. Used when Look up by = VINs.",
            "items": {
              "type": "string"
            }
          },
          "nhtsaIds": {
            "title": "NHTSA IDs",
            "type": "array",
            "description": "Recall campaigns (20V771000 or 20V771), complaint ODI numbers (11770490), investigations (EA24002, PE22003) or bulletins (MC-11037688). Used when Look up by = NHTSA IDs.",
            "items": {
              "type": "string"
            }
          },
          "recordTypes": {
            "title": "Record types",
            "type": "array",
            "description": "Which NHTSA records to return. Bulletins and the vehicle summary come from vehicle and VIN lookups; the date-window feed covers recalls, complaints and investigations.",
            "items": {
              "type": "string",
              "enum": [
                "recalls",
                "complaints",
                "safetyRatings",
                "investigations",
                "manufacturerCommunications",
                "vehicleSummary"
              ],
              "enumTitles": [
                "Recalls",
                "Owner complaints",
                "NCAP crash-test ratings",
                "Defect investigations",
                "Manufacturer communications (service bulletins)",
                "Vehicle safety summary (one row per vehicle)"
              ]
            },
            "default": [
              "recalls",
              "complaints",
              "safetyRatings",
              "investigations"
            ]
          },
          "includeDetails": {
            "title": "Add affected vehicles + documents",
            "type": "boolean",
            "description": "Adds the affected-vehicle list (make, model, year, production dates) and the PDF documents (Part 573 report, owner letters, investigation resumes) to each recall and investigation row.",
            "default": true
          },
          "includeVinDecode": {
            "title": "VIN decode row",
            "type": "boolean",
            "description": "VIN mode: one row per VIN with the decoded factory specification (engine, body, plant, safety equipment; up to ~150 vPIC fields). VINs that do not decode are listed free.",
            "default": true
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Only records dated on or after this day: recall report date, complaint filing date, investigation open date, bulletin date. YYYY-MM-DD or relative: 30d, 12w, 6m, 1y, ytd. Latest activity mode defaults to 7d."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Only records dated on or before this day (included). Same formats as Date from. Empty = up to today."
          },
          "complaintSeverity": {
            "title": "Complaint severity",
            "enum": [
              "any",
              "anySevere",
              "crash",
              "fire",
              "crashOrFire",
              "injury",
              "death",
              "injuryOrDeath"
            ],
            "type": "string",
            "description": "Keep only complaints that report a crash, a fire, an injury or a death. Counts are as the owner reported them.",
            "default": "any"
          },
          "componentKeywords": {
            "title": "Component contains",
            "type": "array",
            "description": "Keep recalls, complaints, investigations and bulletins whose NHTSA component contains any of these words, e.g. AIR BAGS, SERVICE BRAKES, ENGINE, FUEL. Case-insensitive.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Text contains",
            "type": "array",
            "description": "Keep records whose subject, summary, consequence or remedy contains any of these words, e.g. \"stall\", \"fire\", \"software\".",
            "items": {
              "type": "string"
            }
          },
          "excludeKeywords": {
            "title": "Text excludes",
            "type": "array",
            "description": "Drop records whose subject, summary, consequence or remedy contains any of these words.",
            "items": {
              "type": "string"
            }
          },
          "parkItOnly": {
            "title": "Do-not-drive / park-outside recalls only",
            "type": "boolean",
            "description": "Recalls: keep only those with NHTSA's Do Not Drive (park it) or Park Outside advisory.",
            "default": false
          },
          "investigationStatus": {
            "title": "Investigation status",
            "enum": [
              "any",
              "open",
              "closed"
            ],
            "type": "string",
            "description": "Investigations: keep open ones, closed ones, or both.",
            "default": "any"
          },
          "minOverallRating": {
            "title": "Minimum overall NCAP stars",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Crash-test ratings: keep variants with at least this many overall stars (1-5). 0 = all.",
            "default": 0
          },
          "makes": {
            "title": "Makes (latest activity mode)",
            "type": "array",
            "description": "Latest NHTSA activity mode: keep only records for these makes, e.g. FORD, TESLA, TOYOTA. Empty = every make.",
            "items": {
              "type": "string"
            }
          },
          "monitorMode": {
            "title": "Only new records",
            "type": "boolean",
            "description": "Skip records an earlier run with the same inputs already delivered (recalls, complaints, ratings, investigations, bulletins). Pairs with a daily or weekly schedule.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "Optional label that keeps a separate memory, e.g. \"fleet-a\". Empty = one memory per input set."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Most rows to return across all vehicles and record types; several vehicles share it so each gets rows. A popular model has 300-2,000 complaints. 0 = no limit.",
            "default": 100
          },
          "maxComplaintsPerVehicle": {
            "title": "Max complaints per vehicle",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Newest complaints first. 0 = every complaint NHTSA holds for the vehicle.",
            "default": 0
          },
          "includeComplaintText": {
            "title": "Complaint text",
            "type": "boolean",
            "description": "Keep the owner's complaint narrative. Off = much smaller rows when you only need dates, components and crash/fire/injury flags.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Not needed: NHTSA's APIs answer Apify's own network. If NHTSA refuses the run's IP, the run switches to Apify residential (US) automatically within a small budget.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}