yanglei1826877278

关键词研究

基于种子关键词生成关键词创意,包含搜索量、难度和趋势数据

yanglei1826877278 0 Updated 3mo ago

Resources

2
GitHub

Install

npx skillscat add yanglei1826877278/myskills/skills-seo-keywords

Install via the SkillsCat registry.

SKILL.md

关键词研究

前置条件

~/.seo-skills/config.json 中配置 CapSolver API Key:

{
  "CAPSOLVER_API_KEY": "CAP-你的API密钥"
}

需要安装 Python 依赖:requests

使用方法

运行脚本(脚本位于本 skill 目录的 scripts/ 下):

python scripts/run.py --keyword <关键词> [--country <国家代码>] [--search-engine <搜索引擎>]

参数说明

参数 必填 默认值 说明 示例
--keyword - 种子关键词 "seo tools"
--country us 国家代码 cnukde
--search-engine Google 搜索引擎 Google

使用示例

# 在美国市场搜索 "python tutorial" 的关键词创意
python scripts/run.py --keyword "python tutorial"

# 在中国市场搜索
python scripts/run.py --keyword "python教程" --country cn

# 指定搜索引擎
python scripts/run.py --keyword "seo tools" --country us --search-engine Google

输出格式

脚本以 JSON 格式输出到 stdout,返回一个数组:

[
  {
    "type": "keyword_idea",
    "keyword": "python tutorial for beginners",
    "country": "us",
    "difficulty": "Medium",
    "volume": "10K-100K",
    "updatedAt": "2024-01-15"
  },
  {
    "type": "question_idea",
    "keyword": "how to learn python",
    "country": "us",
    "difficulty": "Easy",
    "volume": "1K-10K",
    "updatedAt": "2024-01-15"
  }
]

字段说明

  • type:关键词类型,keyword_idea(常规关键词)或 question_idea(问题类关键词)
  • keyword:关键词文本
  • country:国家代码
  • difficulty:难度等级(Easy / Medium / Hard / Super Hard)
  • volume:月搜索量范围
  • updatedAt:数据最后更新时间

错误处理

  • 错误信息以 JSON 格式输出到 stderr:{"error": "错误描述"}
  • 脚本返回退出码 1 表示失败
  • 常见错误:未配置 API Key、验证码解决失败、API 请求失败

注意事项

  • 同时返回常规关键词和问题类关键词
  • 每次请求都需要获取新的验证码 Token,会消耗 CapSolver 余额
  • 常用国家代码:usukcaaudefresitjpcn