{
  "openapi": "3.0.1",
  "info": {
    "title": "FMCSA Carrier Monitor: Authority, Insurance & Revocations",
    "description": "FMCSA carrier monitoring for your DOT/MC list: daily alerts when operating authority is revoked or pending, insurance is cancelled or below the BIPD minimum, or name/address change. Plus a new trucking authorities feed and bulk DOT number / MC number lookup.",
    "version": "0.1",
    "x-build-id": "TbDORwWl5jQg6DxGU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alpine-data~fmcsa-carrier-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alpine-data-fmcsa-carrier-monitor",
        "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/alpine-data~fmcsa-carrier-monitor/runs": {
      "post": {
        "operationId": "runs-sync-alpine-data-fmcsa-carrier-monitor",
        "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/alpine-data~fmcsa-carrier-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-alpine-data-fmcsa-carrier-monitor",
        "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": "What do you want to do?",
            "enum": [
              "monitor",
              "lookup",
              "feed"
            ],
            "type": "string",
            "description": "<b>Monitor my carriers</b>: each carrier new to the watchlist is charged once as a carrier record ($0.003, full record) and saved as the baseline; every later run (put it on a daily Schedule) costs $0.0008 per carrier checked plus $0.009 per alert and lists only what changed. Example: 200 carriers cost $0.60 on the first run, then $0.16 per daily run plus $0.009 per alert. <b>One-time lookup</b>: full record for every carrier ($0.003 each). <b>New authorities feed</b>: recently granted (or applied) operating authorities, no list needed ($0.003 each). Invalid and not-found numbers are free.",
            "default": "monitor"
          },
          "dotNumbers": {
            "title": "USDOT numbers",
            "type": "array",
            "description": "One USDOT number per line. You can paste a whole Excel column; 'USDOT 264184', '264184.0' and leading zeros are fine. Up to 25,000 per run. Not used in feed mode.",
            "items": {
              "type": "string"
            }
          },
          "mcNumbers": {
            "title": "MC / docket numbers (optional)",
            "type": "array",
            "description": "MC, MX or FF docket numbers, e.g. MC384859 or 'MC-384859'. They are matched to the USDOT number automatically.",
            "items": {
              "type": "string"
            }
          },
          "alertOn": {
            "title": "Alert me about",
            "type": "array",
            "description": "Which changes create an alert row in monitor mode. Leave all selected for full carrier vetting.",
            "items": {
              "type": "string",
              "enum": [
                "authority_change",
                "insurance_cancel",
                "revocation",
                "bipd_below_minimum",
                "name_address_change"
              ],
              "enumTitles": [
                "Authority change (active / inactive / pending, USDOT status)",
                "Insurance cancelled or lapsed",
                "New revocation or suspension order",
                "BIPD insurance below the required minimum",
                "Legal name, DBA or address change"
              ]
            },
            "default": [
              "authority_change",
              "insurance_cancel",
              "revocation",
              "bipd_below_minimum",
              "name_address_change"
            ]
          },
          "onlyChanges": {
            "title": "Only list changes",
            "type": "boolean",
            "description": "Monitor: after the first run, list only carriers with an alert. Unchanged carriers are still checked ($0.0008 each). Turn off to show all carriers; known carriers still cost $0.0008 each. Feed: skip carriers already delivered in earlier runs.",
            "default": true
          },
          "feedEvent": {
            "title": "Feed: what to list",
            "enum": [
              "authority_granted",
              "authority_application",
              "new_usdot"
            ],
            "type": "string",
            "description": "Feed mode only. Granted authority = newly authorized carriers/brokers (from the FMCSA authority history). New USDOT = new registrations in the Company Census.",
            "default": "authority_granted"
          },
          "authorityType": {
            "title": "Feed: type of authority",
            "enum": [
              "any",
              "motor_carrier",
              "broker",
              "freight_forwarder"
            ],
            "type": "string",
            "description": "Motor carrier (common/contract), broker or freight forwarder.",
            "default": "any"
          },
          "daysBack": {
            "title": "Feed: look back (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Feed mode only. How many days back to look for new authorities, 1–365. Example: 7 for the last week.",
            "default": 7
          },
          "states": {
            "title": "Feed: states (optional)",
            "type": "array",
            "description": "Feed mode only. States of the carrier's physical address: 2-letter codes or names, one per line or comma-separated, e.g. TX, CA, Texas or Washington DC. Leave empty for all states. A typo (e.g. 'Texs') stops the run with a message; nothing is charged. Small states (DC, RI, VT) have few new entries per week: use 30+ days back.",
            "items": {
              "type": "string"
            }
          },
          "minPowerUnits": {
            "title": "Feed: minimum trucks (power units)",
            "minimum": 0,
            "type": "integer",
            "description": "Feed mode only. Only carriers with at least this many trucks/tractors. 0 = all carriers, including new ones without trucks yet.",
            "default": 0
          },
          "maxResults": {
            "title": "Feed: max carriers per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Feed mode only. The run stops after this many carriers (cost limit: each costs $0.003). Example: 200.",
            "default": 200
          },
          "stateKey": {
            "title": "Watchlist name (optional)",
            "type": "string",
            "description": "Keep separate baselines for different lists or tasks, e.g. 'brokers-east'. A new name starts new baselines, so its carriers are charged once as carrier records ($0.003) again. Leave empty if you have only one list."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}