{
  "openapi": "3.0.1",
  "info": {
    "title": "DOT Number Lookup & FMCSA Carrier Check API",
    "description": "DOT number lookup and MC number lookup from official FMCSA open data: authority, insurance, safety rating, out-of-service orders, inspections, crashes, risk level, name match.",
    "version": "0.1",
    "x-build-id": "qgOBIckPSgr0MRim5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/reliable_tools~dot-number-lookup/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-reliable_tools-dot-number-lookup",
        "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/reliable_tools~dot-number-lookup/runs": {
      "post": {
        "operationId": "runs-sync-reliable_tools-dot-number-lookup",
        "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/reliable_tools~dot-number-lookup/run-sync": {
      "post": {
        "operationId": "run-sync-reliable_tools-dot-number-lookup",
        "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": {
          "dotNumbers": {
            "title": "USDOT numbers",
            "type": "array",
            "description": "One USDOT number per line.",
            "items": {
              "type": "string"
            }
          },
          "mcNumbers": {
            "title": "MC numbers",
            "type": "array",
            "description": "One MC (docket) number per line, with or without the MC prefix. The Actor finds the USDOT number and returns the full carrier record.",
            "items": {
              "type": "string"
            }
          },
          "records": {
            "title": "Your carrier list (vet and match)",
            "type": "array",
            "description": "One object per carrier from your own records: \"reference\", \"dotNumber\" or \"mcNumber\" (or only \"name\" and \"state\" to find it), and \"name\", \"city\", \"state\", \"postalCode\" for the same-company match. The prefill is sample data."
          },
          "csvUrl": {
            "title": "CSV file URL (your carrier list)",
            "type": "string",
            "description": "Optional: a link to a CSV file with a header row, read as your carrier list. Recognised columns: dotNumber (or dot, usdot), mcNumber (or mc), name, city, state, zip, reference."
          },
          "carrierSearch": {
            "title": "Search carriers by name",
            "type": "array",
            "description": "One object per search: \"name\" (part of the legal or DBA name), optional \"state\" (two letters) and \"activeOnly\" (default true)."
          },
          "includeSafetyHistory": {
            "title": "Inspections and crashes (24 months)",
            "type": "boolean",
            "description": "Adds inspection counts, vehicle and driver out-of-service rates next to the national average, and crash, injury and fatality counts from the FMCSA SMS files.",
            "default": true
          },
          "riskLabel": {
            "title": "Risk level",
            "type": "boolean",
            "description": "Adds a risk level (low, moderate, elevated, high) with the hard flags found in the record, such as an active out-of-service order or a for-hire carrier without active authority.",
            "default": true
          },
          "companyMatch": {
            "title": "Same-company match for your list",
            "type": "boolean",
            "description": "For your carrier list: compares the FMCSA legal and DBA name and address with the name in your records and says whether it is the same company, a related one or a different one, with a probability.",
            "default": true
          },
          "maxResultsPerSearch": {
            "title": "Max carriers per name search",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Stops each name search after this many carriers.",
            "default": 25
          },
          "maxResults": {
            "title": "Max carriers per run",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stops after this many carriers in total, from your numbers, your list and the name searches.",
            "default": 5000
          },
          "socrataAppToken": {
            "title": "data.transportation.gov app token (optional)",
            "type": "string",
            "description": "Optional free app token from data.transportation.gov. It raises the open-data rate limit for very large batches. Not needed for normal runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}