{"openapi":"3.1.0","info":{"title":"ShortDramaTV AI Agent & Search API","description":"OpenAPI specification for ShortDramaTV's vertical drama search and discovery endpoints. Enables AI browsing agents, LLMs, and applications to search 37,400+ free full-episode short drama series via browser-compatible GET URLs or MCP JSON-RPC.","version":"1.1.0","contact":{"name":"ShortDramaTV Support","email":"contact@shortdramatv.net","url":"https://shortdramatv.net/legal"}},"servers":[{"url":"https://shortdramatv.net","description":"ShortDramaTV Production Server"}],"paths":{"/api/agent/search":{"get":{"summary":"Search Drama Catalog (HTML & JSON)","description":"Returns HTML5 for browser agents or structured JSON for API callers. If exact drama is missing, returns smart similar drama recommendations with agent instructions.","operationId":"searchDramas","parameters":[{"name":"q","in":"query","required":true,"description":"Drama title, keywords, publisher name (e.g., DramaBox, ReelShort), or trope.","schema":{"type":"string","example":"The Double Life of My Billionaire Husband"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of results to return (default 10, max 25).","schema":{"type":"integer","default":10,"minimum":1,"maximum":25}},{"name":"format","in":"query","required":false,"description":"Response format: 'json' for raw JSON or omit for smart browser-compatible HTML+JSON.","schema":{"type":"string","enum":["json","html"]}}],"responses":{"200":{"description":"Successful response containing matching dramas or similar recommendations.","content":{"text/html":{},"application/json":{}}}}}},"/api/mcp":{"get":{"summary":"Execute MCP Tools via Browser GET or View Specification","description":"Executes MCP tools directly via standard GET URL parameters (returning clean HTML+JSON with 0% browser errors) or returns the MCP server specification if called with format=json.","operationId":"getMcpToolExecution","parameters":[{"name":"tool","in":"query","required":false,"description":"Tool to execute: search_dramas, get_drama_details, find_similar_dramas, discover_by_genre.","schema":{"type":"string","enum":["search_dramas","get_drama_details","find_similar_dramas","discover_by_genre"]}},{"name":"q","in":"query","required":false,"description":"Search keyword, drama title, or trope.","schema":{"type":"string"}},{"name":"genre","in":"query","required":false,"description":"Genre filter (e.g. Billionaire, Romance, Revenge, Werewolf, CEO).","schema":{"type":"string"}},{"name":"slug","in":"query","required":false,"description":"Drama slug or ID for details lookup.","schema":{"type":"string"}},{"name":"format","in":"query","required":false,"description":"Set to 'json' to receive raw JSON response instead of HTML.","schema":{"type":"string","enum":["json","html"]}}],"responses":{"200":{"description":"Tool results or MCP discovery specification.","content":{"text/html":{},"application/json":{}}}}},"post":{"summary":"Remote Model Context Protocol (MCP) JSON-RPC 2.0 Handler","description":"Stateless JSON-RPC 2.0 endpoint for MCP clients (initialize, tools/list, tools/call).","operationId":"handleMcpJsonRpc","responses":{"200":{"description":"JSON-RPC 2.0 response with tool outputs.","content":{"application/json":{}}}}}},"/catalog":{"get":{"summary":"Paginated HTML Catalog Directory (All 37,400+ Series)","description":"Crawlable HTML directory exposing 200 series per page with canonical watch links for search bots and AI crawlers.","operationId":"getCatalogDirectory","parameters":[{"name":"page","in":"query","required":false,"description":"Page number (1 to 188).","schema":{"type":"integer","default":1}},{"name":"source","in":"query","required":false,"description":"Filter by studio (e.g. dramabox, reelshort, pinedrama, shortmax).","schema":{"type":"string"}},{"name":"letter","in":"query","required":false,"description":"Filter by title first letter (A-Z, 0-9).","schema":{"type":"string"}}],"responses":{"200":{"description":"HTML catalog directory page with ItemList schema.","content":{"text/html":{}}}}}},"/explore":{"get":{"summary":"Explore & Filter Catalog (Web HTML)","description":"Human and crawler landing page for catalog exploration, search, and genre/source filtering.","operationId":"exploreCatalog","parameters":[{"name":"q","in":"query","required":false,"description":"Search keyword or drama title.","schema":{"type":"string"}},{"name":"genre","in":"query","required":false,"description":"Filter by genre (e.g., Romance, Billionaire, Revenge, Werewolf).","schema":{"type":"string"}},{"name":"source","in":"query","required":false,"description":"Filter by publisher (e.g., DramaBox, ReelShort, PineDrama, ShortMax).","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort order: popular, latest, most-episodes.","schema":{"type":"string","enum":["popular","latest","most-episodes"]}}],"responses":{"200":{"description":"HTML exploration page with drama cards and SSR ItemList schema.","content":{"text/html":{}}}}}},"/for-ai-agents":{"get":{"summary":"AI Agent & Developer Integration Hub (HTML)","description":"Documentation hub, Model Context Protocol (MCP) server reference, and crawlable SSR catalog directory.","operationId":"getAiAgentHub","responses":{"200":{"description":"HTML Developer & AI Agent Hub.","content":{"text/html":{}}}}}},"/.well-known/mcp.json":{"get":{"summary":"MCP Machine-Readable Discovery Manifest","description":"Standard discovery manifest pointing to /api/mcp.","operationId":"getMcpManifest","responses":{"200":{"description":"MCP manifest JSON or HTML guide.","content":{"application/json":{},"text/html":{}}}}}},"/llms.txt":{"get":{"summary":"Plaintext AI Agent Playbook & Documentation","description":"Markdown instructions for LLM browsing agents detailing catalog facts and search routing.","operationId":"getLlmsDocumentation","responses":{"200":{"description":"Plaintext LLM playbook.","content":{"text/plain":{}}}}}}}}