# Keyword Extractor

> Extract top keywords and keyphrases from text using TF-IDF scoring. Use when agents need to tag content, optimize SEO, build search indexes, or summarize topics. Returns ranked single words and multi-word phrases with frequency counts.

- Skill: `kennyzir/keyword-extractor` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add kennyzir/keyword-extractor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kennyzir/keyword-extractor/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Marketing & Growth
- Author: kennyzir (https://skillmd.com/u/kennyzir)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kennyzir/keyword-extractor

---


# Keyword Extractor

Extract the most important keywords and keyphrases from any text. Uses TF-IDF scoring with stop word removal and bigram detection. No external API needed.

## How It Works

1. Tokenize text, filter stop words and short tokens
2. Calculate term frequency (TF) for each word
3. Detect significant bigrams (2-word phrases appearing 2+ times)
4. Score phrases with 1.5x bonus over single words
5. Return ranked list with scores and counts

## Use Cases

- SEO optimization (find target keywords)
- Content tagging (auto-label articles)
- Search index building (extract index terms)
- Topic summarization (what is this text about?)
- Competitive analysis (keyword gap detection)

## Prerequisites

1. **Sign up at [claw0x.com](https://claw0x.com)**
2. **Create API key** in Dashboard
3. **Set environment variable**: `export CLAW0X_API_KEY="ck_live_..."`

## Pricing

**FREE.** No charge per call.

- Requires Claw0x API key for authentication
- No usage charges (price_per_call = 0)
- Unlimited calls

## Example

**Input**:
```json
{
  "text": "Machine learning models require large datasets for training. Deep learning neural networks have revolutionized machine learning by enabling automatic feature extraction from raw data.",
  "max_keywords": 10
}
```

**Output**:
```json
{
  "keywords": [
    {"term": "machine learning", "score": 8.5, "count": 2, "type": "phrase"},
    {"term": "learning", "score": 5.2, "count": 3, "type": "word"},
    {"term": "deep", "score": 3.1, "count": 1, "type": "word"}
  ],
  "top_words": ["learning", "deep", "training", "data", "neural"],
  "top_phrases": ["machine learning", "deep learning", "neural networks"]
}
```

## Error Codes

| Code | Meaning |
|------|---------|
| 400 | Text too short (<20 chars) or too long (>100K) |
| 401 | Missing or invalid API key |
| 500 | Extraction failed (not billed) |

## About Claw0x

[Claw0x](https://claw0x.com) is the native skills layer for AI agents.

**GitHub**: [github.com/kennyzir/keyword-extractor](https://github.com/kennyzir/keyword-extractor)

