Skip to main content
POST
/
v2
/
search
/
webpages
Webpages Search
curl --request POST \
  --url https://api.reportify.cn/v2/search/webpages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "num": 10,
  "start_datetime": "<string>",
  "end_datetime": "<string>"
}
'
{
  "docs": [
    {
      "doc_id": "<string>",
      "title": "<string>",
      "url": "<string>",
      "summary": "<string>",
      "category": "<string>",
      "published_at": 123,
      "companies": [
        {
          "name": "<string>",
          "logo": "<string>",
          "stocks": [
            {
              "symbol": "<string>",
              "market": "<string>",
              "code": "<string>"
            }
          ]
        }
      ],
      "metadata": {},
      "score": 123
    }
  ],
  "total_count": 0,
  "took_ms": 0
}

网页搜索

URL: /v2/search/webpages
方法: POST
描述: 搜索网页内容。

请求参数

参数名类型必填描述
querystr搜索关键词。
numint返回的结果数量,默认值为 10,最大值为 100
start_datetimestr开始时间,格式为 YYYY-MM-DDYYYY-MM-DD HH:MM:SS
end_datetimestr结束时间,格式为 YYYY-MM-DDYYYY-MM-DD HH:MM:SS

响应参数

参数名类型描述
docsarray搜索结果文档数组,每个文档包含以下字段:
  doc_idstr文档唯一 ID。
  titlestr文档标题。
  summarystr文档摘要。
  categorystr文档类别。
  published_atint发布时间(毫秒级时间戳)。
  companiesarray相关公司列表。
  metadataobject文档元数据。
  scorenumber相关性评分。
  urlstr文档链接。
total_countint匹配文档总数。
took_msint搜索执行时间(毫秒)。

请求示例

cURL
curl -X POST https://api.reportify.cn/v2/search/webpages \
-H "Authorization: Bearer 447460****09c9" \
-H "Content-Type: application/json" \
-d '{
    "query": "人工智能 投资趋势",
    "num": 10,
    "start_datetime": "2024-01-01",
    "end_datetime": "2024-12-31"
}'
Python 示例
import requests

url = "https://api.reportify.cn/v2/search/webpages"
headers = {
    "Authorization": "Bearer 447460****09c9",
    "Content-Type": "application/json"
}
payload = {
    "query": "人工智能 投资趋势",
    "num": 10,
    "start_datetime": "2024-01-01",
    "end_datetime": "2024-12-31"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

响应示例

{
  "docs": [
    {
      "doc_id": "1046915273103380487",
      "title": "2024年人工智能投资趋势分析",
      "summary": "### 内容要点\n- AI 领域投资持续增长\n- 大模型和生成式 AI 成为热点\n...",
      "category": "webpages",
      "published_at": 1730390400000,
      "companies": [],
      "metadata": {
        "report_type": 4,
        "report_status": 2,
        "report_scope": 1,
        "report_language": "zh"
      },
      "score": 0.9412,
      "url": "https://example.com/ai-investment-trends-2024"
    }
  ],
  "total_count": 1,
  "took_ms": 72
}

错误响应

HTTP 状态码描述
422请求参数验证错误

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for webpage search

query
string
required

Search query

num
integer
default:10

Number of results to return

Required range: 1 <= x <= 100
start_datetime
string

Start datetime in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format

end_datetime
string

End datetime in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format

Response

Successful Response

Response model for all search tools

docs
SearchToolsDoc · object[]

Search result documents

total_count
integer
default:0

Total number of matching documents

took_ms
integer
default:0

Search execution time in milliseconds