{
  "openapi": "3.0.1",
  "info": {
    "title": "FMCSA New Carriers: Recently Added USDOT Records & Lookup",
    "description": "Trucking companies, brokers and freight forwarders added to FMCSA's census in the last days, from the official DOT open data: fleet size, drivers, cargo, interstate or intrastate, hazmat, for-hire, address. Filter by state, cargo or fleet size, track only new ones, or look up USDOT numbers.",
    "version": "0.1",
    "x-build-id": "hPt6H9a18vyDeFbWb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yzy001~fmcsa-new-carriers/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yzy001-fmcsa-new-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/yzy001~fmcsa-new-carriers/runs": {
      "post": {
        "operationId": "runs-sync-yzy001-fmcsa-new-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/yzy001~fmcsa-new-carriers/run-sync": {
      "post": {
        "operationId": "run-sync-yzy001-fmcsa-new-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": {
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 31,
            "type": "integer",
            "description": "Records added within the last N days, today included (1-31). FMCSA's data trails by one to two days. Ignored when a from date is set.",
            "default": 7
          },
          "fromDate": {
            "title": "From date",
            "type": "string",
            "description": "Optional. First add date to include (YYYY-MM-DD). The range can cover at most 31 days."
          },
          "toDate": {
            "title": "To date",
            "type": "string",
            "description": "Optional. Last add date to include. Defaults to today."
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Optional. Two-letter codes of the physical address state, for example TX, CA.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "operations": {
            "title": "Operation",
            "type": "array",
            "description": "Optional. Interstate, intrastate hazmat or intrastate non-hazmat carriers.",
            "items": {
              "type": "string",
              "enum": [
                "INTERSTATE",
                "INTRASTATE_HAZMAT",
                "INTRASTATE_NON_HAZMAT"
              ],
              "enumTitles": [
                "Interstate",
                "Intrastate, hazmat",
                "Intrastate, non-hazmat"
              ]
            },
            "default": []
          },
          "entityTypes": {
            "title": "Entity types",
            "type": "array",
            "description": "Optional. Carrier, broker, freight forwarder and so on, as FMCSA classifies them.",
            "items": {
              "type": "string",
              "enum": [
                "CARRIER",
                "SHIPPER",
                "BROKER",
                "REGISTRANT",
                "FREIGHT_FORWARDER",
                "INTERMODAL_EQUIPMENT_PROVIDER",
                "CARGO_TANK"
              ],
              "enumTitles": [
                "Carrier",
                "Shipper",
                "Broker",
                "Registrant",
                "Freight forwarder",
                "Intermodal equipment provider",
                "Cargo tank facility"
              ]
            },
            "default": []
          },
          "cargo": {
            "title": "Cargo",
            "type": "array",
            "description": "Optional. Keep entities that carry any of these cargo types (FMCSA's own list).",
            "items": {
              "type": "string",
              "enum": [
                "General Freight",
                "Household Goods",
                "Metal: Sheets, Coils, Rolls",
                "Motor Vehicles",
                "Driveaway/Towaway",
                "Logs, Poles, Beams, Lumber",
                "Building Materials",
                "Mobile Homes",
                "Machinery, Large Objects",
                "Fresh Produce",
                "Liquids/Gases",
                "Intermodal Containers",
                "Passengers",
                "Oilfield Equipment",
                "Livestock",
                "Grain, Feed, Hay",
                "Coal, Coke",
                "Meat",
                "Garbage, Refuse, Trash",
                "U.S. Mail",
                "Chemicals",
                "Commodities Dry Bulk",
                "Refrigerated Food",
                "Beverages",
                "Paper Products",
                "Utility",
                "Farm Supplies",
                "Construction",
                "Water - Well",
                "Other"
              ]
            },
            "default": []
          },
          "forHireOnly": {
            "title": "For-hire only",
            "type": "boolean",
            "description": "Keep only entities classified as Authorized For Hire.",
            "default": false
          },
          "hazmatOnly": {
            "title": "Hazmat only",
            "type": "boolean",
            "description": "Keep only entities with the hazardous materials indicator.",
            "default": false
          },
          "minPowerUnits": {
            "title": "Minimum power units",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional. Keep entities with at least this many power units (trucks and tractors)."
          },
          "maxPowerUnits": {
            "title": "Maximum power units",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional. Keep entities with at most this many power units."
          },
          "includeInactive": {
            "title": "Include inactive and pending",
            "type": "boolean",
            "description": "Also return records whose status is Inactive or Pending. Off = active only.",
            "default": false
          },
          "dotNumbers": {
            "title": "Look up USDOT numbers",
            "type": "array",
            "description": "Optional. USDOT numbers to look up, whatever their add date or status (up to 500 with names). Turns off the date window.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "names": {
            "title": "Look up names",
            "type": "array",
            "description": "Optional. Every record whose legal or DBA name contains this text (3 characters or more).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "trackChanges": {
            "title": "Track what you have already received",
            "type": "boolean",
            "description": "Remember the USDOT numbers returned by earlier tracked runs (120 days, in a key-value store named fmcsa-new-carriers-state in your account) and mark each row NEW or SEEN.",
            "default": false
          },
          "onlyNew": {
            "title": "Only records not seen before",
            "type": "boolean",
            "description": "With tracking on, leave out records an earlier tracked run already returned. Good for a daily schedule with a 7-day window.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Upper bound on rows returned, newest first. A 7-day window is roughly 1,000-1,300 records.",
            "default": 5000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}