SeerMarTech 文档控制台

历史关键词与 SERP

POST/v3/dataforseo_labs/google/historical_keyword_data/live
参考价:¥0.3200 / 次(实际以请求返回为准)

另含 historical_rank_overview、historical_serps。

请求体

参数类型必填说明
keywordsarray关键词
location_codeinteger地区

请求示例

curl

curl -X POST "https://api.seermartech.cn/v3/dataforseo_labs/google/historical_keyword_data/live" \ -H "Authorization: Bearer smt_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '[{"keywords":["seo"],"location_code":2840}]'

Python

import requests resp = requests.post( "https://api.seermartech.cn/v3/dataforseo_labs/google/historical_keyword_data/live", headers={"Authorization": "Bearer smt_live_YOUR_KEY"}, json=[{"keywords":["seo"],"location_code":2840}], timeout=120, ) print(resp.json()["tasks"][0]["result"])

TypeScript

const resp = await fetch("https://api.seermartech.cn/v3/dataforseo_labs/google/historical_keyword_data/live", { method: "POST", headers: { Authorization: "Bearer smt_live_YOUR_KEY", "Content-Type": "application/json" }, body: JSON.stringify([{"keywords":["seo"],"location_code":2840}]), }); console.log((await resp.json()).tasks[0].result);

业务场景

相关文档