{"openapi":"3.1.0","info":{"title":"Cloudflare Experiments Site API","description":"Public HTTP APIs for Cloudflare Experiments: docs search, MCP Streamable HTTP, and health. 106 open-source Cloudflare product experiments you can deploy in one click - pasteable reference implementations for Workers AI (including Clef decision models / Jev-compatible APIs), MCP, RAG, D1, R2, Durable Objects, Browser Rendering, Queues, Access, Email, Turnstile, Stream, and other Cloudflare platform services. Built for developers and AI agents. Errors use JSON { error, code, hint }.","version":"1.0.0","contact":{"name":"Cloudflare Experiments","url":"https://cloudflare-experiments.com/contact"}},"servers":[{"url":"https://cloudflare-experiments.com"}],"paths":{"/api/health":{"get":{"operationId":"getHealth","summary":"Liveness / health check","description":"Returns JSON status for uptime probes and API catalog status links. No authentication required.","responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"ok"},"name":{"type":"string"},"time":{"type":"string","format":"date-time"}},"required":["status","name","time"]}}}},"405":{"description":"Only GET is allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/search":{"get":{"operationId":"searchDocs","summary":"Search experiment documentation","description":"Full-text search over Cloudflare Experiments docs. Pass a non-empty query; optional tag filters narrow results. Rate-limited per client IP.","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":1},"description":"Search query string (e.g. durable objects, workers ai)"},{"name":"tag","in":"query","required":false,"schema":{"type":"string"},"description":"Comma-separated filter tags matching experiment frontmatter tags"},{"name":"locale","in":"query","required":false,"schema":{"type":"string"},"description":"Optional locale hint for localized docs indexes"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1},"description":"Maximum number of hits to return"},{"name":"mode","in":"query","required":false,"schema":{"type":"string","enum":["full","vector"],"default":"full"},"description":"Search mode: full-text (default) or vector when configured"}],"responses":{"200":{"description":"Ranked search hits (empty array when query is missing)","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable hit identifier"},"type":{"type":"string","enum":["page","heading","text"],"description":"Which part of the page matched"},"content":{"type":"string","description":"Matched text snippet"},"url":{"type":"string","description":"Docs URL for this hit"}},"required":["id","type","content","url"]}}}}},"429":{"description":"Rate limit exceeded - retry after Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/api/mcp":{"post":{"operationId":"mcpJsonRpc","summary":"MCP Streamable HTTP (JSON-RPC)","description":"Send MCP JSON-RPC messages (initialize, tools/list, tools/call, etc.) over Streamable HTTP. Prefer an MCP client over hand-crafted requests.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"method":{"type":"string","description":"MCP JSON-RPC method name"},"params":{"description":"Method-specific parameters"},"id":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"null"}],"description":"Request id (omit for notifications)"}},"required":["jsonrpc","method"]}}}},"responses":{"200":{"description":"JSON-RPC response or SSE stream","content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"result":{"description":"Successful result payload"},"error":{"type":"object","properties":{"code":{"type":"integer"},"message":{"type":"string"}}},"id":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"null"}]}},"required":["jsonrpc"]}}}},"405":{"description":"Method not allowed for this transport action","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"get":{"operationId":"mcpGet","summary":"MCP Streamable HTTP GET","description":"Optional GET for Streamable HTTP transports that support SSE streams. May return 405 when unused for this deployment.","responses":{"200":{"description":"SSE stream when supported","content":{"text/event-stream":{"schema":{"type":"string"}}}},"405":{"description":"GET is not used for this MCP transport configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"delete":{"operationId":"mcpDelete","summary":"End MCP session","description":"Close an MCP Streamable HTTP session when session ids are in use.","responses":{"200":{"description":"Session closed","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"405":{"description":"Method not allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"components":{"schemas":{"ApiError":{"type":"object","description":"Structured API error agents can parse without scraping HTML.","properties":{"error":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Stable machine-readable error code (e.g. NOT_FOUND, RATE_LIMITED)"},"hint":{"type":"string","description":"What to try next (resolution guidance for agents)"}},"required":["error","code","hint"],"additionalProperties":true},"SearchHit":{"type":"object","properties":{"id":{"type":"string","description":"Stable hit identifier"},"type":{"type":"string","enum":["page","heading","text"],"description":"Which part of the page matched"},"content":{"type":"string","description":"Matched text snippet"},"url":{"type":"string","description":"Docs URL for this hit"}},"required":["id","type","content","url"]}}}}