{
  "openapi": "3.0.1",
  "info": {
    "title": "FMCSA USDOT Trucking, Motor Carrier & Insurance Leads Scraper",
    "description": "Extract verified US trucking companies, motor carriers, owner-operators, and freight brokers from FMCSA/USDOT registries. Filter by state, registration date (new authorities), fleet size, cargo type, and hazmat. Includes officer names, direct emails, cell phones, MC numbers, and B2B lead scoring.",
    "version": "2.0",
    "x-build-id": "eOe6FfmExoGJAAL7l"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/apex-b2b-data~fmcsa-usdot-trucking-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-apex-b2b-data-fmcsa-usdot-trucking-leads-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/apex-b2b-data~fmcsa-usdot-trucking-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-apex-b2b-data-fmcsa-usdot-trucking-leads-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/apex-b2b-data~fmcsa-usdot-trucking-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-apex-b2b-data-fmcsa-usdot-trucking-leads-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": "US States (2-letter codes)",
            "type": "array",
            "description": "Filter carriers by physical address state (e.g. [\"TX\", \"CA\", \"FL\"]). Leave empty to search nationwide.",
            "default": [
              "TX",
              "FL"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerState": {
            "title": "Max Leads Per State (0 = Share maxItems across all states)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional per-state cap when multiple states are selected so large states (like TX or CA) do not crowd out smaller states.",
            "default": 0
          },
          "registeredWithinDays": {
            "title": "Registered Within Last N Days (0 = Use explicit dates below)",
            "minimum": 0,
            "type": "integer",
            "description": "Rolling lookback window (e.g. set to 7 or 30 for daily/weekly scheduled runs to automatically pull fresh registrations relative to today).",
            "default": 0
          },
          "addedSinceDate": {
            "title": "Registered On/After Date (YYYY-MM-DD)",
            "type": "string",
            "description": "Filter for newly registered USDOT authorities on or after this date (e.g. '2026-10-01'). Ignored if registeredWithinDays > 0.",
            "default": "2026-10-01"
          },
          "addedBeforeDate": {
            "title": "Registered On/Before Date (YYYY-MM-DD, Optional)",
            "type": "string",
            "description": "Optional upper bound on registration date (e.g. '2026-11-01') to query a historical date window.",
            "default": ""
          },
          "activeOnly": {
            "title": "Active Authorities Only",
            "type": "boolean",
            "description": "Only return carriers with an Active ('A') USDOT status code.",
            "default": true
          },
          "statuses": {
            "title": "Carrier Statuses (Advanced override)",
            "type": "array",
            "description": "Optional list of statuses to include: 'active', 'inactive', 'pending'. Overrides activeOnly when non-empty.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "carrierOperations": {
            "title": "Carrier Operation Types (Optional)",
            "type": "array",
            "description": "Filter by operation scope: 'interstate', 'intrastate-hazmat', 'intrastate-non-hazmat'. Leave empty for all.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "authorizedForHireOnly": {
            "title": "Authorized For Hire Only",
            "type": "boolean",
            "description": "Only return commercial for-hire carriers/brokers (excludes private property fleets that only haul their own goods).",
            "default": false
          },
          "requireEmail": {
            "title": "Require Email Address",
            "type": "boolean",
            "description": "Only return carriers that have a registered email address on file.",
            "default": true
          },
          "requirePhone": {
            "title": "Require Phone / Cell Number",
            "type": "boolean",
            "description": "Only return carriers that have a phone or cell number on file.",
            "default": true
          },
          "minPowerUnits": {
            "title": "Minimum Power Units (Trucks/Tractors)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of power units operated by the carrier.",
            "default": 1
          },
          "maxPowerUnits": {
            "title": "Maximum Power Units (0 = No Limit)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of power units (e.g., set to 5 to target owner-operators and small fleets, or 0 for no upper limit).",
            "default": 0
          },
          "minDrivers": {
            "title": "Minimum Total Drivers",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum number of total drivers reported by the carrier.",
            "default": 0
          },
          "cargoFilter": {
            "title": "Primary Cargo Specialization Filter",
            "enum": [
              "ANY",
              "GENERAL_FREIGHT",
              "REFRIGERATED_FOOD",
              "MOTOR_VEHICLES",
              "BUILDING_MATERIALS",
              "MACHINERY_LARGE_OBJECTS",
              "INTERMODAL",
              "OILFIELD_EQUIPMENT",
              "LIVESTOCK",
              "GRAIN_FEED_HAY",
              "CONSTRUCTION",
              "HOUSEHOLD_GOODS",
              "LIQUIDS_GASES",
              "CHEMICALS",
              "FRESH_PRODUCE",
              "PASSENGERS"
            ],
            "type": "string",
            "description": "Optional single-select filter for specific cargo types hauled by the carrier.",
            "default": "ANY"
          },
          "cargoTypes": {
            "title": "Multiple Cargo Types Filter (Optional)",
            "type": "array",
            "description": "Optional list of cargo keys (e.g. [\"REFRIGERATED_FOOD\", \"FRESH_PRODUCE\"]).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "safetyRatings": {
            "title": "Safety Ratings Filter (Optional)",
            "type": "array",
            "description": "Filter by FMCSA compliance safety rating: 'satisfactory', 'conditional', 'unsatisfactory'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "hazmatOnly": {
            "title": "Hazmat Carriers Only",
            "type": "boolean",
            "description": "Only return carriers authorized to transport hazardous materials.",
            "default": false
          },
          "dotNumbers": {
            "title": "Specific USDOT Numbers (Lookup Mode)",
            "type": "array",
            "description": "Look up specific USDOT numbers directly (overrides state/date filters if provided).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mcNumbers": {
            "title": "Specific MC / Docket Numbers (Lookup Mode)",
            "type": "array",
            "description": "Look up specific MC numbers directly across both MOTUS and legacy Census tables (e.g. [\"MC1682702\", \"45579919\"]).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "companyNameSearch": {
            "title": "Company or Officer Name Keyword (Optional)",
            "type": "string",
            "description": "Case-insensitive search across Legal Name, DBA Name, or Company Officers.",
            "default": ""
          },
          "enrichAuthority": {
            "title": "Enrich with MOTUS Operating Authority, Active Insurance & OOS Orders",
            "type": "boolean",
            "description": "Joins each carrier against FMCSA MOTUS Operating Authority, Active Insurance Policies (BMC-91X, insurer, policy #, coverage), Authority History/Revocations, and Out-of-Service Orders.",
            "default": true
          },
          "verifyEmailDns": {
            "title": "Enrich & Verify Email Domain / Corporate Website",
            "type": "boolean",
            "description": "Extracts corporate website domain from non-webmail addresses and performs a fast DNS check to verify domain validity.",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring Mode (Emit Only Net-New USDOTs Across Runs)",
            "type": "boolean",
            "description": "Persists seen USDOT numbers in a named Key-Value store and skips carriers already delivered in previous scheduled runs.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor Key-Value Store Name",
            "type": "string",
            "description": "Name of the persistent store used when monitorMode is enabled.",
            "default": "fmcsa-seen-usdots"
          },
          "includeRawData": {
            "title": "Include Full Raw Census Record (147 Columns)",
            "type": "boolean",
            "description": "Attach the unmodified 147-column FMCSA census row under `raw_census` for compliance or data warehouse ingestion.",
            "default": false
          },
          "socrataAppToken": {
            "title": "Socrata App Token (Optional)",
            "type": "string",
            "description": "Optional X-App-Token from data.transportation.gov for high-volume unthrottled API runs.",
            "default": ""
          },
          "maxItems": {
            "title": "Max Leads to Return",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of carrier leads to extract in this run.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}