主题
Google Finance Explore 实时 HTML
POST /v3/serp/wp/v2/live/html
本接口用于获取 Google Finance「Explore」标签页的原始 HTML。返回结果会根据请求中指定的 location 和 language 参数而变化,适合需要保留页面原始结构、做自定义解析或审计页面展示的场景。
接口说明
- 请求方式:
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_code | integer | 搜索引擎地区代码。若未提供 location_name,则该字段填;提供后无需再传 location_name。可通过 /v3/serp/google/locations 获取可用地区及代码。示例:2840 |
language_code | string | 搜索引擎语言代码。若未提供 language_name,则该字段填;提供后无需再传 language_name。可通过 /v3/serp/google/languages 获取可用语言及代码。示例:en |
device | string | 设备类型。可选值:desktop |
可选参数
| 字段名 | 类型 | 说明 |
|---|---|---|
location_name | string | 搜索引擎地区名。若未提供 location_code,则该字段填;提供后无需再传 location_code。可通过 /v3/serp/google/locations 获取。示例:London,England,United Kingdom |
language_name | string | 搜索引擎语言名。若未提供 language_code,则该字段填;提供后无需再传 language_code。可通过 /v3/serp/google/languages 获取。示例:English |
os | string | 设备操作系统。可选值:windows |
tag | string | 自定义任务标识。可选,最长 255 个字符。可用于请求与响应结果对;响应中的 data 对象会返回该值。 |
news_type | string | 财经新闻筛选类型。可选值:top_stories、local_market、world_markets。默认值:top_stories |
响应结构
接口返回 JSON 对象 tasks 数组,每个任务对应一次请求结果。
顶层字段
| 字段名 | 类型 | 说明 |
|---|---|---|
version | string | 当前 API 版本 |
status_code | integer | 通用状态码,完整列表见 /v3/appendix/errors |
status_message | string | 通用状态信息,完整列表见 /v3/appendix/errors |
time | string | 执行耗时,单位秒 |
cost | float | 本次任务总费用,单位 USD |
tasks_count | integer | tasks 数组中的任务数量 |
tasks_error | integer | tasks 数组中返回错误的任务数量 |
tasks | array | 任务结果数组 |
tasks[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
id | string | 任务唯一标识,UUID 格式 |
status_code | integer | 任务状态码,范围通常为 10000-60000,完整列表见 /v3/appendix/errors |
status_message | string | 任务状态信息 |
time | string | 任务执行耗时,单位秒 |
cost | float | 当前任务费用,单位 USD |
result_count | integer | result 数组中的数量 |
path | array | URL 路径 |
data | object | 原样回显请求时提交的参数 |
result | array | 结果数组 |
result[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
keyword | string | 请求中的;响应中会对 %## 进行解码,+ 会被解码为空格 |
type | string | 请求中的搜索引擎类型 |
se_domain | string | 请求中的搜索引擎域名 |
location_code | integer | 请求中的地区代码 |
language_code | string | 请求中的语言代码 |
datetime | string | 获取结果的时间,UTC 格式:yyyy-mm-dd hh-mm-ss +00:00 |
items_count | integer | items 数组中的结果数量 |
items | array | SERP 结果项数组 |
items[] 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
page | integer | 返回的 HTML 页序号 |
date | string | HTML 页面抓取时间,格式示例:2019-11-15 12:57:46 +00:00 |
html | string | 原始 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_code、status_message - 任务级别:
tasks[].status_code、tasks[].status_message
状态码与错误信息完整列表可参考容路径:
/v3/appendix/errors
常见处理建议:
- 判断顶层
status_code是否成功; - 再逐个检查
tasks[]中的status_code; - 若存在
tasks_error > 0,应记录失败任务并重试; - 解析
html前,建议校验items_count和items是否存在。
使用说明
- 本接口返回的是 Google Finance Explore 页面的原始 HTML,不会替你解析成结构化字段。
- 结果会随地区、语言、设备参数变化而变化。
- 若你需要精确复现特定展示页面,建议固定使用同一组
location_code、language_code、device与os参数。 - 由于 Live 接口一次只能提交一个任务,批量抓取时建议在业务侧做队列调度与限速控制。
实用场景
- 抓取财经探索页原始结构:保留完整 HTML 供解析器提取板块、卡片、链接与展示顺序,便于构建自定义金融报采集流程。
- 监控不同地区财经差异:按国家或城市切换
location_code,比较 Explore 页展示差异,评估区域化资讯分发策略。 - 校验 SERP 页面变化:定期拉取原始 HTML,对比 DOM 结构变动,及时发现页面改版对采集规则或分析模型的影响。
- 复现特定语言环境结果:结合
language_code与location_code获取目标市场页面,用于多语言 SEO、海外研究和本地化验证。 - 沉淀金融主题特征库:从 HTML 中提取热门新闻模块、市场板块与主题标签,支持舆监控、行业趋势分析和投资研究。