{
  "openapi": "3.1.0",
  "info": {
    "title": "Crawl4Agent",
    "description": "crawl4ai-compatible web crawler API: POST a URL, get clean LLM-ready Markdown with fit_markdown pruning. No Python, no keys, x402 per call.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://crawl4agent.saastemly.com"
    }
  ],
  "paths": {
    "/md": {
      "post": {
        "operationId": "md",
        "summary": "Turn a URL into LLM-ready Markdown with crawl4ai's /md contract: f raw|fit (raw or pruned fit_markdown), q optional user query, c cache flag.",
        "description": "Turn a URL into LLM-ready Markdown with crawl4ai's /md contract: f raw|fit (raw or pruned fit_markdown), q optional user query, c cache flag. Answers {url, filter, query, cache, markdown, success}.\n\nPrice: $0.008 per call (x402, or prepaid credits with an API key).",
        "x-price-usd": 0.008,
        "responses": {
          "200": {
            "description": "The result",
            "content": {
              "application/json": {
                "example": {
                  "url": "https://example.com/",
                  "filter": "fit",
                  "query": "",
                  "cache": "0",
                  "markdown": "# Example Domain\nThis domain is for use in illustrative examples in documents.\nMore information...\n",
                  "success": true
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid (nothing is charged)"
          },
          "402": {
            "description": "Payment required: the x402 terms are in the PAYMENT-REQUIRED header; or send an API key"
          }
        },
        "security": [
          {},
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "The page to crawl: an https:// URL"
                  },
                  "f": {
                    "type": "string",
                    "enum": [
                      "raw",
                      "fit"
                    ],
                    "description": "raw = raw_markdown, fit = pruned fit_markdown"
                  },
                  "q": {
                    "type": "string",
                    "description": "Optional user query for BM25 fit filtering"
                  },
                  "c": {
                    "type": "string",
                    "description": "Cache flag (\"0\" default, \"1\" to bypass the cache)"
                  }
                },
                "required": [
                  "url"
                ]
              },
              "example": {
                "url": "https://example.com/",
                "f": "fit"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key with prepaid credits, from https://crawl4agent.saastemly.com"
      }
    }
  },
  "x-mcp-server": "https://crawl4agent.saastemly.com/mcp"
}