{
  "openapi": "3.0.3",
  "info": {
    "title": "百度搜索",
    "description": "基于百度的搜索能力，专为生成式AI提供全网实时信息检索服务，具备海量内容站点、高权威性，强时效性，提供全新的搜索体验。为生成式AI大语言模型,提供近乎实时的、准确的语料，保证模型输出的内容遵循客观情况。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/3351-1": {
      "x-pointCode": 1,
      "x-mode": "mapping",
      "x-read-timeout": 50,
      "x-connect-timeout": 50,
      "post": {
        "summary": "百度搜索",
        "description": "基于百度的搜索能力，专为生成式AI提供全网实时信息检索服务。如果需要搜索后AI对搜索到的内容进行整理，可以使用“智能搜索生成”功能，该功能需联系客服或商务人员开通。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "remark": {
                              "type": "string",
                              "description": "返回描述"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "成功标志 0:成功 -1:失败"
                            },
                            "references": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "web_anchor": {
                                    "type": "string",
                                    "description": "网站锚文本或网站标题。"
                                  },
                                  "website": {
                                    "type": "string",
                                    "description": "站点名称。"
                                  },
                                  "snippet": {
                                    "type": "string",
                                    "description": "摘要"
                                  },
                                  "title": {
                                    "type": "string",
                                    "description": "标题"
                                  },
                                  "date": {
                                    "type": "string",
                                    "description": "发布时间"
                                  },
                                  "url": {
                                    "type": "string",
                                    "description": "网页地址"
                                  },
                                  "content": {
                                    "type": "string",
                                    "description": "\t网页内容，显示2000字以内的相关信息原文片段"
                                  },
                                  "web_extensions": {
                                    "type": "object",
                                    "properties": {
                                      "images": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "url": {
                                              "type": "string",
                                              "description": "图片链接"
                                            },
                                            "height": {
                                              "type": "string",
                                              "description": "高"
                                            },
                                            "width": {
                                              "type": "string",
                                              "description": "宽"
                                            }
                                          }
                                        },
                                        "description": "图片列表"
                                      },
                                      "author_info": {
                                        "type": "object",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "description": "作者名字"
                                          },
                                          "verified_type": {
                                            "type": "number",
                                            "description": "作者认证类型"
                                          },
                                          "signature": {
                                            "type": "string",
                                            "description": "\t作者签名"
                                          }
                                        },
                                        "description": "作者信息（仅百家号站点存在）"
                                      }
                                    },
                                    "description": "网页相关图片"
                                  },
                                  "authority_score": {
                                    "type": "number",
                                    "description": "网页权威性评分（仅type值为web时存在），取值范围[0,1]，数值越大越权威"
                                  },
                                  "type": {
                                    "type": "string",
                                    "description": "检索资源类型。返回值： web:网页"
                                  },
                                  "icon": {
                                    "type": "string",
                                    "description": "网站图标地址。"
                                  },
                                  "id": {
                                    "type": "number",
                                    "description": "引用编号1、2、3。"
                                  },
                                  "rerank_score": {
                                    "type": "number",
                                    "description": "原文片段相关性评分，取值范围[0,1]，数值越大越相关"
                                  }
                                }
                              },
                              "description": "详情列表"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "3351_1_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "用户的query问题。说明：不能为空,长度限制在72个字符以内(一个汉字占两个字符)，输入过长的内容时，只取前72个字符检索"
                  },
                  "count": {
                    "type": "string",
                    "description": "返回结果的条数。可填范围：10、20、30、40、50，最大单次搜索返回50条，默认为10。"
                  },
                  "search_domain_filter": {
                    "type": "string",
                    "description": "用于限定搜索结果的范围，仅返回指定白名单域名的内容。如：tieba.baidu.com,baike.baidu.com多个以英文「,」隔开，最多100个"
                  },
                  "block_domain_filter": {
                    "type": "string",
                    "description": "不检索该名单的网页结果。支持最多20个站点。如：tieba.baidu.com,baike.baidu.com多个以英文「,」隔开，最多20个"
                  },
                  "search_recency_filter": {
                    "type": "string",
                    "description": "根据网页发布时间进行筛选。枚举值:\nweek:最近7天\nmonth：最近30天\nsemiyear：最近180天\nyear：最近365天"
                  }
                },
                "required": [
                  "query"
                ]
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AppKeyAuth": {
        "type": "apiKey",
        "in": "query",
        "name": "appKey",
        "description": "从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp"
      }
    },
    "schemas": {
      "ShowapiResEnvelope": {
        "type": "object",
        "description": "ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）",
        "properties": {
          "showapi_res_code": {
            "type": "integer",
            "description": "API 返回的状态码"
          },
          "showapi_res_error": {
            "type": "string",
            "description": "API 返回的错误信息"
          },
          "showapi_res_id": {
            "type": "string",
            "description": "API 请求的唯一标识"
          },
          "showapi_fee_num": {
            "type": "integer",
            "description": "API 调用计费次数"
          }
        }
      }
    }
  },
  "security": [
    {
      "AppKeyAuth": []
    }
  ],
  "externalDocs": {
    "url": "https://www.showapi.com/apiGateway/view/3351?tab=book"
  },
  "x-apiCode": "3351",
  "x-is-own": true,
  "x-is-op": true
}