From 1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 Mon Sep 17 00:00:00 2001 From: Zhineng Li Date: Sun, 12 Jul 2026 17:11:17 +0800 Subject: update APIs 20260712 --- .../maasaisearchproxy/2026-04-24/api-docs.php | 577 +++++++++++++++++++++ 1 file changed, 577 insertions(+) create mode 100644 data/en_us/maasaisearchproxy/2026-04-24/api-docs.php (limited to 'data/en_us/maasaisearchproxy/2026-04-24') diff --git a/data/en_us/maasaisearchproxy/2026-04-24/api-docs.php b/data/en_us/maasaisearchproxy/2026-04-24/api-docs.php new file mode 100644 index 0000000..7b631d6 --- /dev/null +++ b/data/en_us/maasaisearchproxy/2026-04-24/api-docs.php @@ -0,0 +1,577 @@ + '1.0', + 'info' => ['style' => 'ROA', 'product' => 'MaasAISearchProxy', 'version' => '2026-04-24'], + 'directories' => ['QaChat', 'WebSearch'], + 'components' => [ + 'schemas' => [], + ], + 'apis' => [ + 'QaChat' => [ + 'summary' => 'Performs web-connected Q&A (OpenAI compatible, supports multi-turn context and follow-up recommendations, SSE streaming / JSON non-streaming).', + 'path' => '/qa/chat', + 'methods' => ['post'], + 'schemes' => ['https', 'sse'], + 'security' => [ + [ + 'AK' => [], + ], + [ + 'ApiKey' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['text/event-stream', 'application/json'], + 'operationType' => 'write', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'publicInformation'], + 'parameters' => [ + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'title' => '', + 'description' => 'The request body parameters.', + 'type' => 'object', + 'properties' => [ + 'appId' => ['title' => '', 'description' => 'The application ID.', 'type' => 'string', 'example' => '2052929167853146113', 'required' => false], + 'sessionId' => ['title' => '', 'description' => 'The session ID.', 'type' => 'string', 'example' => 'chat-abc123', 'required' => false], + 'message' => [ + 'title' => '', + 'description' => 'The user message.', + 'type' => 'object', + 'properties' => [ + 'role' => [ + 'title' => '', + 'description' => 'The message role.', + 'type' => 'string', + 'example' => 'user', + 'enum' => ['user'], + 'required' => false, + ], + 'parts' => [ + 'title' => '', + 'description' => 'The message content.', + 'type' => 'array', + 'items' => [ + 'title' => '', + 'description' => 'The content block.', + 'type' => 'object', + 'properties' => [ + 'type' => [ + 'title' => '', + 'description' => 'The content block type.', + 'type' => 'string', + 'example' => 'text', + 'enum' => ['text', 'file'], + 'required' => false, + ], + 'text' => ['title' => '', 'description' => 'The text content.', 'type' => 'string', 'example' => '今天杭州天气怎么样?', 'required' => false], + 'url' => ['title' => '', 'description' => 'The image URL.', 'type' => 'string', 'example' => 'https://example.com/img.jpg', 'required' => false], + 'mediaType' => ['title' => '', 'description' => 'The media type.', 'type' => 'string', 'example' => 'image/jpeg', 'required' => false], + ], + 'required' => false, + 'example' => '', + ], + 'required' => false, + 'example' => '', + ], + ], + 'required' => false, + 'example' => '', + ], + 'stream' => ['title' => '', 'description' => 'Specifies whether to enable streaming.', 'type' => 'boolean', 'example' => 'true', 'required' => false], + 'options' => [ + 'title' => '', + 'description' => 'The business parameters.', + 'type' => 'object', + 'properties' => [ + 'searchMode' => [ + 'title' => '', + 'description' => 'The web search mode.', + 'type' => 'string', + 'example' => 'force', + 'enum' => ['force', 'auto'], + 'required' => false, + ], + 'enableRewrite' => ['title' => '', 'description' => 'Specifies whether to enable query rewriting.', 'type' => 'boolean', 'example' => 'true', 'required' => false], + 'enableCitation' => ['title' => '', 'description' => 'Specifies whether to enable citation superscripts.', 'type' => 'boolean', 'example' => 'false', 'required' => false], + 'enableFollowUp' => ['title' => '', 'description' => 'Specifies whether to enable follow-up recommendations.', 'type' => 'boolean', 'example' => 'false', 'required' => false], + 'enableImages' => ['title' => '', 'description' => 'Specifies whether to enable mixed text-and-image answers.', 'type' => 'boolean', 'example' => 'false', 'required' => false], + 'followUpPrompt' => ['title' => '', 'description' => 'The follow-up guidance prompt.', 'type' => 'string', 'example' => '从旅游攻略和历史文化两个角度推荐追问', 'required' => false], + 'systemPrompt' => ['title' => '', 'description' => 'The system prompt.', 'type' => 'string', 'example' => '你是专业旅游向导,回答简洁,不超过200字,使用中文。', 'required' => false], + ], + 'required' => false, + 'example' => '', + ], + ], + 'required' => false, + 'example' => '', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'type' => 'object', + 'properties' => [ + 'event' => ['title' => '', 'description' => 'The event type (the type field in an SSE frame when stream=true, consistent with data.type):'."\n" + ."\n" + .'1. Lifecycle'."\n" + .' - start / finish'."\n" + .' - Marks the beginning and end of a message. The start event carries messageId.'."\n" + ."\n" + .'2. Text content'."\n" + .' - text-start / text-delta / text-end'."\n" + .' - Streaming output of Markdown body content. Text blocks within the same segment share the same id.'."\n" + ."\n" + .'3. Recall intermediate results (only when action=search)'."\n" + .' - data-recall'."\n" + .' - Deduplicated recall items for frontend "thinking process" display.'."\n" + ."\n" + .'4. Source references (only when action=search)'."\n" + .' - data-reference'."\n" + .' - Web source list. items[].sourceType=web.'."\n" + ."\n" + .'5. Follow-up recommendations (when enableFollowUp=true and results are available)'."\n" + .' - data-follow-up'."\n" + .' - A questions array.'."\n" + ."\n" + .'6. Phase timing (all branches)'."\n" + .' - data-usage'."\n" + .' - qp_ms / recall_rank_ms / first_token_ms / answer_ms / follow_up_ms / grand_total_ms / input_tokens / output_tokens / total_tokens (included based on the branch).'."\n" + ."\n" + .'7. Errors'."\n" + .' - error (errorText / errorCode / retryable) → finish(finishReason=error) → [DONE]'."\n" + ."\n" + .'Typical sequences:'."\n" + .'- search: start → data-recall → text-* → data-reference → [data-follow-up] → data-usage → finish → [DONE]'."\n" + .'- answer: start → text-* → [data-follow-up] → data-usage → finish → [DONE]'."\n" + .'- clarify: start → text-* → data-usage → finish → [DONE]'."\n" + ."\n" + .'Note: Events such as data-qp / data-ranked / data-image-info / data-video-info / json-* for image, text, and video templates are not included.', 'type' => 'string', 'example' => 'start'], + 'data' => [ + 'title' => '', + 'description' => 'The protocol data.', + 'type' => 'object', + 'properties' => [ + 'type' => ['title' => '', 'description' => 'The event type, same as event.', 'type' => 'string', 'example' => 'start'], + 'requestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '2a127bc9-9474-405d-916d-8bc4475fa459'], + 'id' => ['title' => '', 'description' => 'The request ID, same as requestId.', 'type' => 'string', 'example' => '2a127bc9-9474-405d-916d-8bc4475fa459'], + 'delta' => ['title' => '', 'description' => 'The text delta.', 'type' => 'string', 'example' => '杭州今天多云,气温 18~25℃。'], + 'data' => ['title' => '', 'description' => 'The structured payload.', 'type' => 'string', 'example' => '{'."\n" + .' "items": ['."\n" + .' {'."\n" + .' "sourceType": "web",'."\n" + .' "index": 1,'."\n" + .' "title": "杭州天气预报",'."\n" + .' "url": "https://example.com/weather",'."\n" + .' "snippet": "今日杭州多云...",'."\n" + .' "score": 0.95,'."\n" + .' "favicon": "https://example.com/favicon.ico"'."\n" + .' }'."\n" + .' ]'."\n" + .'}'."\n"], + 'finishReason' => [ + 'title' => '', + 'description' => 'The finish reason.', + 'type' => 'string', + 'example' => 'stop', + 'enum' => ['stop', 'error'], + ], + 'errorCode' => ['title' => '', 'description' => 'The error code.', 'type' => 'string', 'example' => 'INTERNAL_ERROR'], + 'errorText' => ['title' => '', 'description' => 'The error description.', 'type' => 'string', 'example' => '模型服务暂时不可用'], + 'retryable' => ['title' => '', 'description' => 'Indicates whether the request can be retried.', 'type' => 'boolean', 'example' => 'true'], + ], + 'example' => '', + ], + 'id' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '2a127bc9-9474-405d-916d-8bc4475fa459'], + ], + 'description' => 'stream=true (default): Content-Type is text/event-stream. Each frame is formatted as data: {json}\\n\\n, and the stream ends with data: [DONE]\\n\\n.'."\n" + .'The schema below aligns with the ais-engine response structure (event + data + id). The fields within data correspond to the SSE JSON payload.'."\n" + ."\n" + .'stream=false: Content-Type is application/json;charset=UTF-8. A one-time aggregated object is returned (not wrapped in event/data/id):'."\n" + .'requestId, messageId, finishReason, content, action,'."\n" + .'recall (only when action=search), references, follow_up, usage.'."\n" + .'When finishReason=error, the response contains error{errorText, errorCode, retryable}.'."\n" + .'Internal pipeline data such as qp and ranked is not delivered.', + 'title' => '', + 'example' => '', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'Web-connected Q&A', + 'requestParamsDescription' => '- `sessionId` and `message` are required parameters. `stream` is optional and defaults to `true` (SSE streaming). Set it to `false` to receive a one-time JSON aggregated response.'."\n" + .'- This operation uses the Chat UI protocol: each request sends only the current `message`. Multi-turn history is managed server-side by `sessionId`, so **you do not need to include historical messages in the request body**. Reuse the same `sessionId` to continue a multi-turn conversation.'."\n" + .'- `appId` is optional. When provided, the proxy loads the published policy from the console and merges it into `options`. Non-null fields in the request body `options` override policy values. `appId` is consumed by the proxy and is not passed through to upstream services.'."\n" + .'- All `type=text` entries in `message.parts` are concatenated in order to form the current question. Entries with `type=file` and `mediaType` of `image/*` (or unspecified) are treated as image inputs.'."\n" + .'- Image `url` supports HTTPS URLs, `data:image/*;base64,...`, or raw base64. A single base64 image must not exceed 10 MB. Files with a non-`image/*` type are ignored.'."\n" + .'- When calling with an API key, pass a flat JSON body. Do not wrap it in a `body` field. Use camelCase for all field names.', + 'responseParamsDescription' => '- Response format: When stream=true (default), Content-Type is text/event-stream. Frames are pushed via SSE, and the last frame is data: [DONE]. When stream=false, Content-Type is application/json, and a one-time aggregated object is returned.'."\n" + .'- Streaming frame structure: Each SSE frame contains three top-level fields: event, data, and id. data.type is consistent with event.'."\n" + .'- requestId: Every SSE event except [DONE] carries a requestId for end-to-end troubleshooting.'."\n" + .'- Citation superscripts: When enableCitation=true, the body text contains [[cite:n]] superscripts, where n corresponds one-to-one with references.items[].index.'."\n" + .'- snippet usage: The snippet in recall and references is a short summary returned by the search engine. The content may be truncated and does not represent the full web page. To obtain the full text, fetch the page content from the corresponding url.'."\n" + .'- Internal data: qp and ranked are internal pipeline data on the server side and are not delivered to the client.'."\n" + ."\n" + .'---.'."\n" + ."\n" + .'#### Successful response (stream=false)'."\n" + ."\n" + .'```json'."\n" + .'{'."\n" + .' "requestId": "2a127bc9-9474-405d-916d-8bc4475fa459",'."\n" + .' "messageId": "msg-2a127bc9-9474-405d-916d-8bc4475fa459",'."\n" + .' "finishReason": "stop",'."\n" + .' "content": "杭州今天多云,气温 18~25℃。[[cite:1]]",'."\n" + .' "action": "search",'."\n" + .' "recall": {'."\n" + .' "total": 2,'."\n" + .' "items": ['."\n" + .' {'."\n" + .' "title": "杭州天气预报",'."\n" + .' "link": "https://example.com/weather",'."\n" + .' "snippet": "今日杭州多云,气温 18~25℃...",'."\n" + .' "date": "2026-06-23T08:00:00Z",'."\n" + .' "rank_score": 0.95,'."\n" + .' "source": {'."\n" + .' "name": "中国天气网",'."\n" + .' "domain": "weather.com.cn",'."\n" + .' "favicon": "https://example.com/favicon.ico"'."\n" + .' }'."\n" + .' }'."\n" + .' ]'."\n" + .' },'."\n" + .' "references": {'."\n" + .' "items": ['."\n" + .' {'."\n" + .' "sourceType": "web",'."\n" + .' "index": 1,'."\n" + .' "title": "杭州天气预报",'."\n" + .' "url": "https://example.com/weather",'."\n" + .' "snippet": "今日杭州多云...",'."\n" + .' "score": 0.95,'."\n" + .' "favicon": "https://example.com/favicon.ico"'."\n" + .' }'."\n" + .' ]'."\n" + .' },'."\n" + .' "follow_up": {'."\n" + .' "questions": ["杭州明天天气怎么样?", "杭州近期适合出游吗?"]'."\n" + .' },'."\n" + .' "usage": {'."\n" + .' "qp_ms": 120.5,'."\n" + .' "recall_rank_ms": 350.2,'."\n" + .' "answer_ms": 1500.0,'."\n" + .' "follow_up_ms": 856.2,'."\n" + .' "grand_total_ms": 9716.0,'."\n" + .' "input_tokens": 2480,'."\n" + .' "output_tokens": 356,'."\n" + .' "total_tokens": 2836'."\n" + .' }'."\n" + .'}'."\n" + .'```.'."\n" + ."\n" + .'#### Successful response (stream=true, SSE single frame example)'."\n" + ."\n" + .'```json'."\n" + .'{'."\n" + .' "event": "text-delta",'."\n" + .' "data": {'."\n" + .' "type": "text-delta",'."\n" + .' "requestId": "2a127bc9-9474-405d-916d-8bc4475fa459",'."\n" + .' "id": "txt-2a127bc9-9474-405d-916d-8bc4475fa459",'."\n" + .' "delta": "杭州今天多云,气温 18~25℃。"'."\n" + .' },'."\n" + .' "id": "2a127bc9-9474-405d-916d-8bc4475fa459"'."\n" + .'}'."\n" + .'```.'."\n" + ."\n" + .'#### Failed response (stream=false)'."\n" + ."\n" + .'```json'."\n" + .'{'."\n" + .' "requestId": "2a127bc9-9474-405d-916d-8bc4475fa459",'."\n" + .' "messageId": "msg-2a127bc9-9474-405d-916d-8bc4475fa459",'."\n" + .' "finishReason": "error",'."\n" + .' "error": {'."\n" + .' "errorText": "模型服务暂时不可用",'."\n" + .' "errorCode": "INTERNAL_ERROR",'."\n" + .' "retryable": true'."\n" + .' }'."\n" + .'}'."\n" + .'```.'."\n" + ."\n" + .'#### Failed response (gateway layer / streaming)'."\n" + ."\n" + .'```json'."\n" + .'{'."\n" + .' "error": {'."\n" + .' "message": "userId不能为空",'."\n" + .' "code": "403"'."\n" + .' }'."\n" + .'}'."\n" + .'```.'."\n" + ."\n" + .'#### Error codes'."\n" + ."\n" + .'| Error code | message | Description | Recommended action |'."\n" + .'| --- | --- | --- | --- |'."\n" + .'| `INVALID_PARAM` | query 不能为空 / 图片超过 10MB | Invalid request parameters. | Check whether `message.parts` contains valid text or images, and then retry the request. |'."\n" + .'| `INTERNAL_ERROR` | 模型服务暂时不可用 | Internal service error. | Retry later. If the error persists, contact technical support and provide the `requestId` and request parameters. |'."\n" + .'| `403` | Account not in whitelist | The account does not have web-connected Q&A permissions. | Request access to the beta whitelist and then retry. |'."\n" + .'| `400` | userId不能为空 | Missing caller account information. | Verify that the API key is bound to a valid primary account. |'."\n" + .'| `400` | request body is empty | The request body is empty. | Check the request body format and Content-Type. |'."\n" + .'| `400` | Request was denied due to user flow control | The request rate exceeds the QPS threshold. | Reduce the request frequency. |'."\n" + .'| `NoPermission` | — | Missing RAM permissions. | Grant the `maasaisearchproxy:QaChat` and `maasaisearchproxy:CallWithBearerToken` permissions. |'."\n" + .'| `InvalidApiKey` | — | The API key is invalid. | Verify that the key is the full-length key generated at creation time. |'."\n" + .'| `503` | The request has failed due to a temporary failure of the server | The server is busy or under maintenance. | Wait a moment and retry. If the issue persists, contact technical support. |.', + 'changeSet' => [], + 'ramActions' => [], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"event\\": \\"start\\",\\n \\"data\\": {\\n \\"type\\": \\"start\\",\\n \\"requestId\\": \\"2a127bc9-9474-405d-916d-8bc4475fa459\\",\\n \\"id\\": \\"2a127bc9-9474-405d-916d-8bc4475fa459\\",\\n \\"delta\\": \\"杭州今天多云,气温 18~25℃。\\",\\n \\"data\\": \\"{\\\\n \\\\\\"items\\\\\\": [\\\\n {\\\\n \\\\\\"sourceType\\\\\\": \\\\\\"web\\\\\\",\\\\n \\\\\\"index\\\\\\": 1,\\\\n \\\\\\"title\\\\\\": \\\\\\"杭州天气预报\\\\\\",\\\\n \\\\\\"url\\\\\\": \\\\\\"https://example.com/weather\\\\\\",\\\\n \\\\\\"snippet\\\\\\": \\\\\\"今日杭州多云...\\\\\\",\\\\n \\\\\\"score\\\\\\": 0.95,\\\\n \\\\\\"favicon\\\\\\": \\\\\\"https://example.com/favicon.ico\\\\\\"\\\\n }\\\\n ]\\\\n}\\\\n\\",\\n \\"finishReason\\": \\"stop\\",\\n \\"errorCode\\": \\"INTERNAL_ERROR\\",\\n \\"errorText\\": \\"模型服务暂时不可用\\",\\n \\"retryable\\": true\\n },\\n \\"id\\": \\"2a127bc9-9474-405d-916d-8bc4475fa459\\"\\n}","type":"json"}]', + ], + 'WebSearch' => [ + 'summary' => 'The Web Search API allows you to perform real-time searches across the internet and retrieve a structured list of web results. You can integrate it into scenarios such as AI Q&A, content aggregation, public opinion monitoring, and knowledge augmentation, providing your applications with real-time, multi-source external knowledge support.'."\n" + ."\n" + .'Two search modes are available:'."\n" + .'1. Pro: Suitable for complex queries, delivers more relevant and authoritative results, and supports searching global sources.'."\n" + .'2. Lite: Suitable for everyday queries, with faster response times and lower costs.', + 'path' => '/api/web-search', + 'methods' => ['post'], + 'schemes' => ['https'], + 'security' => [ + [ + 'AK' => [], + ], + [ + 'ApiKey' => [], + ], + ], + 'consumes' => ['application/json'], + 'produces' => ['application/json'], + 'operationType' => 'read', + 'deprecated' => false, + 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'free', 'autoTest' => true, 'tenantRelevance' => 'publicInformation'], + 'parameters' => [ + [ + 'name' => 'body', + 'in' => 'body', + 'style' => 'json', + 'schema' => [ + 'description' => 'Request body parameters', + 'type' => 'object', + 'properties' => [ + 'query' => ['description' => 'The search query, supporting natural language expressions. The recommended maximum length is 100 characters.', 'type' => 'string', 'required' => false, 'example' => 'Alibaba Cloud Latest News', 'title' => ''], + 'limit' => ['description' => 'The maximum number of results to return. Valid values: 1 to 10. Default value: 10.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '10', 'title' => ''], + 'includeDomain' => [ + 'description' => 'Allowlisted domains. When configured, only results from the specified domains are returned. A maximum of 30 domains are supported per request. Note: This parameter takes effect only when the region parameter is set to global.', + 'type' => 'array', + 'items' => ['description' => 'url', 'type' => 'string', 'required' => false, 'example' => 'www.aliyun.com', 'title' => ''], + 'required' => false, + 'title' => '', + 'example' => '', + ], + 'excludeDomain' => [ + 'description' => 'Blocklisted domains. When configured, results from the specified domains are excluded. A maximum of 30 domains are supported per request.', + 'type' => 'array', + 'items' => ['description' => 'url', 'type' => 'string', 'required' => false, 'example' => 'example.com', 'title' => ''], + 'required' => false, + 'title' => '', + 'example' => '', + ], + 'startTime' => ['description' => 'Returns search results published on or after this date (inclusive). Format: `YYYY-MM-DD`, for example, `2024-01-01`. If not specified, no start date restriction is applied.', 'type' => 'string', 'required' => false, 'example' => '2026-03-06', 'title' => ''], + 'endTime' => ['description' => 'Returns search results published on or before this date (inclusive). Format: `YYYY-MM-DD`, for example, `2026-01-01`. If not specified, no end date restriction is applied.', 'type' => 'string', 'required' => false, 'example' => '2026-03-06', 'title' => ''], + 'region' => [ + 'description' => 'The scope of search sources. Currently supported values: mainland_china (Mainland China) and global (Global). Default value: mainland_china.'."\n" + ."\n" + .'Note: If you select global, your data may be transferred across borders. Please assess the relevant risks on your own. By proceeding, you are deemed to have completed the assessment, and you assume all risks and responsibilities associated with cross-border data transfer.', + 'enumValueTitles' => ['global' => 'Global', 'mainland_china' => 'Mainland China'], + 'type' => 'string', + 'required' => false, + 'example' => 'mainland_china', + 'title' => '', + ], + 'searchType' => [ + 'description' => 'The search mode. Currently supported values: pro and lite. Default value: pro.'."\n" + ."\n" + .'Note: In lite mode, the region, excludeDomain, and includeDomain parameters are not supported.', + 'enumValueTitles' => ['pro' => 'pro', 'lite' => 'lite'], + 'type' => 'string', + 'required' => false, + 'example' => 'pro', + 'title' => '', + ], + ], + 'required' => false, + 'title' => '', + 'example' => '', + ], + ], + ], + 'responses' => [ + 200 => [ + 'schema' => [ + 'title' => '', + 'description' => 'Result', + 'type' => 'object', + 'properties' => [ + 'code' => ['title' => '', 'description' => 'The business status code. `200` indicates a successful request. Other values indicate exceptions. For more information, see the "Error Codes" section.', 'type' => 'integer', 'format' => 'int32', 'example' => '200'], + 'message' => ['title' => '', 'description' => 'The status description. The value is `"successful"` for successful requests, or a specific error message for failed requests.', 'type' => 'string', 'example' => 'successful'], + 'data' => [ + 'description' => 'The search result data. This field is present only when `code` is `200`.', + 'type' => 'object', + 'properties' => [ + 'total' => ['title' => '', 'description' => 'The total number of results matched by this search.', 'type' => 'integer', 'format' => 'int32', 'example' => '10'], + 'result' => [ + 'description' => 'The list of search results.', + 'type' => 'array', + 'items' => [ + 'description' => 'The Result object.', + 'type' => 'object', + 'properties' => [ + 'title' => ['title' => '', 'description' => 'The title of the web page.', 'type' => 'string', 'example' => 'Alibaba Cloud: AI and Cloud Computing Services'], + 'url' => ['title' => '', 'description' => 'The original URL of the web page.', 'type' => 'string', 'example' => 'https://www.alibabacloud.com/'], + 'snippet' => ['title' => '', 'description' => 'A snippet or summary of the web page.', 'type' => 'string', 'example' => 'Everything You Need in One Powerful AI Cloud Platform For AI Builders shaping the future and Enterprises scaling AI securely.'."\n" + .'Redefining AI economics with unmatched speed, intelligence and affordability.'], + 'date' => ['title' => '', 'description' => 'The publication date of the web page in ISO 8601 format.', 'type' => 'string', 'example' => '2026-05-06T00:25:35Z'], + 'source' => [ + 'title' => '', + 'description' => 'The source information of the web page, including the favicon, domain, and name fields.', + 'type' => 'object', + 'properties' => [ + 'name' => ['title' => '', 'description' => 'The name of the website, which is typically the same as the domain name or the display name of the website.', 'type' => 'string', 'example' => 'www.aliyun.com'], + 'domain' => ['title' => '', 'description' => 'The domain of the website.', 'type' => 'string', 'example' => 'www.aliyun.com'], + 'favicon' => ['title' => '', 'description' => 'The favicon URL of the website.', 'type' => 'string', 'example' => 'https://domain.com/sample_favicon.webp'], + ], + 'example' => '', + ], + ], + 'title' => '', + 'example' => '', + ], + 'title' => '', + 'example' => '', + ], + ], + 'title' => '', + 'example' => '', + ], + ], + 'example' => '', + ], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'title' => 'Web Search', + 'requestParamsDescription' => '- Both `start_date` and `end_date` are optional parameters that can be used individually or in combination to define a time range. Time filtering is based on the publication date of the web page (date). If a web page does not have an annotated publication date, that result is not subject to time parameter constraints.', + 'responseParamsDescription' => '- Time filtering precision: The filtering granularity of start_date and end_date is at the day level (precise to the date), and relies on the publication date annotated by the web page itself. For web pages without an annotated publication date, time filtering does not take effect.'."\n" + .'- Result deduplication: The same URL will not appear more than once in a single request, but result sets across different requests are not guaranteed to be entirely different.'."\n" + .'- Using snippets: The snippet is a short summary returned by the search engine. The content may be truncated and does not represent the full text of the web page. To obtain the full content, fetch the page content from the corresponding URL yourself.'."\n" + ."\n" + .'#### Successful Response'."\n" + .'```'."\n" + .'{'."\n" + .' "code": 200,'."\n" + .' "message": "successful",'."\n" + .' "data": {'."\n" + .' "total": 2,'."\n" + .' "result": ['."\n" + .' {'."\n" + .' "snippet": "Alibaba Cloud — one of the world\'s leading cloud computing and AI technology companies under Alibaba Group...",'."\n" + .' "date": "2025-12-10T16: 00: 00Z",'."\n" + .' "source": {'."\n" + .' "favicon": "https://domain.com/sample_img_1.png",'."\n" + .' "domain": "www.aliyun.com",'."\n" + .' "name": "Alibaba Cloud"'."\n" + .' },'."\n" + .' "title": "Alibaba Cloud - Computing for the Incalculable Value",'."\n" + .' "url": "http://www.aliyun.com/"'."\n" + .' },'."\n" + .' {'."\n" + .' "snippet": "Cloud computing services and cloud solutions...",'."\n" + .' "date": "2025-12-10T16: 00: 00Z",'."\n" + .' "source": {'."\n" + .' "favicon": "https://domain.com/sample_img_2.webp",'."\n" + .' "domain": "www.alibabacloud.com",'."\n" + .' "name": "www.alibabacloud.com"'."\n" + .' },'."\n" + .' "title": "Cloud Computing Services and Solutions - Alibaba Cloud",'."\n" + .' "url": "https://www.alibabacloud.com/zh/iat/homepage-new-test?_p_lc=1"'."\n" + .' }'."\n" + .' ]'."\n" + .' }'."\n" + .'}'."\n" + ."\n" + .'```'."\n" + ."\n" + .'#### Failed Response'."\n" + .'```'."\n" + .'{'."\n" + .' "code": 401,'."\n" + .' "message": "Invalid parameter format"'."\n" + .'}'."\n" + ."\n" + .'```'."\n" + ."\n" + .'#### Error Codes'."\n" + ."\n" + .'| Error Code | Message | Description | Recommended Action |'."\n" + .'| --- | --- | --- | --- |'."\n" + .'|`201` | Partial results returned due to compliance restrictions | Some search results were blocked due to compliance requirements. | Check whether the query complies with relevant regulations, or ignore the blocked content and use the currently returned results. |'."\n" + .'| `301` | Request blocked due to legal and regulatory requirements | The request was blocked for security reasons. This request is not billed. | Check whether the content of the query parameter is lawful and compliant, and resubmit the request after modification. |'."\n" + .'| `400` | Request was denied due to user flow control | The request was too frequent, exceeding the QPS threshold. | Reduce the request frequency. |'."\n" + .'| `401` | Invalid request parameters | The request parameters are invalid. | Check the format and length of the request parameters, and resubmit the request after modification. |'."\n" + .'| `500` | Internal server error | An internal server error occurred. | Retry later. If the issue persists, contact technical support and provide the request time and parameters. |'."\n" + .'| `503` | The request has failed due to a temporary failure of the server | The server is busy or under maintenance and cannot process the current request. | Wait a moment and then refresh the page to retry. If the issue persists, contact technical support. |', + 'changeSet' => [], + 'ramActions' => [ + [ + 'operationType' => 'none', + 'ramAction' => [ + 'action' => 'maasaisearchproxy:WebSearch', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'MaasAISearchProxy', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + 'additionalActions' => [ + ['action' => 'maasaisearchproxy:CallWithBearerToken', 'validationType' => 'conditional'], + ], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"code\\": 200,\\n \\"message\\": \\"successful\\",\\n \\"data\\": {\\n \\"total\\": 10,\\n \\"result\\": [\\n {\\n \\"title\\": \\"Alibaba Cloud: AI and Cloud Computing Services\\",\\n \\"url\\": \\"https://www.alibabacloud.com/\\",\\n \\"snippet\\": \\"Everything You Need in One Powerful AI Cloud Platform For AI Builders shaping the future and Enterprises scaling AI securely.\\\\nRedefining AI economics with unmatched speed, intelligence and affordability.\\",\\n \\"date\\": \\"2026-05-06T00:25:35Z\\",\\n \\"source\\": {\\n \\"name\\": \\"www.aliyun.com\\",\\n \\"domain\\": \\"www.aliyun.com\\",\\n \\"favicon\\": \\"https://domain.com/sample_favicon.webp\\"\\n }\\n }\\n ]\\n }\\n}","type":"json"}]', + ], + ], + 'endpoints' => [ + ['regionId' => 'public', 'regionName' => 'Public network', 'areaId' => 'other', 'areaName' => 'Other', 'public' => 'maasaisearchproxy.aliyuncs.com', 'endpoint' => 'maasaisearchproxy.aliyuncs.com', 'vpc' => ''], + ], + 'errorCodes' => [], + 'changeSet' => [], + 'ram' => [ + 'productCode' => 'MaasAISearchProxy', + 'productName' => 'AI Search Proxy', + 'ramCodes' => ['maasaisearchproxy'], + 'ramLevel' => 'OPERATION', + 'ramConditions' => [], + 'ramActions' => [ + [ + 'apiName' => 'WebSearch', + 'description' => '', + 'operationType' => 'none', + 'additionalActions' => [ + ['action' => 'maasaisearchproxy:CallWithBearerToken', 'validationType' => 'conditional'], + ], + 'ramAction' => [ + 'action' => 'maasaisearchproxy:WebSearch', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'MaasAISearchProxy', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + ], + 'resourceTypes' => [], + ], +]; -- cgit v1.2.3