查看原始 JSON
{
"type": "object",
"required": [
"queryParams"
],
"properties": {
"queryParams": {
"type": "object",
"required": [
"query"
],
"properties": {
"sort": {
"anyOf": [
{
"enum": [
"RELEVANCE",
"HOT",
"TOP",
"NEW",
"COMMENTS"
],
"type": "string"
},
{
"type": "null"
}
],
"title": "Sort",
"examples": [
"RELEVANCE"
],
"description": "排序方式,仅适用于 post、comment、media:RELEVANCE 为相关性,HOT 为热门,TOP 为最受欢迎,NEW 为最新,COMMENTS 为评论数;COMMENTS 仅适用于 post。"
},
"after": {
"type": "string",
"title": "After",
"maxLength": 4096,
"description": "分页参数。"
},
"query": {
"type": "string",
"title": "Query",
"examples": [
"python programming"
],
"maxLength": 512,
"minLength": 1,
"description": "搜索词。"
},
"language": {
"type": "string",
"title": "Language",
"default": "en-US",
"pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$",
"maxLength": 16,
"minLength": 2,
"description": "返回内容的首选语言,使用 IETF 语言标签;默认为 en-US。"
},
"allow_nsfw": {
"enum": [
"0",
"1"
],
"type": "string",
"title": "Allow Nsfw",
"default": "0",
"examples": [
"0"
],
"description": "是否允许成人或不宜在工作场合查看的内容,可选 0、1。"
},
"time_range": {
"anyOf": [
{
"enum": [
"all",
"year",
"month",
"week",
"day",
"hour"
],
"type": "string"
},
{
"type": "null"
}
],
"title": "Time Range",
"examples": [
"all"
],
"description": "时间范围,仅适用于 post、media:all 为全部时间,year 为近一年,month 为近一个月,week 为近一周,day 为近一天,hour 为近一小时。"
},
"need_format": {
"type": "boolean",
"title": "Need Format",
"default": false,
"description": "是否清洗并格式化返回数据。"
},
"safe_search": {
"enum": [
"unset",
"strict"
],
"type": "string",
"title": "Safe Search",
"default": "unset",
"examples": [
"unset"
],
"description": "安全搜索设置:unset 为未设置,strict 为严格过滤。"
},
"search_type": {
"enum": [
"post",
"community",
"comment",
"media",
"people"
],
"type": "string",
"title": "Search Type",
"default": "post",
"examples": [
"post"
],
"description": "搜索类型:post 为帖子,community 为社区,comment 为评论,media 为媒体,people 为用户。"
}
},
"additionalProperties": true
}
},
"additionalProperties": false
}