Skip to content

Google Finance Explore 实时 HTML

POST /v3/serp/wp/v2/live/html

本接口用于获取 Google Finance「Explore」标签页的原始 HTML。返回结果会根据请求中指定的 locationlanguage 参数而变化,适合需要保留页面原始结构、做自定义解析或审计页面展示的场景。

接口说明

  • 请求方式:POST
  • 接口地址:https://api.seermartech.cn/v3/serp/wp/v2/live/html

说明:该接口为容平台 API 的路径,/v3/serp/wp/v2/live/html 需按原样使用。

计费说明

该接口按请求计费,每次调用都会产生费用。 参考价约 ¥0.0480 / 次扣费以响应头 X-SeerMarTech-Charge-CNY 为准。

请求格式

  • 请求体为 UTF-8 编码的 JSON
  • POST 请求体格式为 JSON 数组:[{ ... }]
  • 单次 Live SERP 请求支持 1 个任务
  • 频率上限:最多 2000 次 API 调用/分钟

请求参数

主要参数

字段名类型说明
location_codeinteger搜索引擎地区代码。若未提供 location_name,则该字段填;提供后无需再传 location_name。可通过 /v3/serp/google/locations 获取可用地区及代码。示例:2840
language_codestring搜索引擎语言代码。若未提供 language_name,则该字段填;提供后无需再传 language_name。可通过 /v3/serp/google/languages 获取可用语言及代码。示例:en
devicestring设备类型。可选值:desktop

可选参数

字段名类型说明
location_namestring搜索引擎地区名。若未提供 location_code,则该字段填;提供后无需再传 location_code。可通过 /v3/serp/google/locations 获取。示例:London,England,United Kingdom
language_namestring搜索引擎语言名。若未提供 language_code,则该字段填;提供后无需再传 language_code。可通过 /v3/serp/google/languages 获取。示例:English
osstring设备操作系统。可选值:windows
tagstring自定义任务标识。可选,最长 255 个字符。可用于请求与响应结果对;响应中的 data 对象会返回该值。
news_typestring财经新闻筛选类型。可选值:top_storieslocal_marketworld_markets。默认值:top_stories

响应结构

接口返回 JSON 对象 tasks 数组,每个任务对应一次请求结果。

顶层字段

字段名类型说明
versionstring当前 API 版本
status_codeinteger通用状态码,完整列表见 /v3/appendix/errors
status_messagestring通用状态信息,完整列表见 /v3/appendix/errors
timestring执行耗时,单位秒
costfloat本次任务总费用,单位 USD
tasks_countintegertasks 数组中的任务数量
tasks_errorintegertasks 数组中返回错误的任务数量
tasksarray任务结果数组

tasks[] 字段

字段名类型说明
idstring任务唯一标识,UUID 格式
status_codeinteger任务状态码,范围通常为 10000-60000,完整列表见 /v3/appendix/errors
status_messagestring任务状态信息
timestring任务执行耗时,单位秒
costfloat当前任务费用,单位 USD
result_countintegerresult 数组中的数量
patharrayURL 路径
dataobject原样回显请求时提交的参数
resultarray结果数组

result[] 字段

字段名类型说明
keywordstring请求中的;响应中会对 %## 进行解码,+ 会被解码为空格
typestring请求中的搜索引擎类型
se_domainstring请求中的搜索引擎域名
location_codeinteger请求中的地区代码
language_codestring请求中的语言代码
datetimestring获取结果的时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00
items_countintegeritems 数组中的结果数量
itemsarraySERP 结果项数组

items[] 字段

字段名类型说明
pageinteger返回的 HTML 页序号
datestringHTML 页面抓取时间,格式示例:2019-11-15 12:57:46 +00:00
htmlstring原始 HTML 页面

请求示例

cURL

bash
curl --location --request POST "https://api.seermartech.cn/v3/serp/wp/v2/live/html" \
--header "Authorization: Bearer smt_live_YOUR_KEY" \
--header "Content-Type: application/json" \
--data-raw '[
 {
 "language_code": "en",
 "location_code": 2840
 }
]'

Python

python
import requests

url = "https://api.seermartech.cn/v3/serp/wp/v2/live/html"
headers = {
 "Authorization": "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json"
}
data = [
 {
 "language_code": "en",
 "location_code": 2840
 }
]

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

TypeScript

typescript
import axios from "axios";

async function main {
 const response = await axios.post(
 "https://api.seermartech.cn/v3/serp/wp/v2/live/html",
 [
 {
 language_code: "en",
 location_code: 2840,
 },
 ],
 {
 headers: {
 Authorization: "Bearer smt_live_YOUR_KEY",
 "Content-Type": "application/json",
 },
 }
 );

 console.log(response.data);
}

main.catch(console.error);

响应示例

json
{
 "version": "0.1.20200130",
 "status_code": 20000,
 "status_message": "Ok.",
 "time": "7.7543 sec.",
 "cost": 0.003,
 "tasks_count": 1,
 "tasks_error": 0,
 "tasks": [
 {
 "data": {
 "api": "serp",
 "function": "live",
 "se": "wp",
 "se_type": "v2",
 "language_name": "English",
 "location_name": "United States",
 "keyword": "NASDAQ-100",
 "tag": "tag1",
 "device": "desktop",
 "os": "windows"
 },
 "result": [
 {}
 ]
 }
 ]
}

错误处理

建议对接口状态码和任务状态码分别做异常处理,重点以下字段:

  • 顶层:status_codestatus_message
  • 任务级别:tasks[].status_codetasks[].status_message

状态码与错误信息完整列表可参考容路径:

  • /v3/appendix/errors

常见处理建议:

  1. 判断顶层 status_code 是否成功;
  2. 再逐个检查 tasks[] 中的 status_code
  3. 若存在 tasks_error > 0,应记录失败任务并重试;
  4. 解析 html 前,建议校验 items_countitems 是否存在。

使用说明

  • 本接口返回的是 Google Finance Explore 页面的原始 HTML,不会替你解析成结构化字段。
  • 结果会随地区、语言、设备参数变化而变化。
  • 若你需要精确复现特定展示页面,建议固定使用同一组 location_codelanguage_codedeviceos 参数。
  • 由于 Live 接口一次只能提交一个任务,批量抓取时建议在业务侧做队列调度与限速控制。

实用场景

  • 抓取财经探索页原始结构:保留完整 HTML 供解析器提取板块、卡片、链接与展示顺序,便于构建自定义金融报采集流程。
  • 监控不同地区财经差异:按国家或城市切换 location_code,比较 Explore 页展示差异,评估区域化资讯分发策略。
  • 校验 SERP 页面变化:定期拉取原始 HTML,对比 DOM 结构变动,及时发现页面改版对采集规则或分析模型的影响。
  • 复现特定语言环境结果:结合 language_codelocation_code 获取目标市场页面,用于多语言 SEO、海外研究和本地化验证。
  • 沉淀金融主题特征库:从 HTML 中提取热门新闻模块、市场板块与主题标签,支持舆监控、行业趋势分析和投资研究。

统一入口:官网 · LLM API · 控制台