查看原始 JSON
{
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"required": [
"query"
],
"~standard": {
"vendor": "zod",
"version": 1,
"jsonSchema": {}
},
"properties": {
"count": {
"type": "integer",
"default": 5,
"maximum": 100,
"minimum": 1,
"description": "返回结果数量,范围 1 至 100。"
},
"query": {
"type": "string",
"maxLength": 500,
"minLength": 1,
"description": "搜索词。"
},
"topic": {
"enum": [
"general",
"news"
],
"type": "string",
"default": "general",
"description": "general 为一般网页搜索,news 为新闻搜索。"
},
"format": {
"enum": [
"markdown",
"text"
],
"type": "string",
"default": "text",
"description": "相关片段的输出格式。"
},
"country": {
"type": "string",
"description": "优先搜索的 ISO 3166 国家代码;默认 auto 从问题推断。"
},
"end_time": {
"type": "string",
"description": "筛选结果的结束时间,格式为 ISO 8601。"
},
"highlight": {
"type": "object",
"properties": {
"enable": {
"type": "boolean",
"default": true,
"description": "为 true 时,每条结果返回与查询相关的片段。"
},
"max_tokens": {
"type": "integer",
"default": 512,
"maximum": 20000,
"minimum": 100,
"description": "每段相关片段的最多 tokens 数量。"
}
},
"additionalProperties": false
},
"safesearch": {
"enum": [
"off",
"strict"
],
"type": "string",
"default": "strict",
"description": "成人或露骨内容筛选。"
},
"start_time": {
"type": "string",
"description": "筛选结果的开始时间,格式为 ISO 8601。"
},
"time_basis": {
"enum": [
"auto",
"published",
"crawled"
],
"type": "string",
"default": "auto",
"description": "用于时间筛选的时间字段。"
},
"time_range": {
"enum": [
"day",
"week",
"month",
"year",
"d",
"w",
"m",
"y"
],
"type": "string",
"description": "从现在向前计算的相对时间范围,与 start_time/end_time 互斥;明确时间参数优先。"
},
"exclude_text": {
"type": "array",
"items": {
"type": "string",
"maxLength": 30
},
"maxItems": 5,
"description": "结果页面正文中不得出现的字符串。"
},
"full_content": {
"type": "object",
"properties": {
"enable": {
"type": "boolean",
"default": false,
"description": "为 true 时,每条结果返回 full_content。"
},
"max_tokens": {
"type": "integer",
"default": 2048,
"maximum": 100000,
"minimum": 100,
"description": "每条结果完整内容的最多 tokens 数量。"
}
},
"additionalProperties": false
},
"include_text": {
"type": "array",
"items": {
"type": "string",
"maxLength": 30
},
"maxItems": 5,
"description": "结果页面正文中必须出现的字符串。"
},
"include_images": {
"type": "boolean",
"default": false,
"description": "是否在每条结果中包含图片。"
},
"exclude_domains": {
"type": "array",
"items": {
"type": "string",
"maxLength": 60
},
"maxItems": 1200,
"description": "搜索结果明确排除的域名。"
},
"include_domains": {
"type": "array",
"items": {
"type": "string",
"maxLength": 60
},
"maxItems": 1200,
"description": "搜索结果明确包含的域名。"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}