npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

serp-research-cli

v0.1.0

Published

Google検索の上位タイトルをDataForSEO API経由で収集するCLIツール

Downloads

143

Readme

serp-research-cli

Analyze and compare Google SERP (Search Engine Results Page) titles to reveal search intent and market positioning differences.

What is this?

serp-research-cli collects Google's top 10 organic search results and analyzes their titles using morphological analysis and structural pattern detection. It's useful for:

  • Understanding what titles actually appear on Google (not HTML <title> tags, but SERP display text)
  • Finding patterns in successful title formats for your market
  • Comparing multiple keywords to discover how search intent differs

Features

  • Single Keyword Analysis: Detailed title structure analysis (patterns, keywords, symbols)
  • Multi-Keyword Comparison: Compare multiple SERPs side-by-side to find differences
  • Morphological Analysis: Extract frequent nouns and co-occurring keywords from titles
  • Pattern Detection: Identify 6 structural patterns (method-type, procedure-type, definition-type, numbers, years, questions)
  • Symbol Usage: Visualize which symbols are common in top results
  • Mock Mode: Test without a DataForSEO API account

Installation

npm install -g serp-research-cli

Quick Start (3 minutes)

1. Run with mock data (no setup needed)

serp analyze "Python 入門" --mock
serp compare "ChatGPT 活用法" "Gemini 活用法" --mock

2. Using real SERP data

To use actual Google search data:

  1. Create a DataForSEO account at dataforseo.com
  2. Create a .env file in your project:
    DATAFORSEO_LOGIN=your_login
    DATAFORSEO_PASSWORD=your_password
  3. Run commands without --mock:
    serp analyze "Python 入門"
    serp compare "ChatGPT 活用法" "Gemini 活用法" "Claude 活用法"

Examples

Single Keyword Analysis

serp analyze "Python 入門"

Outputs:

  • Console display of top 10 titles and analysis
  • JSON file: output/json/20260728-1234567_Python_入門.json
  • Markdown file: output/markdown/20260728-1234567_Python_入門.md

Multi-Keyword Comparison

serp compare "ChatGPT 活用法" "Gemini 活用法" "Claude 活用法"

Shows side-by-side analysis of:

  • Common Keywords: Keywords appearing across multiple SERPs
  • Keyword Differences: Keywords unique to each SERP
  • Pattern Comparison: How title patterns differ
  • Comparison Summary: Factual differences at a glance

Configuration

Environment Variables

Create a .env file in your working directory:

DATAFORSEO_LOGIN=your_login_here
DATAFORSEO_PASSWORD=your_password_here

To get credentials:

  1. Sign up at dataforseo.com
  2. Go to Dashboard → API Credentials
  3. Copy your login and password

Output Directories

Results are saved in:

  • API results: output/json/ and output/markdown/
  • Mock results: test/output/json/ and test/output/markdown/

Files are timestamped in JST (UTC+9) and named after sanitized keywords.

Documentation

Commands Reference

# Single keyword analysis
serp analyze "<keyword>"
serp analyze "<keyword>" --mock          # with mock data

# Multi-keyword comparison
serp compare "<keyword1>" "<keyword2>" [<keyword3>...]
serp compare "<keyword1>" "<keyword2>" --mock

# Development
npm run typecheck                         # TypeScript check
npm test                                  # Run tests
npm run build                             # Build dist/
npm run clean:test                        # Clear test/output/
npm run clean:output                      # Clear output/

Philosophy

This tool observes and structures search results without interpretation. It:

  • ✅ Collects data objectively
  • ✅ Detects structural patterns
  • ✅ Presents facts clearly
  • ✅ Lets you make decisions

It does NOT:

  • ❌ Generate title suggestions
  • ❌ Score titles or patterns
  • ❌ Fetch article text
  • ❌ Make recommendations

Use the output as input to AI systems if you need higher-level analysis.

Requirements

  • Node.js: 20 or later
  • DataForSEO Account: For real data (optional, mock mode works without)
  • npm: For installation

License

MIT License - see LICENSE file for details

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.


Note: This tool analyzes SERP display text as shown to users, which may differ from HTML <title> tags. This is intentional and reflects real search results.