Google
Google 关键词数据
最多 10 个关键词的 Google 月搜索量、CPC、竞争度、排名难度、搜索意图和近两年逐月搜索量。
API 数据样例
直接查看该接口实际使用的请求体和完整响应结构。
{
"keywords": [
"yoga pants",
"yoga pants with pockets",
"flare leggings"
],
"marketplace": "US"
}{
"request_id": "3c1f7a52-9d4e-4b8a-a6f0-5e2d8c7b1a94",
"data": {
"keywords": [
{
"keyword": "flare leggings",
"search_volume": 49500,
"cpc": 1.41,
"competition": 1,
"competition_level": "HIGH",
"low_bid": 0.74,
"high_bid": 5.06,
"keyword_difficulty": 0,
"intent": "transactional",
"trend": {
"monthly": 49,
"quarterly": 49,
"yearly": 0
},
"monthly_searches": [
{
"month": "2026-10",
"search_volume": 60500
},
{
"month": "2026-09",
"search_volume": 40500
},
{
"month": "2026-08",
"search_volume": 40500
}
]
},
{
"keyword": "yoga pants",
"search_volume": 49500,
"cpc": 1.56,
"competition": 1,
"competition_level": "HIGH",
"low_bid": 0.59,
"high_bid": 3.06,
"keyword_difficulty": 4,
"intent": "transactional",
"trend": {
"monthly": 22,
"quarterly": 22,
"yearly": 0
},
"monthly_searches": [
{
"month": "2026-10",
"search_volume": 60500
},
{
"month": "2026-09",
"search_volume": 49500
},
{
"month": "2026-08",
"search_volume": 49500
}
]
},
{
"keyword": "yoga pants with pockets",
"search_volume": 2900,
"cpc": 1.74,
"competition": 1,
"competition_level": "HIGH",
"low_bid": 0.4,
"high_bid": 2.68,
"keyword_difficulty": 0,
"intent": "transactional",
"trend": {
"monthly": 0,
"quarterly": 21,
"yearly": -34
},
"monthly_searches": [
{
"month": "2026-10",
"search_volume": 2900
},
{
"month": "2026-09",
"search_volume": 2900
},
{
"month": "2026-08",
"search_volume": 2400
}
]
}
]
}
}可用状态:已开放
该接口已进入 v1 网关、OpenAPI 和订阅权限目录,每次调用消耗 3 个计费单位,查不到数据(
RESULT_NOT_FOUND)也照常计费。
POST /v1/google/keywords/overview
下方请求和响应字段已与当前公开契约核对。
MCP 调用
| 项目 | 内容 |
|---|---|
| MCP Code | google_keywords_overview |
快速调用
先创建 API 密钥,再将密钥写入服务端环境变量:
export ECOMMERCE_DATA_API_KEY="your_api_key"curl --request POST \
--url https://ecommercedataapi.com/v1/google/keywords/overview \
--header "Content-Type: application/json" \
--header "X-API-Key: ${ECOMMERCE_DATA_API_KEY}" \
--data '{
"keywords": [
"yoga pants",
"yoga pants with pockets",
"flare leggings"
],
"marketplace": "US"
}'使用 AI CLI 接入
复制给 AI CLI
粘贴到 Codex、Claude Code、Gemini CLI 或其他编程智能体中直接完成接入。
请直接在当前代码库中接入 Ecommerce Data API 的「Google 关键词数据」接口,不要只给示例代码。
接口文档:https://ecommercedataapi.com/zh/docs/google/keyword-overview
请求接口:POST https://ecommercedataapi.com/v1/google/keywords/overview
API 密钥环境变量:ECOMMERCE_DATA_API_KEY
请求示例:
{
"keywords": [
"yoga pants",
"yoga pants with pockets",
"flare leggings"
],
"marketplace": "US"
}
请按以下要求执行:
1. 先阅读接口文档,并检查当前项目使用的语言、框架、HTTP 客户端、目录结构和环境变量约定。
2. 优先复用项目现有的 API 客户端和错误处理方式;如果没有,再创建最小可复用的 Ecommerce Data API 客户端与该接口调用封装。
3. 从服务端环境变量 ECOMMERCE_DATA_API_KEY 读取密钥,发送 Content-Type: application/json 和 X-API-Key 请求头。绝不能把真实密钥写入源码、前端代码、日志、测试快照或 Git。
4. 如果环境变量不存在,提示我自行设置 ECOMMERCE_DATA_API_KEY;不要索取、输出或猜测真实密钥,并继续完成不依赖真实请求的代码与测试。
5. 根据接口文档实现请求与响应类型,处理非 2xx 响应、request_id、error.code、error.message 和 429 限流。
6. 添加一个符合当前项目习惯的最小调用示例或测试。如果密钥已配置且当前环境允许外部请求,再执行一次最小真实调用;否则使用 mock 或静态验证。
7. 运行相关格式化、类型检查和测试,最后汇报修改文件、调用方法、验证结果以及仍需我配置的环境变量。还没有 API 密钥?创建 API 密钥
在 Postman 中打开当前请求
下载当前接口的预配置 Collection,再通过 Postman Import 导入。
导入后在 Collection Variables 中填写 apiKey。创建 API 密钥
Node.js 示例
const response = await fetch(
'https://ecommercedataapi.com/v1/google/keywords/overview',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': process.env.ECOMMERCE_DATA_API_KEY,
},
body: JSON.stringify({
keywords: ['yoga pants', 'yoga pants with pockets', 'flare leggings'],
marketplace: 'US',
}),
}
);
const result = await response.json();
if (!response.ok) {
throw new Error(`${result.error?.code}: ${result.error?.message}`);
}
console.log(result.data);Python 示例
import os
import requests
response = requests.post(
"https://ecommercedataapi.com/v1/google/keywords/overview",
headers={
"Content-Type": "application/json",
"X-API-Key": os.environ["ECOMMERCE_DATA_API_KEY"],
},
json={
"keywords": [
"yoga pants",
"yoga pants with pockets",
"flare leggings",
],
"marketplace": "US",
},
timeout=30,
)
response.raise_for_status()
print(response.json()["data"])请求参数
请求体直接发送下表字段,不要再包裹额外对象;未定义字段会被拒绝。
| 字段 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
keywords | 数组 | 是 | 要查询的关键词,1–10 个;没有数据的词不返回。 | ["yoga pants","flare leggings"] |
marketplace | 字符串 | 否 | 国家站点:US, UK, CA, AU, DE, FR, IT, ES, JP, MX, BR, IN,决定 Google 的国家和语言。 可用值(表 1.2):US、JP、UK、DE、FR、IT、ES、CA、IN、MX、BR、AU、AE | US |
返回结构
| 字段 | 类型 | 说明 |
|---|---|---|
request_id | 字符串 | 本次请求的唯一标识。 |
data | 对象 | 接口业务数据。 |
下表字段位于 data 内。数组接口描述的是单个数组元素,分页接口描述的是 items[] 中的单条记录。
返回字段
| 字段 | 类型 | 说明 | 示例 |
|---|---|---|---|
keywords.keyword | 字符串 | 关键词 | - |
keywords.search_volume | 整数 | Google 月均搜索量 | 49500 |
keywords.cpc | 数字 | 平均单次点击费用(美元) | 1.41 |
keywords.competition | 数字 | 广告竞争度,0(无)到 1(最高) | - |
keywords.competition_level | 字符串 | 竞争等级:LOW、MEDIUM、HIGH | HIGH |
keywords.low_bid | 数字 | 首页广告出价下限(美元) | - |
keywords.high_bid | 数字 | 首页广告出价上限(美元) | - |
keywords.keyword_difficulty | 整数 | 自然排名难度,0–100 | - |
keywords.intent | 字符串 | 主要搜索意图:transactional 交易、commercial 商业调研、informational 信息、navigational 导航 | transactional |
keywords.trend.monthly | 整数 | 近 1 个月搜索量变化(%) | - |
keywords.trend.quarterly | 整数 | 近 1 个季度变化(%) | - |
keywords.trend.yearly | 整数 | 近 1 年变化(%) | - |
keywords.monthly_searches.month | 字符串 | 月份,YYYY-MM | 2026-10 |
keywords.monthly_searches.search_volume | 整数 | 当月搜索量 | - |
返回示例
{
"request_id": "3c1f7a52-9d4e-4b8a-a6f0-5e2d8c7b1a94",
"data": {
"keywords": [
{
"keyword": "flare leggings",
"search_volume": 49500,
"cpc": 1.41,
"competition": 1,
"competition_level": "HIGH",
"low_bid": 0.74,
"high_bid": 5.06,
"keyword_difficulty": 0,
"intent": "transactional",
"trend": {
"monthly": 49,
"quarterly": 49,
"yearly": 0
},
"monthly_searches": [
{
"month": "2026-10",
"search_volume": 60500
},
{
"month": "2026-09",
"search_volume": 40500
},
{
"month": "2026-08",
"search_volume": 40500
}
]
},
{
"keyword": "yoga pants",
"search_volume": 49500,
"cpc": 1.56,
"competition": 1,
"competition_level": "HIGH",
"low_bid": 0.59,
"high_bid": 3.06,
"keyword_difficulty": 4,
"intent": "transactional",
"trend": {
"monthly": 22,
"quarterly": 22,
"yearly": 0
},
"monthly_searches": [
{
"month": "2026-10",
"search_volume": 60500
},
{
"month": "2026-09",
"search_volume": 49500
},
{
"month": "2026-08",
"search_volume": 49500
}
]
},
{
"keyword": "yoga pants with pockets",
"search_volume": 2900,
"cpc": 1.74,
"competition": 1,
"competition_level": "HIGH",
"low_bid": 0.4,
"high_bid": 2.68,
"keyword_difficulty": 0,
"intent": "transactional",
"trend": {
"monthly": 0,
"quarterly": 21,
"yearly": -34
},
"monthly_searches": [
{
"month": "2026-10",
"search_volume": 2900
},
{
"month": "2026-09",
"search_volume": 2900
},
{
"month": "2026-08",
"search_volume": 2400
}
]
}
]
}
}错误响应、请求追踪和限流头说明见错误与限流。