{
  "openapi": "3.0.1",
  "info": {
    "title": "FMCSA Scraper: Carrier Safety and Crashes",
    "description": "Scrape FMCSA data on US trucking and bus companies. Get fleet size, drivers, mileage and USDOT and MC numbers, with crashes, inspections, out-of-service rates and safety flags per carrier, plus crash, inspection and violation records. Filter by name, state or fleet. Export to CSV or Excel.",
    "version": "1.0",
    "x-build-id": "05PhFzdhwmt6K5XaI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parselab~fmcsa-carrier-safety-crashes-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parselab-fmcsa-carrier-safety-crashes-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/parselab~fmcsa-carrier-safety-crashes-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parselab-fmcsa-carrier-safety-crashes-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/parselab~fmcsa-carrier-safety-crashes-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parselab-fmcsa-carrier-safety-crashes-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": {
          "maxItems": {
            "title": "Max Items",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000."
          },
          "mode": {
            "title": "What to collect",
            "enum": [
              "carriers",
              "crashes",
              "inspections",
              "violations"
            ],
            "type": "string",
            "description": "Carriers returns one row per trucking or bus company with its size and its recent crashes, inspections and out-of-service rates. Crashes, inspections and violations return the single records.",
            "default": "carriers"
          },
          "dotNumbers": {
            "title": "USDOT numbers",
            "type": "array",
            "description": "USDOT numbers of carriers, for example 1163849. The easiest way to look up known companies.",
            "items": {
              "type": "string"
            }
          },
          "legalNames": {
            "title": "Company names",
            "type": "array",
            "description": "Part of a company or trade name, for example Werner or Knight. In the crash and inspection modes it is the name of the carrier on the record.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two letter state codes. For carriers it is the state of the company address, for crashes and inspections the state where it happened.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "Carriers mode. Part of the city name of the company address.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "type": "array",
            "description": "Carriers mode. ZIP codes or their first digits, for example 75201 or 752.",
            "items": {
              "type": "string"
            }
          },
          "operationClasses": {
            "title": "Type of operation",
            "type": "array",
            "description": "Carriers mode. Words of the classification, for example authorized for hire, private property, exempt for hire, private passenger.",
            "items": {
              "type": "string"
            }
          },
          "carrierOperation": {
            "title": "Interstate or intrastate",
            "enum": [
              "any",
              "interstate",
              "intrastate"
            ],
            "type": "string",
            "description": "Carriers mode. Interstate carriers cross state lines.",
            "default": "any"
          },
          "activeOnly": {
            "title": "Only active carriers",
            "type": "boolean",
            "description": "Carriers mode. Skip carriers that are no longer active.",
            "default": true
          },
          "hazmatOnly": {
            "title": "Only hazardous materials carriers",
            "type": "boolean",
            "description": "Carriers mode.",
            "default": false
          },
          "minPowerUnits": {
            "title": "Minimum power units",
            "minimum": 0,
            "type": "integer",
            "description": "Carriers mode. Trucks and tractors of the fleet, for example 50."
          },
          "maxPowerUnits": {
            "title": "Maximum power units",
            "minimum": 0,
            "type": "integer",
            "description": "Carriers mode."
          },
          "minDrivers": {
            "title": "Minimum drivers",
            "minimum": 0,
            "type": "integer",
            "description": "Carriers mode."
          },
          "sortBy": {
            "title": "Sort carriers by",
            "enum": [
              "powerUnits",
              "drivers",
              "name",
              "crashes"
            ],
            "type": "string",
            "description": "Carriers mode. Sorting by crashes works on the first 2,000 carriers of the search.",
            "default": "powerUnits"
          },
          "includeSafety": {
            "title": "Add crashes and inspections to carriers",
            "type": "boolean",
            "description": "Carriers mode. Adds the crash and inspection counts of the last months, out-of-service rates and safety flags. Makes the run a little slower.",
            "default": true
          },
          "safetyMonths": {
            "title": "Months for the safety record",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Carriers mode. How many months back the crashes and inspections are counted.",
            "default": 24
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Crashes and inspections modes. First date, in the form 2026-01-31."
          },
          "dateTo": {
            "title": "Date until",
            "type": "string",
            "description": "Crashes and inspections modes. Last date."
          },
          "fatalOnly": {
            "title": "Only fatal crashes",
            "type": "boolean",
            "description": "Crashes mode.",
            "default": false
          },
          "injuryOnly": {
            "title": "Only crashes with injuries",
            "type": "boolean",
            "description": "Crashes mode.",
            "default": false
          },
          "towAwayOnly": {
            "title": "Only crashes with a tow away",
            "type": "boolean",
            "description": "Crashes mode.",
            "default": false
          },
          "hazmatReleasedOnly": {
            "title": "Only crashes that released hazardous materials",
            "type": "boolean",
            "description": "Crashes mode.",
            "default": false
          },
          "oosOnly": {
            "title": "Only out-of-service",
            "type": "boolean",
            "description": "Inspections and violations modes. Keep inspections or violations that took a driver or a vehicle out of service.",
            "default": false
          },
          "minViolations": {
            "title": "Minimum violations",
            "minimum": 0,
            "type": "integer",
            "description": "Inspections mode. Keep inspections with at least this many violations."
          },
          "inspectionLevels": {
            "title": "Inspection levels",
            "type": "array",
            "description": "Inspections mode. Level numbers 1 to 8, for example 1 for the full inspection.",
            "items": {
              "type": "string"
            }
          },
          "violationGroups": {
            "title": "Violation categories",
            "type": "array",
            "description": "Violations mode. Words of the safety category or group, for example unsafe driving, vehicle maintenance, hours of service, driver fitness.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}