{
 "openapi": "3.1.0",
 "info": {
  "title": "Kavel public API",
  "version": "0.1.0",
  "description": "Free, no key. Kavel's website checks and supplier quote pages. The checks read only public files and use no AI. Per-visitor hourly limits apply (HTTP 429). For AI assistants, the same tools are available as an MCP server at https://getkavel.com/mcp. Built with AI.",
  "contact": {
   "email": "support@getkavel.com",
   "url": "https://getkavel.com/agents/"
  }
 },
 "servers": [
  {
   "url": "https://getkavel.com"
  }
 ],
 "paths": {
  "/api/crawlers": {
   "post": {
    "operationId": "checkAiCrawlers",
    "summary": "Which AI crawlers a site's robots.txt allows or blocks on its homepage",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "url"
        ],
        "properties": {
         "url": {
          "type": "string",
          "example": "example.com"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Crawler by crawler result, plus whether the server turned away test requests identifying as GPTBot or ClaudeBot"
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/pricing-check": {
   "post": {
    "operationId": "checkPricingPage",
    "summary": "Whether a pricing page's prices are in its HTML, only in structured data, or only added by JavaScript",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "url"
        ],
        "properties": {
         "url": {
          "type": "string",
          "example": "example.com"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "verdict (readable, structured-only, javascript, on-request, none), prices found with context, structured data offers, robots.txt per AI crawler for that page"
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/llms-draft": {
   "post": {
    "operationId": "draftLlmsTxt",
    "summary": "A first draft of an llms.txt file from a site's homepage links and sitemap",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "url"
        ],
        "properties": {
         "url": {
          "type": "string",
          "example": "example.com"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Draft llms.txt text and the site's existing llms.txt, if any"
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/ai-crawlers/data.csv": {
   "get": {
    "operationId": "getCrawlerStudy",
    "summary": "The AI crawler study data: robots.txt results for 945 well-known websites",
    "responses": {
     "200": {
      "description": "CSV",
      "content": {
       "text/csv": {}
      }
     }
    }
   }
  },
  "/api/q/{id}": {
   "parameters": [
    {
     "name": "id",
     "in": "path",
     "required": true,
     "schema": {
      "type": "string",
      "pattern": "^[a-f0-9]{12}$"
     },
     "description": "The supplier's quote page id (getkavel.com/q/<id>)"
    }
   ],
   "get": {
    "operationId": "getQuotePage",
    "summary": "Who a quote page belongs to and where to send a request",
    "responses": {
     "200": {
      "description": "Company, website, endpoint and format links"
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   },
   "post": {
    "operationId": "sendQuoteRequest",
    "summary": "Send a request for quote to the supplier by email. Not an order. Agents: get the person's approval first and set agent to true.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "$ref": "https://getkavel.com/agents/quote-request.schema.json"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Sent. The supplier replies to the buyer's email directly."
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "404": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "429": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          }
         }
        }
       }
      }
     }
    }
   }
  }
 }
}
