数据提供商: DataForSEO
查询关键词列表的月搜索量及CPC数据(DataForSEO)
$0.09 / 次调用在 30 秒内响应
查询 Google 广告数据,就能获得某一地区、使用某种语言时特定关键词的相关信息:包括每月的搜索量、广告主的竞争程度,以及每次点击的竞价范围。把你已经掌握的关键词提供出来吧。按请求付费,无需订阅套餐。任一关键词含有 Google Ads 不允许的符号(例如表情符号、括号或短破折号 en dash)时,整个请求会被拒绝;每个关键词最多 80 个字符和 10 个单词。language_code必须为DataForSEO提供的Google Ads语言代码列表中的有效代码;任何超出该列表范围的代码都会被系统视为无效字段而予以拒绝(例如,仅输入“zh”这一语言代码也会导致验证失败)。
如何调用
第 1 步接入
首次使用时,将提示词粘贴到 Agent 对话中。Skill 会自动安装 CLI 并完成登录。无法使用 shell 的 Agent 可通过 MCP 接入。
接入
set up https://glasser.ai/SKILL.md
Show me how to use the DataForSEO endpoint /v3/keywords_data/google_ads/search_volume/live on Glasser.bash
glasser run -p dataforseo -e '/v3/keywords_data/google_ads/search_volume/live' -i '{"keywords":["coffee roaster","espresso machine"],"language_code":"en","location_code":2840}' --endpoint-version 2使用接口版本 2。运行前请确认当前价格,并先在开始使用页面安装和登录。
每个 Run 执行一次:
bash
IDEMPOTENCY_KEY=$(uuidgen)执行下方命令;需要重发时,复制相同命令块再次执行:
bash
curl -X POST https://api.glasser.ai/v1/runs \
-H "Authorization: Bearer gl_..." \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"provider":"dataforseo","endpoint":"/v3/keywords_data/google_ads/search_volume/live","input":{"keywords":["coffee roaster","espresso machine"],"language_code":"en","location_code":2840},"endpoint_version":2}'重发时请使用相同的 Idempotency-Key:第二次发送只会读取首个 Run。新的幂等键会创建新的 Run 并产生新的费用。此处使用接口版本 2,运行前请确认当前价格。
第 2 步尝试一个具体任务
为候选关键词排序时,可以比较搜索量指标,了解所选主题的需求。
复制此提示词到你的 Agent,审阅候选关键词的搜索需求。
提示词
Use dataforseo:/v3/keywords_data/google_ads/search_volume/live on Glasser.
Check demand for my keyword shortlist using the search-volume metrics actually returned.接口结构
json
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"keywords"
],
"properties": {
"tag": {
"type": "string"
},
"date_to": {
"type": "string"
},
"sort_by": {
"type": "string"
},
"keywords": {
"type": "array",
"items": {
"type": "string",
"pattern": "^(?:(?!(?:site|inurl|intitle|allintitle|allinurl|filetype|related|cache):).)*$",
"maxLength": 700,
"minLength": 1
},
"maxItems": 100,
"minItems": 1
},
"date_from": {
"type": "string"
},
"language_code": {
"type": "string",
"pattern": "^[a-z]{2}$"
},
"language_name": {
"type": "string"
},
"location_code": {
"type": "integer",
"maximum": 99999999,
"minimum": 1
},
"location_name": {
"type": "string"
},
"search_partners": {
"type": "boolean"
},
"location_coordinate": {
"type": "string"
},
"include_adult_keywords": {
"type": "boolean"
}
},
"additionalProperties": false
}json
{
"keywords": [
"coffee roaster",
"espresso machine"
],
"language_code": "en",
"location_code": 2840
}此接口未发布输出结构。你将收到数据提供商的原始响应正文,我们不会承诺无法保证的输出格式。
计费说明
| 返回数据或无匹配 | 有无匹配数据均按此价格收费。 | $0.09 |
|---|---|---|
| 数据提供商错误 | 数据提供商未能响应。 | $0.00 |
| 运行超时 | 运行超过时间限制。 | $0.00 |
| 内部错误 | 内部错误导致运行未能完成。 | $0.00 |