{
  "openapi": "3.0.1",
  "info": {
    "title": "FMCSA Carrier Census Scraper (USDOT)",
    "description": "US trucking and bus companies from FMCSA's official Company Census: USDOT and MC numbers, legal name, phone, email, address, power units, drivers, cargo, hazmat, safety rating. Filter new carriers by state, date, fleet size and cargo, or look up USDOT numbers.",
    "version": "0.1",
    "x-build-id": "j4rPUFMVdYPix7zni"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapyx~fmcsa-carriers-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapyx-fmcsa-carriers-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/scrapyx~fmcsa-carriers-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapyx-fmcsa-carriers-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/scrapyx~fmcsa-carriers-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapyx-fmcsa-carriers-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 (physical address)",
            "type": "array",
            "description": "2-letter codes, e.g. 'TX', 'CA'. Empty = all states.",
            "items": {
              "type": "string"
            }
          },
          "addedFrom": {
            "title": "Added to FMCSA on or after",
            "type": "string",
            "description": "YYYY-MM-DD. The date the USDOT number was registered -- use it to find NEW carriers."
          },
          "addedTo": {
            "title": "Added on or before",
            "type": "string",
            "description": "YYYY-MM-DD."
          },
          "status": {
            "title": "Status",
            "enum": [
              "active",
              "inactive",
              "pending",
              "any"
            ],
            "type": "string",
            "description": "Default: active for searches, any for USDOT lookups."
          },
          "carrierOperation": {
            "title": "Operation",
            "enum": [
              "any",
              "interstate",
              "intrastate_hazmat",
              "intrastate_non_hazmat"
            ],
            "type": "string",
            "description": "FMCSA's carrier operation code.",
            "default": "any"
          },
          "minPowerUnits": {
            "title": "Min power units",
            "minimum": 0,
            "type": "integer",
            "description": "Trucks, tractors, buses the carrier operates (compared as numbers)."
          },
          "maxPowerUnits": {
            "title": "Max power units",
            "minimum": 0,
            "type": "integer",
            "description": "e.g. 1 for owner-operators."
          },
          "minDrivers": {
            "title": "Min drivers",
            "minimum": 0,
            "type": "integer",
            "description": "Total drivers."
          },
          "maxDrivers": {
            "title": "Max drivers",
            "minimum": 0,
            "type": "integer",
            "description": "Total drivers."
          },
          "cargoTypes": {
            "title": "Cargo types (all must match)",
            "type": "array",
            "description": "Any of: beverages, building_materials, chemicals, coal_coke, construction, driveaway_towaway, dry_bulk, farm_supplies, fresh_produce, garbage_refuse, general_freight, grain_feed_hay, household_goods, intermodal_containers, liquids_gases, livestock, logs_poles_lumber, machinery_large_objects, meat, metal_sheets_coils_rolls, mobile_homes, motor_vehicles, oilfield_equipment, other, paper_products, passengers, refrigerated_food, us_mail, utilities, water_well.",
            "items": {
              "type": "string"
            }
          },
          "hazmatOnly": {
            "title": "Hazmat carriers only",
            "type": "boolean",
            "description": "FMCSA's hazardous-materials indicator is Y.",
            "default": false
          },
          "nameContains": {
            "title": "Name contains",
            "type": "string",
            "description": "Matched against legal and DBA name, any case."
          },
          "requireEmail": {
            "title": "Only carriers with an email",
            "type": "boolean",
            "description": "Skip carriers that filed no email address.",
            "default": false
          },
          "requirePhone": {
            "title": "Only carriers with a phone",
            "type": "boolean",
            "description": "Skip carriers that filed no phone.",
            "default": false
          },
          "requireMcNumber": {
            "title": "Only carriers with an MC number",
            "type": "boolean",
            "description": "Note: almost no NEW carrier has one yet -- operating authority is filed later.",
            "default": false
          },
          "dotNumbers": {
            "title": "USDOT numbers (lookup)",
            "type": "array",
            "description": "Look up specific carriers. Combines with the filters above (status defaults to any).",
            "items": {
              "type": "string"
            }
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "newest",
              "oldest",
              "largest_fleet",
              "most_drivers"
            ],
            "type": "string",
            "description": "Ties are broken by USDOT number so paging is stable.",
            "default": "newest"
          },
          "maxItems": {
            "title": "Max carriers",
            "minimum": 0,
            "type": "integer",
            "description": "0 = every match (can be hundreds of thousands).",
            "default": 200
          },
          "minRequestInterval": {
            "title": "Seconds between requests",
            "minimum": 1,
            "type": "number",
            "description": "Never below 1 (data.transportation.gov robots.txt Crawl-delay). 1,000 carriers per request.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}