{
  "openapi": "3.0.1",
  "info": {
    "title": "⚙️ NHTSA Vehicle Data Scraper",
    "description": "Query federal NHTSA endpoints to extract accurate automotive recall feeds, component defect notices, and compliance records for any vehicle fleet.",
    "version": "0.1",
    "x-build-id": "2TDLT4DmsTjRLUMt8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/taroyamada~nhtsa-vehicle-recall-digest/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-taroyamada-nhtsa-vehicle-recall-digest",
        "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/taroyamada~nhtsa-vehicle-recall-digest/runs": {
      "post": {
        "operationId": "runs-sync-taroyamada-nhtsa-vehicle-recall-digest",
        "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/taroyamada~nhtsa-vehicle-recall-digest/run-sync": {
      "post": {
        "operationId": "run-sync-taroyamada-nhtsa-vehicle-recall-digest",
        "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": {
          "feeds": {
            "title": "Feeds to monitor",
            "type": "array",
            "description": "One digest row per watched vehicle, VIN, or manufacturer feed.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "title": "Feed ID",
                  "type": "string",
                  "description": "Stable identifier used for snapshots and output rows."
                },
                "name": {
                  "title": "Feed name",
                  "type": "string",
                  "description": "Human-readable label for the digest row."
                },
                "type": {
                  "title": "Feed type",
                  "type": "string",
                  "enum": [
                    "vehicle",
                    "vin",
                    "manufacturer"
                  ],
                  "description": "vehicle = make/model/year, vin = VIN decode watch, manufacturer = company portfolio."
                },
                "make": {
                  "title": "Make",
                  "type": "string",
                  "description": "Vehicle make or manufacturer name used by vehicle and manufacturer feeds."
                },
                "model": {
                  "title": "Model family",
                  "type": "string",
                  "description": "Used by vehicle feeds; the actor expands official model variants when possible."
                },
                "modelYear": {
                  "title": "Model year",
                  "type": "integer",
                  "minimum": 1900,
                  "maximum": 2100,
                  "description": "Specific model year used by vehicle feeds."
                },
                "modelYears": {
                  "title": "Model years",
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "minimum": 1900,
                    "maximum": 2100
                  },
                  "description": "Used by manufacturer feeds."
                },
                "models": {
                  "title": "Models",
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Optional model families for manufacturer feeds."
                },
                "vin": {
                  "title": "VIN",
                  "type": "string",
                  "description": "17-character VIN for VIN feeds."
                },
                "recallLookbackDays": {
                  "title": "Recall lookback days (override)",
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3650,
                  "description": "Optional feed-specific override for recall lookback days."
                },
                "complaintLookbackDays": {
                  "title": "Complaint lookback days (override)",
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 3650,
                  "description": "Optional feed-specific override for complaint lookback days."
                },
                "maxRecalls": {
                  "title": "Max recalls (override)",
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500,
                  "description": "Optional feed-specific cap on recall evidence rows."
                },
                "maxComplaints": {
                  "title": "Max complaints (override)",
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 500,
                  "description": "Optional feed-specific cap on complaint evidence rows."
                },
                "maxModels": {
                  "title": "Max discovered models (override)",
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 100,
                  "description": "Optional feed-specific cap on manufacturer model expansion."
                },
                "complaintAlertThreshold": {
                  "title": "Complaint alert threshold (override)",
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 50,
                  "description": "Optional feed-specific threshold that elevates complaint spikes to action_needed."
                }
              }
            }
          },
          "recallLookbackDays": {
            "title": "Recall lookback days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Default recall lookback window used when a feed-specific override is not set.",
            "default": 30
          },
          "complaintLookbackDays": {
            "title": "Complaint lookback days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Default complaint lookback window used when a feed-specific override is not set.",
            "default": 90
          },
          "maxRecallsPerVehicle": {
            "title": "Max recalls per vehicle",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Default cap on recall evidence rows per feed.",
            "default": 50
          },
          "maxComplaintsPerVehicle": {
            "title": "Max complaints per vehicle",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Default cap on complaint evidence rows per feed.",
            "default": 100
          },
          "maxDiscoveredModelsPerFeed": {
            "title": "Max discovered models per feed",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Default cap on manufacturer model expansion before complaints and recalls are fetched.",
            "default": 12
          },
          "maxEvidenceItems": {
            "title": "Max evidence items per section",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Upper bound on recall or complaint items retained in each digest section.",
            "default": 10
          },
          "complaintAlertThreshold": {
            "title": "Complaint alert threshold",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Complaint-count threshold that escalates a digest to action_needed.",
            "default": 3
          },
          "delivery": {
            "title": "Delivery mode",
            "enum": [
              "dataset",
              "webhook"
            ],
            "type": "string",
            "description": "dataset writes digest rows to the Apify dataset. webhook POSTs the digest payload to webhookUrl.",
            "default": "dataset"
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST target used when delivery=webhook."
          },
          "datasetMode": {
            "title": "Dataset mode",
            "enum": [
              "all",
              "action_needed",
              "new_only"
            ],
            "type": "string",
            "description": "Choose whether delivery includes all digests, only action-needed digests, or only feeds with new evidence.",
            "default": "all"
          },
          "snapshotKey": {
            "title": "Snapshot key",
            "type": "string",
            "description": "Stable key used to persist seen recalls and complaints across recurring runs.",
            "default": "nhtsa-vehicle-recall-digest-state"
          },
          "notifyOnNoNew": {
            "title": "Notify when nothing is new",
            "type": "boolean",
            "description": "When false, stable feeds are omitted from delivery outputs unless they errored.",
            "default": true
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout seconds",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each NHTSA API request.",
            "default": 30
          },
          "batchDelayMs": {
            "title": "Delay between feeds (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Milliseconds to wait between feed fetches.",
            "default": 600
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Skip snapshot writes and webhook delivery while still producing local output.",
            "default": false
          },
          "nowIso": {
            "title": "Override current time",
            "type": "string",
            "description": "ISO timestamp used for deterministic tests and reproducible proofs."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}