{
  "openapi": "3.0.1",
  "info": {
    "title": "US Auto Dealer & Repair Shop Leads - DMV Registries",
    "description": "Scrape US auto dealers, repair & body shops, inspection stations, salvage yards & tow operators from official state DMV/DOL registries (NY, WA, MD): business & owner name, license type/number/status, phone, surety bond, address & lead score. Filters + monitoring, no browser.",
    "version": "0.1",
    "x-build-id": "0ZBOZNY1cQNuiWRne"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~us-auto-dealer-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-us-auto-dealer-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/scrapesage~us-auto-dealer-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-us-auto-dealer-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/scrapesage~us-auto-dealer-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-us-auto-dealer-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": {
          "states": {
            "title": "States / registries",
            "type": "array",
            "description": "Which official state automotive-licensing registries to query. <b>NY</b> — DMV facilities (~54.6K: dealers, repair & body shops, inspection stations, dismantlers, transporters; with owner name). <b>WA</b> — Dept. of Licensing vehicle businesses (~38.2K: dealers, wholesalers, tow, wreckers, manufacturers; with <b>phone + surety bond</b>). <b>MD</b> — VEIP-certified emissions repair facilities (with <b>phone + website</b>). Leave empty for all three.",
            "items": {
              "type": "string",
              "enum": [
                "NY",
                "WA",
                "MD"
              ],
              "enumTitles": [
                "New York (DMV)",
                "Washington (DOL)",
                "Maryland (VEIP)"
              ]
            },
            "default": [
              "NY",
              "WA",
              "MD"
            ]
          },
          "businessCategories": {
            "title": "Business categories",
            "type": "array",
            "description": "Filter by automotive business category (matched across every registry's own license codes). Leave empty for ALL categories. Note: not every category exists in every state (e.g. WA has no repair/body shops in this dataset; MD is emissions-repair only) — a registry with no match for the chosen categories is skipped and logged.",
            "items": {
              "type": "string",
              "enum": [
                "dealer",
                "repair",
                "body",
                "inspection",
                "salvage",
                "tow",
                "manufacturer",
                "forhire",
                "broker"
              ],
              "enumTitles": [
                "Dealers (new, used, wholesale, RV, motorcycle, boat, ATV…)",
                "Repair shops",
                "Body / collision shops",
                "Inspection / emissions stations",
                "Salvage, dismantlers, scrap & recyclers",
                "Tow & transporters",
                "Manufacturers",
                "For-hire, limousine & TNC",
                "Brokers & appraisers"
              ]
            }
          },
          "statusActiveOnly": {
            "title": "Active licenses only",
            "type": "boolean",
            "description": "Only return businesses with an active/current license (for NY, which has no status field, this keeps licenses whose expiration date has not passed; MD facilities are listed as currently certified). Turn off to include expired, terminated and historical records.",
            "default": true
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Filter by business city (case-insensitive, exact city name), e.g. <code>Brooklyn</code>, <code>Seattle</code>, <code>Baltimore</code>.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes (prefix)",
            "type": "array",
            "description": "Filter by ZIP — full ZIP (<code>11201</code>) or a prefix (<code>112</code> matches all 112xx).",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "type": "array",
            "description": "Filter by county — applies to NY (DMV county) and MD (VEIP county), e.g. <code>Kings</code>, <code>Queens</code>, <code>Anne Arundel</code>. (Washington's dataset has no county field.)",
            "items": {
              "type": "string"
            }
          },
          "nameQuery": {
            "title": "Business / owner name contains",
            "type": "string",
            "description": "Only return businesses whose name (trade name or owner / legal entity) contains this text (case-insensitive), e.g. <code>auto</code>, <code>toyota</code>, <code>collision</code>."
          },
          "issuedAfter": {
            "title": "Issued on/after (optional)",
            "type": "string",
            "description": "Only licenses first issued on or after this date, <code>YYYY-MM-DD</code> — great for fresh leads (newly-licensed businesses). Applies to NY & WA (MD has no issue date and is skipped when this is set)."
          },
          "expiringBefore": {
            "title": "Expiring before (optional)",
            "type": "string",
            "description": "Only licenses expiring before this date, <code>YYYY-MM-DD</code> — perfect for renewal-timing outreach (bonds, insurance, garage software, supplies). Applies to NY & WA."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of automotive-business records to return in this run (across all selected states).",
            "default": 1000
          },
          "maxResultsPerState": {
            "title": "Max results per state (optional)",
            "minimum": 1,
            "type": "integer",
            "description": "Cap how many records are pulled from each state before the global limit and sorting are applied. Leave blank to use the same value as Max results."
          },
          "sortNewestFirst": {
            "title": "Newest licenses first",
            "type": "boolean",
            "description": "Return the most recently issued / renewed licenses first (best for fresh leads). MD has no dates, so its records are returned in source order.",
            "default": true
          },
          "deduplicateResults": {
            "title": "Deduplicate within a run",
            "type": "boolean",
            "description": "Skip duplicate records within this run (recommended).",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode — only new licenses",
            "type": "boolean",
            "description": "Remember which businesses were already returned (in a named key-value store) and emit ONLY businesses that are new since the last run — each tagged <code>monitorEvent: \"new\"</code>. A renewal (new expiration date) also surfaces as new. Registries refresh regularly; run on a Schedule to capture newly-licensed dealers & shops as fresh leads. Works alongside Apify Schedules (the schedule starts the run; monitoring decides what's new).",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the memory used by monitoring mode. Use a distinct key per saved watch (e.g. per state/category) so different monitors don't share state.",
            "default": "default"
          },
          "socrataAppToken": {
            "title": "Socrata app token (optional)",
            "type": "string",
            "description": "Optional Socrata app token for higher rate limits on very large runs. Not required — leave blank for normal use. Get one free at any state open-data portal."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. State open data is fetched directly and needs no proxy — leave this off for the fastest runs. Enable Apify Proxy only if your network requires it.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}