{
  "openapi": "3.0.1",
  "info": {
    "title": "NHTSA Vehicles Scraper",
    "description": "Decode VINs and pull that vehicle's recalls, owner complaints and crash-test ratings in one run. NHTSA answers an unknown model name with a clean HTTP 200 zero - 'F-150' returns nothing while 'F-150 SUPERCAB' returns 1,425 complaints - so model names are resolved and deduplicated first.",
    "version": "0.1",
    "x-build-id": "0v1zogmuKvvlaR0Tq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/xtracto~nhtsa-vehicles-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-xtracto-nhtsa-vehicles-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/xtracto~nhtsa-vehicles-scraper/runs": {
      "post": {
        "operationId": "runs-sync-xtracto-nhtsa-vehicles-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/xtracto~nhtsa-vehicles-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-xtracto-nhtsa-vehicles-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": "What to collect",
            "enum": [
              "vin",
              "recalls",
              "complaints",
              "safetyRatings"
            ],
            "type": "string",
            "description": "vin = decode VINs, optionally pulling that vehicle's recalls, complaints and safety ratings in the same run. The other three query one make/model/year directly.",
            "default": "vin"
          },
          "vins": {
            "title": "VINs",
            "type": "array",
            "description": "For mode='vin'. 17 characters each; dashes and spaces are stripped. Decoded in batches of 50. WARNING about NHTSA itself: a VIN with a WRONG CHECK DIGIT still decodes into a full, plausible-looking record — only errorCodes and decodedCleanly separate it from a real one.",
            "items": {
              "type": "string"
            }
          },
          "make": {
            "title": "Make",
            "type": "string",
            "description": "For the recalls / complaints / safetyRatings modes. Case-insensitive."
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "For the recalls / complaints / safetyRatings modes. api.nhtsa.gov uses its own model vocabulary: 'F-150' returns a clean zero, because it knows only 'F-150 REGULAR CAB', 'F-150 SUPER CREW' and 'F-150 SUPERCAB'. Leave the model resolver on and this is handled for you."
          },
          "modelYear": {
            "title": "Model year",
            "type": "string",
            "description": "Four-digit year, for the recalls / complaints / safetyRatings modes."
          },
          "includeRecalls": {
            "title": "Include recalls (VIN mode)",
            "type": "boolean",
            "description": "After decoding each VIN, also pull that vehicle's recall campaigns.",
            "default": false
          },
          "includeComplaints": {
            "title": "Include complaints (VIN mode)",
            "type": "boolean",
            "description": "After decoding each VIN, also pull owner complaints filed with NHTSA. Popular vehicles have thousands — use Max rows.",
            "default": false
          },
          "includeSafetyRatings": {
            "title": "Include safety ratings (VIN mode)",
            "type": "boolean",
            "description": "After decoding each VIN, also pull NCAP crash-test star ratings. One model year is several separately rated vehicles (2-door, 4-door, with and without side airbags), so this returns a row per rated variant.",
            "default": false
          },
          "resolveModelName": {
            "title": "Resolve model names against NHTSA's vocabulary",
            "type": "boolean",
            "description": "On by default, and you almost certainly want it. NHTSA answers an unknown model name with HTTP 200, count 0 and 'Results returned successfully' — indistinguishable from a vehicle with no records. This looks the name up first, and when several variants match it fetches all of them and deduplicates: the F-150 variants are aliases for ONE set of 1,425 complaints, so summing them would report 4,275.",
            "default": true
          },
          "maxResults": {
            "title": "Max rows",
            "minimum": 0,
            "type": "integer",
            "description": "Set 0 for unlimited. In VIN mode this caps the ENRICHMENT rows per VIN (recalls + complaints + ratings) so that no vehicle you named is ever dropped from the output; in the other modes it caps the whole run.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many VINs to enrich at once in VIN mode.",
            "default": 4
          },
          "minRequestInterval": {
            "title": "Min seconds between request starts",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Politeness pacing shared across all workers. 0 uses the built-in default. NHTSA publishes no rate limit and never returned a 429 in reconnaissance; this is courtesy toward a public service, not a measured ceiling.",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Off by default. These are published US government open-data APIs with no WAF — there is nothing to get past.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}