Keyword Density Analysis: Avoiding Over-Optimization

Content SEO

What is Keyword Density?

Keyword density is the percentage of words on a page that are a target keyword or phrase. A page with 1,000 words mentioning "blue widgets" 10 times has a keyword density of 1%.

density = (keyword_count / total_words) × 100

The Goldilocks Problem

Too low: search engines may not recognise the page as relevant to the keyword. Too high: keyword stuffing triggers spam filters and can result in a manual penalty.

There's no universally "correct" density, but a common guideline is 1–3% for primary keywords. Secondary keywords and LSI (Latent Semantic Indexing) terms should appear naturally throughout the content.

API Usage

curl -X POST https://api.toolkitapi.io/v1/seo/keyword-density \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/blue-widgets/", "keywords": ["blue widgets", "widget"]}'
{
  "total_words": 1240,
  "results": [
    {
      "keyword": "blue widgets",
      "count": 14,
      "density": 1.13,
      "in_title": true,
      "in_h1": true,
      "in_meta_description": true
    }
  ]
}

Density vs Prominence

Density measures frequency. Prominence measures location. A keyword in the <title>, first <h1>, and opening paragraph carries more weight than 10 appearances buried in footnotes.

The API reports both:

  • density — percentage of total words
  • placement — title, H1, H2s, meta description, first 100 words

Beyond Single Keywords

Analyse n-grams (2- and 3-word phrases) to identify over-optimised patterns that read unnaturally. Modern search engines are good at detecting text that was written for keyword density rather than for readers.

Try it out

Browse Tools →

More from the Blog