{
  "openapi": "3.0.1",
  "info": {
    "title": "Vander Haag's Parts Scraper — Heavy Truck Parts Prices & Stock",
    "description": "Scrape Vander Haag's heavy-truck parts and whole trucks: price, stock, yard, OEM part number, fitment, and donor VIN. Search, part-number lists, SKUs, monitoring, and a catalog export of the full inventory.",
    "version": "0.1",
    "x-build-id": "RrgkiaWDENexwW8rR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawloop~vanderhaags-parts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawloop-vanderhaags-parts-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/crawloop~vanderhaags-parts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawloop-vanderhaags-parts-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/crawloop~vanderhaags-parts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawloop-vanderhaags-parts-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": "Mode",
            "enum": [
              "search",
              "details",
              "partNumbers",
              "urls",
              "trucks",
              "catalog"
            ],
            "type": "string",
            "description": "search = filter cards. details = same search plus a detail page per SKU. partNumbers = one keyword search per part or cross-reference. urls = startUrls and/or skus. trucks = whole units. catalog = every inventory type (search by default; sitemap is optional).",
            "default": "search"
          },
          "catalogSource": {
            "title": "Catalog source",
            "enum": [
              "search",
              "sitemap"
            ],
            "type": "string",
            "description": "Used when mode is catalog. search enumerates Search-Results.php for each homepage inventory type (500 per page, datacenter token session). sitemap walks sitemap files and fetches each detail page.",
            "default": "search"
          },
          "catalogCategories": {
            "title": "Catalog categories",
            "type": "array",
            "description": "Inventory type slugs to walk in catalog search. Empty means every type from the homepage nav.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "string",
            "description": "keywordsearch: part number, cross-reference, or free text.",
            "default": ""
          },
          "partNumbers": {
            "title": "Part numbers",
            "type": "array",
            "description": "Part or cross-reference numbers. partNumbers mode runs keywordsearch once per value.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Top-nav category slug, for example engine or hood-and-front-end.",
            "default": ""
          },
          "subcategory": {
            "title": "Subcategory",
            "type": "string",
            "description": "Subcategory slug, for example hood-and-front-end-bumper.",
            "default": ""
          },
          "inventoryType": {
            "title": "Inventory type",
            "type": "string",
            "description": "Part type or unit type slug: truck, trailer, parts-unit, equipment-units, engine-assembly, bumper-assembly-front, and so on. trucks mode forces truck.",
            "default": ""
          },
          "manufacturer": {
            "title": "Manufacturer",
            "type": "string",
            "description": "Make slug, for example peterbilt, cummins, sterling.",
            "default": ""
          },
          "model": {
            "title": "Model",
            "type": "string",
            "description": "Model slug, for example l9513.",
            "default": ""
          },
          "itemCategory": {
            "title": "Whole-unit category",
            "type": "string",
            "description": "itemcategory for trucks and equipment, for example Tractor, Tandem Axle Day Cab.",
            "default": ""
          },
          "conditions": {
            "title": "Conditions",
            "type": "array",
            "description": "Sent as filters[0][]. Leave empty for every condition.",
            "items": {
              "type": "string",
              "enum": [
                "NEW",
                "USED",
                "REBUILT",
                "FOR PARTS"
              ],
              "enumTitles": [
                "New",
                "Used",
                "Rebuilt",
                "For parts"
              ]
            },
            "default": []
          },
          "stores": {
            "title": "Yards",
            "type": "array",
            "description": "Store codes from the header menu. One search per yard. Empty means every yard.",
            "items": {
              "type": "string",
              "enum": [
                "CB",
                "DA",
                "DM",
                "IN",
                "KC",
                "CO",
                "LV",
                "SF",
                "SP",
                "SL",
                "SV",
                "WM"
              ],
              "enumTitles": [
                "Council Bluffs, IA",
                "Dallas, TX",
                "Des Moines, IA",
                "Indianapolis, IN",
                "Kansas City, MO",
                "London, OH",
                "Louisville, KY",
                "Sioux Falls, SD",
                "Spencer, IA",
                "St Louis, MO",
                "Stephenville, TX",
                "Winamac, IN"
              ]
            },
            "default": []
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "match",
              "lowest-price",
              "highest-price"
            ],
            "type": "string",
            "description": "order= on the search page. Keep this stable for a query monitor.",
            "default": "match"
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Search-Results, detailview (part= or a filter URL), or trucks.php. Detail URLs are fetched over HTTP. Search URLs need the WAF token.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "skus": {
            "title": "SKUs",
            "type": "array",
            "description": "Inventory ids. Detail pages are fetched over HTTP with no WAF. With monitor mode on, this is the fixed SKU watch.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeDetails": {
            "title": "Include detail pages",
            "type": "boolean",
            "description": "After a card search, open detailview.php for each SKU. details mode always does this.",
            "default": false
          },
          "includeStoreAvailability": {
            "title": "Include store availability",
            "type": "boolean",
            "description": "On detail rows, fill storeAvailability from the quantity table.",
            "default": true
          },
          "includeUnitParts": {
            "title": "Include parts from the donor unit",
            "type": "boolean",
            "description": "For a truck (or any row with vehicleId), also search that donor unit. The parts search needs the WAF token.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum rows to save. 0 means no limit.",
            "default": 0
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Save one key-value record per SKU in monitorStoreName. A search rerun emits new, price_changed, stock_changed, and removed. A skus list re-checks those detail pages over HTTP.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Named key-value store. Each SKU is its own key. Use one name per watch.",
            "default": "vanderhaags-monitor"
          },
          "resetMonitorState": {
            "title": "Reset monitor state",
            "type": "boolean",
            "description": "Delete the saved window before this run. The run becomes a new baseline.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "US Apify proxy. Datacenter is the default. After 3 blocks the run switches to US residential.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyCountry": "US"
            }
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Parallel detail fetches (1–10).",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}