{ "components": { "securitySchemes": { "apiAuth": { "type": "apiKey", "name": "X-API-KEY", "in": "header" } } }, "info": { "title": "Web Search", "version": "1.0.0" }, "openapi": "3.0.0", "paths": { "/search": { "post": { "summary": "Search Google and return top 10 results", "operationId": "searchGoogle", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "q" ], "properties": { "q": { "type": "string", "example": "今天吃什么" }, "gl": { "type": "string", "description": "Google Geo location parameter", "example": "cn" }, "hl": { "type": "string", "description": "Google Geo locale parameter", "example": "zh-cn" } } } } } }, "responses": { "200": { "description": "Successful search results", "content": { "application/json": { "schema": { "type": "object", "required": [ "result" ], "properties": { "result": { "type": "string", "description": "Top 10 search results", "example": "\"title\": \"周末游推荐\",\n\"link\": \"https://www.example.com/destinations-for-weekends\",\n\"snippet\": \"周末去哪玩?周末旅游频道,精心推荐数百个周末游经典线路\",\n\"position\": 1" } } } } } } }, "security": [ { "apiAuth": [] } ] } } }, "security": [ { "apiAuth": [] } ], "servers": [ { "url": "https://google.serper.dev" } ] }