{
  "openapi": "3.0.1",
  "info": {
    "title": "NHTSA Vehicle Safety Profiles - Recalls, Complaints, NCAP & VIN",
    "description": "One row per vehicle (make, model, year) from NHTSA's official APIs: recalls with remedies, complaint counts by component with crash/injury/death totals, NCAP star ratings and defect investigations. Bulk VIN decoding via vPIC. Unofficial; not affiliated with NHTSA.",
    "version": "0.1",
    "x-build-id": "6QuGhrUniOcZUOhdj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpopendata~us-nhtsa-vehicle-safety/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpopendata-us-nhtsa-vehicle-safety",
        "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/jpopendata~us-nhtsa-vehicle-safety/runs": {
      "post": {
        "operationId": "runs-sync-jpopendata-us-nhtsa-vehicle-safety",
        "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/jpopendata~us-nhtsa-vehicle-safety/run-sync": {
      "post": {
        "operationId": "run-sync-jpopendata-us-nhtsa-vehicle-safety",
        "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": {
          "vehicles": {
            "title": "Vehicles (make, model, model year)",
            "type": "array",
            "description": "One vehicle per line: make, model and model year in any order of year, e.g. \"2020 Honda Accord\", \"Toyota RAV4 2019-2021\" (a range gives one row per year), \"Ford F-150 2018 2020\" or \"Honda | Accord | 2020\". A make and year without a model (\"Honda 2020\") returns every model NHTSA lists for that make and year. Names are matched to NHTSA's own spelling (\"CRV\" finds CR-V, \"F150\" finds F-150, \"Chevy\" finds CHEVROLET). If a name has no exact match, its variants are used (\"Silverado\" gives SILVERADO 1500, 2500 and 3500). Entries that match nothing are listed with suggestions in the log and in RUN_SUMMARY, and are not charged.",
            "default": [
              "2020 Honda Accord",
              "2020 Toyota RAV4",
              "2020 Tesla Model 3"
            ],
            "items": {
              "type": "string"
            }
          },
          "vins": {
            "title": "VINs (optional)",
            "type": "array",
            "description": "Optional. 17-character VINs, one per line (spaces, hyphens and lower case are fine). Each VIN is decoded with NHTSA vPIC (year, make, model, trim, engine, plant, safety equipment) and gets one row with the safety profile of its make, model and year. Recalls are listed for the model year, not for the individual vehicle: this Actor cannot tell whether a specific VIN has been repaired. Up to 5,000 VINs per run (one decode request each, 1.2 s apart: about 2,500-3,000 VINs fit in the default 1-hour timeout; raise the timeout for more). VINs vPIC cannot decode are listed in RUN_SUMMARY and are not charged.",
            "default": [
              "1HGCM82633A004352"
            ],
            "items": {
              "type": "string"
            }
          },
          "sections": {
            "title": "Sections",
            "type": "array",
            "description": "Which parts of the profile to fetch. Fewer sections = fewer requests per vehicle. Investigations come from NHTSA's investigations file (one download per run, about 4 MB).",
            "items": {
              "type": "string",
              "enum": [
                "recalls",
                "complaints",
                "ratings",
                "investigations"
              ],
              "enumTitles": [
                "Recalls (campaigns, dates, components, summary, remedy)",
                "Complaints (counts, components, crash/fire/injury/death totals)",
                "NCAP 5-Star Safety Ratings",
                "Defect investigations (open and closed)"
              ]
            },
            "default": [
              "recalls",
              "complaints",
              "ratings",
              "investigations"
            ]
          },
          "includeModelVariants": {
            "title": "Include model variants",
            "type": "boolean",
            "description": "Also return every NHTSA model whose name starts with the one you typed, even when an exact match exists: \"Civic\" then also gives CIVIC HATCHBACK, CIVIC SI and CIVIC TYPE R rows. Off = exact match only (variants are still used when there is no exact match).",
            "default": false
          },
          "maxComplaintRecords": {
            "title": "Complaint records per vehicle",
            "type": "integer",
            "description": "0..1000. Also list up to this many of the newest complaints per vehicle, each with its NHTSA ODI number, filing date, incident date, components and the crash, fire, injury and death fields. The consumer's written description is never included. 0 = counts and breakdowns only.",
            "default": 0
          },
          "maxItems": {
            "title": "Max rows",
            "type": "integer",
            "description": "Maximum rows (1..10000). One row per vehicle per model year, plus one row per VIN. You are charged per row.",
            "default": 100
          },
          "maxApiRequests": {
            "title": "Max API requests",
            "type": "integer",
            "description": "Hard budget of requests to NHTSA's APIs for the whole run (1..20000). Requests are sent one at a time, at least 1.2 seconds apart. A vehicle costs about 4 to 6 requests (recalls, complaints, NCAP list and one request per rated variant), plus one model-list request per make and year and one decode per VIN. If the budget runs out, the run still succeeds with the rows already produced (complete=false in RUN_SUMMARY).",
            "default": 300
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional and normally not needed: NHTSA's APIs answer Apify datacenter IPs. If set, one sticky session is used for the whole run (never rotation).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}