Skip to content

adamkristopher/seo-dfs-cc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataForSEO Keyword Research Toolkit

A Python toolkit for keyword research using the DataForSEO API, designed to work seamlessly with Claude Code.

Features

  • 25+ API functions across Keywords Data, Labs, SERP, and Trends APIs
  • Auto-saves results as timestamped JSON files for easy reference
  • Claude Code integration for AI-assisted keyword research
  • Programmatic access for custom scripts and automation

Quick Start

1. Clone the repository

git clone https://github.com/yourusername/dataforseo-keyword-toolkit.git
cd dataforseo-keyword-toolkit

2. Install dependencies

pip install -r requirements.txt

3. Configure credentials

cp .env.example .env

Edit .env with your DataForSEO credentials (get them from app.dataforseo.com/api-access):

DATAFORSEO_LOGIN=your_email@example.com
DATAFORSEO_PASSWORD=your_api_password

4. Start researching

With Claude Code:

"Research keywords for AI website builders"
"Get YouTube keyword data for my video idea"
"Analyze competitor example.com"

Programmatically:

from main import keyword_research, youtube_keyword_research

# Full keyword analysis
results = keyword_research("AI website builders")

# YouTube-focused research
results = youtube_keyword_research("how to build a website")

Usage with Claude Code

Just describe what you want to research:

Request What it does
"Research keywords for [topic]" Full keyword analysis with suggestions
"Get YouTube keyword data for [video idea]" YouTube-focused research
"Find keyword suggestions for [seed]" Long-tail variations
"Analyze competitor [domain.com]" Competitor keyword intel
"What's trending in [category]" Current trends data

API Reference

High-Level Functions (main.py)

Function Purpose
keyword_research(keyword) Full keyword analysis
youtube_keyword_research(keyword) YouTube-focused research
landing_page_keyword_research(keywords, competitor) SEO optimization
full_keyword_analysis(keywords) Comprehensive analysis
competitor_analysis(domain) Competitor keyword intel
trending_topics() Currently trending searches

Keywords Data API (api/keywords_data.py)

Function Purpose Limit
get_search_volume(keywords) Volume, CPC, competition 700
get_keywords_for_site(domain) Keywords for a domain -
get_keywords_for_keywords(keywords) Keyword expansion 20
get_ad_traffic_by_keywords(keywords) Traffic estimates -

Labs API (api/labs.py)

Function Purpose Limit
get_keyword_overview(keywords) Comprehensive metrics 700
get_keyword_suggestions(keyword) Long-tail variations 1 seed
get_keyword_ideas(keywords) Category expansion 200
get_related_keywords(keyword) "Searches related to" 1 seed
get_bulk_keyword_difficulty(keywords) Difficulty scores 1000
get_historical_search_volume(keywords) Monthly trends 700
get_search_intent(keywords) Intent classification 1000
get_domain_keywords(domain) Domain rankings -
get_competitors(keywords) Find competitors -

SERP API (api/serp.py)

Function Purpose
get_google_serp(keyword) Google organic results
get_youtube_serp(keyword) YouTube video rankings
get_google_maps_serp(keyword) Local results
get_google_news_serp(keyword) News results
get_google_images_serp(keyword) Image results
get_featured_snippet(keyword) Featured snippet data

Trends API (api/trends.py)

Function Purpose
get_trends_explore(keywords) Full trend data
get_youtube_trends(keywords) YouTube trends
get_news_trends(keywords) News trends
get_shopping_trends(keywords) Shopping trends
compare_keyword_trends(keywords) Compare trends
get_trending_now() Currently trending

Project Structure

├── .env.example          # Template for API credentials
├── main.py               # High-level convenience functions
├── requirements.txt      # Python dependencies
├── CLAUDE.md             # Instructions for Claude Code
├── config/
│   └── settings.py       # Configuration and defaults
├── core/
│   ├── client.py         # DataForSEO API client (singleton)
│   └── storage.py        # Auto-save results to JSON
├── api/
│   ├── keywords_data.py  # Search volume, CPC, competition
│   ├── labs.py           # Suggestions, difficulty, intent
│   ├── serp.py           # Google/YouTube rankings
│   └── trends.py         # Google Trends data
└── results/              # Auto-generated output (gitignored)
    ├── keywords_data/
    ├── labs/
    ├── serp/
    ├── trends/
    └── summary/

How Results Are Saved

All API responses are automatically saved as timestamped JSON files:

results/labs/20251204_092522__keyword_suggestions__AI_website_builders__limit_30.json

Each file includes metadata and the full API response for later reference.

Requirements

  • Python 3.8+
  • DataForSEO API account (sign up)

License

MIT License - see LICENSE for details.

About

Scripts to access DataFor SEO APIs with Claude Code prompts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages