{
  "openapi": "3.0.1",
  "info": {
    "title": "FMCSA Carrier Scraper",
    "description": "An FMCSA scraper for freight brokers and trucking-insurance sellers. One run returns US motor carriers with USDOT and MC numbers, legal and DBA names, state, fleet size, cargo, operating and authority status, and insurance dates. Monitor mode reports new, changed and removed carriers.",
    "version": "0.1",
    "x-build-id": "a4vnT3BIxTYWJiOZw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/redomic~fmcsa-carriers/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-redomic-fmcsa-carriers",
        "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/redomic~fmcsa-carriers/runs": {
      "post": {
        "operationId": "runs-sync-redomic-fmcsa-carriers",
        "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/redomic~fmcsa-carriers/run-sync": {
      "post": {
        "operationId": "run-sync-redomic-fmcsa-carriers",
        "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",
              "detail",
              "monitor",
              "changeLedger",
              "carrierHiringSignal"
            ],
            "type": "string",
            "description": "search lists carriers, detail looks up numbers you paste into query, monitor reports new, changed and removed carriers, changeLedger keeps a dated observation per carrier and returns only changed ones, and carrierHiringSignal returns carriers with new driver or transport jobs this week.",
            "default": "search"
          },
          "query": {
            "title": "Query",
            "type": "string",
            "description": "A US state name or two-letter code (TX, Texas) for new-carrier searches, a carrier name to match, or one or more USDOT / MC numbers separated by commas in detail mode.",
            "default": "TX"
          },
          "state": {
            "title": "State filter",
            "type": "string",
            "description": "Optional two-letter state code. Narrows a carrier-name search. Leave blank to use the state in query.",
            "default": ""
          },
          "status": {
            "title": "Operating status",
            "enum": [
              "active",
              "inactive",
              "any"
            ],
            "type": "string",
            "description": "Filter on the carrier census status code. Active is the default; inactive finds carriers whose authority was revoked.",
            "default": "active"
          },
          "onlyWithAuthority": {
            "title": "Only carriers with an MC number",
            "type": "boolean",
            "description": "Keep carriers that hold an MC, MX or FF docket (for-hire operating authority): their rows carry the MC number, authority status and insurance filings. Untick to include every USDOT registration. Ignored in detail mode and when Registered within (days) is set, because new carriers get their docket weeks after registering.",
            "default": true
          },
          "addedSinceDays": {
            "title": "Registered within (days)",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Keep carriers added to the census in the last N days, counted back from the newest registration FMCSA has published (the census runs about 5 days behind today, so 1 still returns the newest day). 0 means no date filter. Use 7 for a weekly new-authority lead list.",
            "default": 0
          },
          "minPowerUnits": {
            "title": "Min power units",
            "minimum": 0,
            "type": "integer",
            "description": "Keep carriers with at least this many power units. 0 means no minimum. Applied before rows are charged.",
            "default": 0
          },
          "maxPowerUnits": {
            "title": "Max power units",
            "minimum": 0,
            "type": "integer",
            "description": "Keep carriers with no more than this many power units. 0 means no maximum. Applied before rows are charged.",
            "default": 0
          },
          "cargo": {
            "title": "Cargo carried",
            "enum": [
              "",
              "general",
              "household",
              "motorVehicles",
              "driveTow",
              "logsPoles",
              "buildingMaterials",
              "mobileHomes",
              "machinery",
              "produce",
              "liquidsGases",
              "intermodal",
              "passengers",
              "oilfield",
              "livestock",
              "grainFeed",
              "coalCoke",
              "meat",
              "garbage",
              "usMail",
              "chemicals",
              "dryBulk",
              "refrigerated",
              "beverages",
              "paper",
              "utility",
              "farmSupplies",
              "construction",
              "waterWell",
              "other"
            ],
            "type": "string",
            "description": "Filter on a cargo type from the FMCSA census. Blank means any cargo.",
            "default": ""
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit on delivered carrier rows per run. In monitor mode it limits change rows.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}