{
  "openapi": "3.0.1",
  "info": {
    "title": "DAT Freight Rates Scraper",
    "description": "Scrape DAT Trendlines freight data: national spot and contract rates, state load-to-truck ratios, week/month/year-over-year trends, and fuel prices. Built for freight brokers and dispatchers.",
    "version": "0.1",
    "x-build-id": "wPPBABTW6fkwJcHS2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parseforge~dat-freight-rates-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parseforge-dat-freight-rates-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/parseforge~dat-freight-rates-scraper/runs": {
      "post": {
        "operationId": "runs-sync-parseforge-dat-freight-rates-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/parseforge~dat-freight-rates-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-parseforge-dat-freight-rates-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": "Maximum rates",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "How many freight rates to collect per run."
          },
          "datasets": {
            "title": "Datasets to Scrape",
            "uniqueItems": true,
            "type": "array",
            "description": "Which Trendlines datasets to scrape. `national_history` is a time series of national average rates per equipment, rate type, and country. `load_truck_ratio` is the supply/demand indicator per US/Canadian state. `national_trends` is week/month/year-over-year percentages. `fuel_price` is the current national diesel reference price.",
            "items": {
              "type": "string",
              "enum": [
                "national_history",
                "load_truck_ratio",
                "national_trends",
                "fuel_price"
              ],
              "enumTitles": [
                "National rate history (time series)",
                "Load-to-truck ratio (per state)",
                "National trend percentages",
                "Fuel price (national diesel)"
              ]
            },
            "default": [
              "national_history",
              "load_truck_ratio",
              "national_trends",
              "fuel_price"
            ]
          },
          "equipments": {
            "title": "Equipment Categories",
            "uniqueItems": true,
            "type": "array",
            "description": "Equipment categories to include. Applies to `national_history` and `load_truck_ratio`.",
            "items": {
              "type": "string",
              "enum": [
                "VAN",
                "FLATBED",
                "REEFER",
                "INTERMODAL"
              ],
              "enumTitles": [
                "Dry Van",
                "Flatbed",
                "Reefer (Refrigerated)",
                "Intermodal"
              ]
            },
            "default": [
              "VAN",
              "FLATBED",
              "REEFER"
            ]
          },
          "rateTypes": {
            "title": "Rate Types",
            "uniqueItems": true,
            "type": "array",
            "description": "Rate types to include for `national_history`. SPOT-shipper-to-broker is what shippers pay brokers. SPOT-broker-to-carrier is what brokers pay carriers. CONTRACT is the contractual rate.",
            "items": {
              "type": "string",
              "enum": [
                "SHIPPER_TO_BROKER_SPOT",
                "BROKER_TO_CARRIER_SPOT",
                "CONTRACT"
              ],
              "enumTitles": [
                "Spot (shipper to broker)",
                "Spot (broker to carrier)",
                "Contract"
              ]
            },
            "default": [
              "SHIPPER_TO_BROKER_SPOT",
              "BROKER_TO_CARRIER_SPOT",
              "CONTRACT"
            ]
          },
          "countries": {
            "title": "Countries",
            "uniqueItems": true,
            "type": "array",
            "description": "Countries to include for `national_history`. `load_truck_ratio` always returns the full North American grid.",
            "items": {
              "type": "string",
              "enum": [
                "US",
                "CA"
              ],
              "enumTitles": [
                "United States",
                "Canada"
              ]
            },
            "default": [
              "US",
              "CA"
            ]
          },
          "periodTypes": {
            "title": "Period Granularity",
            "uniqueItems": true,
            "type": "array",
            "description": "Time period granularities to fetch for `national_history`. Month returns monthly buckets going back ~3 years. Week returns weekly buckets going back ~1 year.",
            "items": {
              "type": "string",
              "enum": [
                "Month",
                "Week"
              ],
              "enumTitles": [
                "Monthly buckets",
                "Weekly buckets"
              ]
            },
            "default": [
              "Month",
              "Week"
            ]
          },
          "states": {
            "title": "State Codes (Load-to-Truck Ratio)",
            "uniqueItems": true,
            "type": "array",
            "description": "Optional list of US state or Canadian province ISO codes to restrict the `load_truck_ratio` dataset. Leave empty to return every state and province DAT publishes.",
            "items": {
              "type": "string",
              "enum": [
                "AB",
                "AK",
                "AL",
                "AR",
                "AZ",
                "BC",
                "CA",
                "CO",
                "CT",
                "DC",
                "DE",
                "FL",
                "GA",
                "HI",
                "IA",
                "ID",
                "IL",
                "IN",
                "KS",
                "KY",
                "LA",
                "MA",
                "MB",
                "MD",
                "ME",
                "MI",
                "MN",
                "MO",
                "MS",
                "MT",
                "NB",
                "NC",
                "ND",
                "NE",
                "NH",
                "NJ",
                "NL",
                "NM",
                "NS",
                "NV",
                "NY",
                "OH",
                "OK",
                "ON",
                "OR",
                "PA",
                "PE",
                "QC",
                "RI",
                "SC",
                "SD",
                "SK",
                "TN",
                "TX",
                "UT",
                "VA",
                "VT",
                "WA",
                "WI",
                "WV",
                "WY"
              ],
              "enumTitles": [
                "Alberta",
                "Alaska",
                "Alabama",
                "Arkansas",
                "Arizona",
                "British Columbia",
                "California",
                "Colorado",
                "Connecticut",
                "District of Columbia",
                "Delaware",
                "Florida",
                "Georgia",
                "Hawaii",
                "Iowa",
                "Idaho",
                "Illinois",
                "Indiana",
                "Kansas",
                "Kentucky",
                "Louisiana",
                "Massachusetts",
                "Manitoba",
                "Maryland",
                "Maine",
                "Michigan",
                "Minnesota",
                "Missouri",
                "Mississippi",
                "Montana",
                "New Brunswick",
                "North Carolina",
                "North Dakota",
                "Nebraska",
                "New Hampshire",
                "New Jersey",
                "Newfoundland and Labrador",
                "New Mexico",
                "Nova Scotia",
                "Nevada",
                "New York",
                "Ohio",
                "Oklahoma",
                "Ontario",
                "Oregon",
                "Pennsylvania",
                "Prince Edward Island",
                "Quebec",
                "Rhode Island",
                "South Carolina",
                "South Dakota",
                "Saskatchewan",
                "Tennessee",
                "Texas",
                "Utah",
                "Vermont",
                "Virginia",
                "Washington",
                "Wisconsin",
                "West Virginia",
                "Wyoming"
              ]
            },
            "default": []
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}