当前位置: 首页 > Skill >

SEO DataForSEO

SEO DataForSEO

1.0.0 2026.11.27 浏览:386
获取Skill文件查看使用说明
作者:陆澄许可证:
本文目录展开

SEO Keyword Research (DataForSEO)

Setup

Install dependencies:

pip install -r scripts/requirements.txt

Configure credentials by creating a .env file in the project root:

DATAFORSEO_LOGIN=your_email@example.com
DATAFORSEO_PASSWORD=your_api_password

Get credentials from: https://app.dataforseo.com/api-access

Quick Start

User says Function to call
"Research keywords for [topic]" keyword_research("topic")
"YouTube keyword data for [idea]" youtube_keyword_research("idea")
"Analyze competitor [domain.com]" competitor_analysis("domain.com")
"What's trending?" trending_topics()
"Keyword analysis for [list]" full_keyword_analysis(["kw1", "kw2"])
"Landing page keywords for [topic]" landing_page_keyword_research(["kw1"], "competitor.com")

Execute functions by importing from scripts/main.py:

import sys
from pathlib import Path
sys.path.insert(0, str(Path("scripts")))
from main import *

result = keyword_research("AI website builders")

Workflow Pattern

Every research task follows three phases:

1. Research

Run API functions. Each function call hits the DataForSEO API and returns structured data.

2. Auto-Save

All results automatically save as timestamped JSON files to results/{category}/. File naming pattern: YYYYMMDD_HHMMSS__operation__keyword__extra_info.json

3. Summarize

After research, read the saved JSON files and create a markdown summary in results/summary/ with data tables, ranked opportunities, and strategic recommendations.

High-Level Functions

These are the primary functions in scripts/main.py. Each orchestrates multiple API calls for a complete research workflow.

Function Purpose What it gathers
keyword_research(keyword) Single keyword deep-dive Overview, suggestions, related keywords, difficulty
youtube_keyword_research(keyword) YouTube content research Overview, suggestions, YouTube SERP rankings, YouTube trends
landing_page_keyword_research(keywords, competitor_domain) Landing page SEO Overview, intent, difficulty, SERP analysis, competitor keywords
full_keyword_analysis(keywords) Strategic content planning Overview, difficulty, intent, keyword ideas, historical volume, Google Trends
competitor_analysis(domain, keywords) Competitor intelligence Domain keywords, Google Ads keywords, competitor domains
trending_topics(location_name) Current trends Currently trending searches

Parameters

All functions accept an optional location_name parameter (default: "United States"). Most functions also have boolean flags to skip specific sub-analyses (e.g., include_suggestions=False).

Individual API Functions

For granular control, import specific functions from the API modules. See references/api-reference.md for the complete list of 25 API functions with parameters, limits, and examples.

Results Storage

Results auto-save to results/ with this structure:

results/
├── keywords_data/    # Search volume, CPC, competition
├── labs/             # Suggestions, difficulty, intent
├── serp/             # Google/YouTube rankings
├── trends/           # Google Trends data
└── summary/          # Human-readable markdown summaries

Managing Results

from core.storage import list_results, load_result, get_latest_result

# List recent results
files = list_results(category="labs", limit=10)

# Load a specific result
data = load_result(files[0])

# Get most recent result for an operation
latest = get_latest_result(category="labs", operation="keyword_suggestions")

Utility Functions

from main import get_recent_results, load_latest

# List recent files across all categories
files = get_recent_results(limit=10)

# Load latest result for a category
data = load_latest("labs", "keyword_suggestions")

Creating Summaries

After running research, create a markdown summary document in results/summary/. Include:

  • Data tables with volumes, CPC, competition, difficulty
  • Ranked lists of opportunities (sorted by volume or opportunity score)
  • SERP analysis showing what currently ranks
  • Recommendations for content strategy, titles, tags

Name the summary file descriptively (e.g., results/summary/ai-tools-keyword-research.md).

Tips

  1. Be specific — "Get keyword suggestions for 'AI website builders'" works better than "research AI stuff"
  2. Request summaries — Always create a summary document after research, named specifically
  3. Batch related keywords — Pass multiple related keywords at once for comparison
  4. Specify the goal — "for a YouTube video" vs "for a landing page" changes which data matters most
  5. Ask for competition analysis — "Show me what videos are ranking" helps identify content gaps

Defaults

  • Location: United States (code 2840)
  • Language: English
  • API Limits: 700 keywords for volume/overview, 1000 for difficulty/intent, 5 for trends, 200 for keyword ideas

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,033
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,031
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,018
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,016
OpenAI的Jalapeno芯片未落地,教你分辨300兆瓦算力消息

OpenAI计划在SB Energy租赁的数据中心部署约300兆瓦自研Jalapeno推理芯片,但目前双方仍处于洽谈阶段,交易细节与上线时间表均未公布。本文带你按报道原文核实项目所处阶段,厘清芯片发布、电力功率与实际推理算力的边界,并将融资意向与签约、开工、投运节点分开追踪,避免误将规划容量计入现有算力。

2026.12.02 1,012
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,012
Skill 文件
  • SKILL.md
    • SEO Keyword Research (DataForSEO)
    • Setup
    • Quick Start
    • Workflow Pattern
      • 1. Research
      • 2. Auto-Save
      • 3. Summarize
    • High-Level Functions
      • Parameters
      • Individual API Functions
    • Results Storage
      • Managing Results
      • Utility Functions
    • Creating Summaries
    • Tips
    • Defaults
  • 项目或源文件

相关 Skill

更多
Diagnose Site SEO Issues with a Structured Audit Diagnose Site SEO Issues with a Structured Audit 运行结构化SEO审计,在您开始猜测流量或排名下降原因之前,识别可爬取性、技术和页面级问题。
Yufluentcn Seo Pro Yufluentcn Seo Pro 进行跨境电商关键词研究,为 Amazon A9/后端、Shopify 元数据与标签以及 TikTok Shop 提供结构化 SEO 布局报告。
gingiris-seo-patrol gingiris-seo-patrol 🇺🇸 SEO Patrol — Daily site health monitor & content decay tracker. Automated SEO monitoring: detect ranking drops, content decay, broken links, indexing issues, and Core Web Vitals regressions. IndexNow auto-push on content updates, competitor rank change alerts, and weekly SEO report generation. Built for SaaS teams without full-time SEO. 🇨🇳 SEO 巡检 — 日常站点健康监控与内容衰退追踪器。自动化 SEO 监控:排名下降检测、内容衰退、死链、索引问题、Core Web Vitals 退化。IndexNow 自动推送、竞品排名变化预警、周度 SEO 报告。 🇯🇵 SEOパトロール — 日次サイト健全性モニター&コンテンツ劣化トラッカー。自動S
seo-content-auditor seo-content-auditor 分析提供的内容的质量、E-E-A-T信号和SEO最佳实践。根据既定标准对内容进行评分并提供改进建议。主动用于内容审核。
Siluzan SEO Siluzan SEO 工业 B2B 海外 SEO **网页结构化 JSON** 生成(非通用写稿):按各子目录 schemas/output.json 输出 引流页矩阵 / Blog SEO 包 / 外链 SEO 包(TDK、模块字段、密度自检等)。 仅当用户明确要 SEO landing page JSON、批量引流页 schema...