← 返回
开发者工具 Key

dataforseo-cli

LLM-friendly keyword research CLI for AI agents. Check search volume, CPC, keyword difficulty, and competition via DataForSEO API. Find related keywords, ana...
面向AI代理的LLM关键词研究CLI工具。通过DataForSEO API查询搜索量、CPC、关键词难度及竞争情况,挖掘相关关键词。
alexgusevski alexgusevski 来源
开发者工具 clawhub v1.0.7 1 版本 99909.2 Key: 需要
★ 2
Stars
📥 1,060
下载
💾 9
安装
1
版本
#latest

概述

Keyword Research with dataforseo-cli

LLM-friendly keyword research CLI. Wraps the DataForSEO API and outputs TSV by default — compact, structured, and optimized for agent context windows.

npm: https://www.npmjs.com/package/dataforseo-cli

GitHub: https://github.com/alexgusevski/dataforseo-cli

Setup

1. Install from npm

npm install -g dataforseo-cli

2. Check credentials

dataforseo-cli status

If credentials are already configured, you're good to go. If not, authenticate:

# With login + password
dataforseo-cli --set-credentials login=YOUR_LOGIN password=YOUR_PASSWORD

# Or with base64 token (from DataForSEO email)
dataforseo-cli --set-credentials base64=YOUR_BASE64_TOKEN

Credentials are stored in ~/.config/dataforseo-cli/config.json. The locations and languages commands work without credentials (local data).

Commands

status — Check credentials

Check if API credentials are configured without making any API calls.

dataforseo-cli status

Exits 0 if configured, exits 1 if not. Shows login username (not password).

volume — Keyword metrics

Get search volume, CPC, keyword difficulty (0–100), competition level, and 12-month search trend.

dataforseo-cli volume <keywords...> [options]

Arguments:

  • — One or more keywords (required). Batch multiple keywords in one call to save API requests.

Options:

  • -l, --location — Location code (default: 2840 = US)
  • --language — Language code (default: en)
  • --json — Output as JSON array
  • --table / --human — Output as human-readable table

Example:

dataforseo-cli volume "seo tools" "keyword research" "backlink checker"

Output (TSV):

keyword	volume	cpc	difficulty	competition	trend
seo tools	12500	2.35	45	HIGH	14800,13900,12500,12100,11800,12000,12500,13000,12800,12500,12200,11900
  • difficulty — 0–100 scale (0-30 easy, 31-60 medium, 61-100 hard)
  • cpc — Cost per click in USD
  • competition — LOW / MEDIUM / HIGH
  • trend — 12 monthly search volumes, newest first

related — Keyword suggestions

Find related keyword ideas from a seed keyword.

dataforseo-cli related <seed> [options]

Arguments:

  • — Seed keyword (required, single keyword)

Options:

  • -l, --location — Location code (default: 2840 = US)
  • --language — Language code (default: en)
  • -n, --limit — Max results (default: 50)
  • --json — Output as JSON array
  • --table / --human — Output as human-readable table

Example:

dataforseo-cli related "ai agents" -n 20

Output (TSV):

keyword	volume	cpc	competition	difficulty
best ai agents	8100	3.10	0.82	52
ai agent framework	2400	1.85	0.65	38

competitor — Domain keyword analysis

See what keywords a domain currently ranks for.

dataforseo-cli competitor <domain> [options]

Arguments:

  • — Target domain (required, e.g. ahrefs.com)

Options:

  • -l, --location — Location code (default: 2840 = US)
  • --language — Language code (default: en)
  • -n, --limit — Max results (default: 50)
  • --json — Output as JSON array
  • --table / --human — Output as human-readable table

Example:

dataforseo-cli competitor semrush.com -n 10

Output (TSV):

keyword	position	volume	cpc	difficulty	url
backlink checker	1	33100	4.50	72	https://ahrefs.com/backlink-checker

locations — Look up location codes

List all available location codes, or filter by name. Works offline — no API credentials needed.

dataforseo-cli locations [search] [--json]

Arguments:

  • [search] — Optional filter by name (e.g. sweden, new york)

Without search — lists all locations:

dataforseo-cli locations

With search — filters by name:

dataforseo-cli locations sweden

Output (TSV):

code	name	country	type
2752	Sweden	SE	Country

languages — Look up language codes

List all available language codes, or filter by name. Works offline — no API credentials needed.

dataforseo-cli languages [search] [--json]

Without search — lists all languages:

dataforseo-cli languages

With search — filters by name:

dataforseo-cli languages swedish

Output (TSV):

name	code
Swedish	sv

Output Formats

All data commands default to TSV (tab-separated values) — the most token-efficient structured format for LLMs.

FlagDescription
-------------------
(default)TSV — fewest tokens, best for agent pipelines
--jsonJSON array — use when you need structured parsing
--table / --humanHuman-readable aligned table — for human review

Caching

Results are cached in ~/.config/dataforseo-cli/cache/ to avoid duplicate API calls and save costs. Same query + location + language = cache hit.

dataforseo-cli --print-cache

Workflow: SEO Article Research

  1. Start with seed keyword: dataforseo-cli volume "your topic"
  2. Expand: dataforseo-cli related "your topic" -n 30
  3. Filter: Pick keywords with volume > 100, difficulty < 60
  4. Check competitors: dataforseo-cli competitor competitor-domain.com -n 20
  5. Write article targeting the best keyword cluster

Tips

  • Batch keywords in volume — DataForSEO charges per API request, not per keyword
  • Default location is USA (2840). Always set --location for local/international SEO
  • Use locations and languages without arguments to see all available options
  • Difficulty scale: 0-30 easy, 31-60 medium, 61-100 hard

版本历史

共 1 个版本

  • v1.0.7 当前
    2026-03-29 06:41 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

humanizer-zh

liuxy951129-cpu
去除文本中的 AI 生成痕迹。适用于编辑或审阅文本,使其听起来更自然、更像人类书写。 基于维基百科的"AI 写作特征"综合指南。检测并修复以下模式:夸大的象征意义、 宣传性语言、以 -ing 结尾的肤浅分析、模糊的归因、破折号过度使用、三段
★ 56 📥 28,262
content-creation

Marketing Mode

thesethrose
{"answer":"营销模式整合23项全能技能,涵盖策略、心理、内容、SEO、转化优化及付费增长。适用于营销策略、文案、SEO、转化优化、付费广告及各类营销战术需求。"}
★ 161 📥 24,944
content-creation

Marketing Skills

jchopard69
{"answer":"获取23个营销模块,包含CRO、SEO、文案、分析、发布、广告及社媒的清单、框架与现成交付物。"}
★ 142 📥 30,321