{
  "openapi": "3.0.3",
  "info": {
    "title": "dotsearch.io carrier safety profiles",
    "description": "Read-only access to FMCSA motor-carrier safety profiles. Request a company page with 'Accept: text/markdown' (or append .md to the path) to receive the complete profile as markdown; browsers get HTML by default. Anonymous, rate-limited. Underlying data: FMCSA (public domain).",
    "version": "1.0.0",
    "contact": { "url": "https://www.dotsearch.io/contact" }
  },
  "servers": [{ "url": "https://www.dotsearch.io" }],
  "paths": {
    "/dot/{dotNumber}": {
      "get": {
        "operationId": "getCarrierSafetyProfile",
        "summary": "Full carrier safety profile by USDOT number",
        "description": "Returns identity, operating authority, fleet, SMS BASIC scores and percentiles, out-of-service rates, inspection and violation summaries, crash statistics, and active insurance filings. Send 'Accept: text/markdown' for the agent-friendly markdown document (marked noindex, with a Link rel=canonical header pointing to the HTML page). The alias /dot/{dotNumber}.md returns the same markdown without needing an Accept header.",
        "parameters": [
          {
            "name": "dotNumber",
            "in": "path",
            "required": true,
            "description": "USDOT number (digits only)",
            "schema": { "type": "string", "pattern": "^[0-9]{1,8}$" },
            "example": "1283065"
          }
        ],
        "responses": {
          "200": {
            "description": "Carrier profile",
            "content": {
              "text/markdown": { "schema": { "type": "string" } },
              "text/html": { "schema": { "type": "string" } }
            }
          },
          "302": { "description": "HTML request for an unknown USDOT redirects to the search page" },
          "404": { "description": "Markdown requested for an unknown USDOT" },
          "429": { "description": "Rate limit exceeded (60 requests/minute per client on company pages)" }
        }
      }
    }
  }
}
