Keyword Density Analyzer avatar

Keyword Density Analyzer

Pricing

Pay per event

Go to Apify Store
Keyword Density Analyzer

Keyword Density Analyzer

This actor fetches web pages and analyzes their keyword density. It extracts the most frequent single words, two-word phrases, and three-word phrases, along with their occurrence count and density percentage. It also identifies keywords from the title tag, meta description, meta keywords,...

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Analyze keyword density and word frequency on web pages. Get top single words, two-word and three-word phrases with density percentages for SEO optimization.

What does Keyword Density Analyzer do?

This actor fetches web pages and analyzes their keyword density. It extracts the most frequent single words, two-word phrases, and three-word phrases, along with their occurrence count and density percentage. It also identifies keywords from the title tag, meta description, meta keywords, and H1 heading.

Understanding keyword density helps you optimize content for search engines without over-stuffing. The actor provides a clear breakdown of word and phrase frequencies across your page, making it easy to see whether your target keywords appear at the right density and whether any unintended terms dominate your content.

Use cases

  • SEO specialist -- check keyword density on landing pages to ensure target keywords are used at optimal frequency without over-optimization
  • Content writer -- analyze draft pages to detect repetitive language patterns and diversify vocabulary
  • Competitor analyst -- examine which keywords competitors emphasize on their top-ranking pages
  • Content strategist -- identify keyword gaps by comparing density across your pages and competitor pages
  • Marketing manager -- verify that campaign landing pages focus on the intended target keywords

Why use Keyword Density Analyzer?

  • Three n-gram levels -- analyzes single words, two-word phrases, and three-word phrases in one run
  • SEO meta extraction -- pulls keywords from title, meta description, meta keywords, and H1 tags
  • Configurable top N -- choose how many top keywords to return per category (5-100)
  • Batch processing -- analyze multiple pages in a single run
  • Structured JSON output -- density percentages, word counts, and keyword lists ready for spreadsheets or dashboards
  • Pay-per-event pricing -- costs just $0.001 per page analyzed

Input parameters

ParameterTypeRequiredDefaultDescription
urlsarrayYes--List of web page URLs to analyze keyword density for. Each page is analyzed independently.
topNintegerNo20Number of top keywords to return per category (single words, 2-word phrases, 3-word phrases). Range: 5-100.

Input example

{
"urls": [
"https://en.wikipedia.org/wiki/Web_scraping",
"https://blog.apify.com"
],
"topN": 20
}

Output example

{
"url": "https://en.wikipedia.org/wiki/Web_scraping",
"title": "Web scraping - Wikipedia",
"metaDescription": "...",
"totalWords": 2850,
"uniqueWords": 945,
"topSingleWords": [
{ "keyword": "scraping", "count": 42, "density": 1.47 },
{ "keyword": "web", "count": 38, "density": 1.33 },
{ "keyword": "data", "count": 25, "density": 0.88 }
],
"topTwoWordPhrases": [
{ "keyword": "web scraping", "count": 28, "density": 0.98 }
],
"topThreeWordPhrases": [
{ "keyword": "web scraping tools", "count": 5, "density": 0.18 }
],
"titleKeywords": ["web", "scraping", "wikipedia"],
"metaKeywords": [],
"h1Keywords": ["web", "scraping"],
"error": null,
"checkedAt": "2026-03-01T12:00:00.000Z"
}

How much does it cost?

EventPriceDescription
Start$0.035One-time per run
URL analyzed$0.001Per page analyzed

Example costs:

  • 10 URLs: $0.035 + (10 x $0.001) = $0.045
  • 100 URLs: $0.035 + (100 x $0.001) = $0.135
  • 1,000 URLs: $0.035 + (1,000 x $0.001) = $1.035

Using the Apify API

You can call Keyword Density Analyzer programmatically from your own applications using the Apify API. The following examples show how to start a run, wait for it to finish, and retrieve the results.

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/keyword-density-analyzer').call({
urls: ['https://en.wikipedia.org/wiki/Web_scraping'],
topN: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/keyword-density-analyzer').call(run_input={
'urls': ['https://en.wikipedia.org/wiki/Web_scraping'],
'topN': 20,
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Integrations

Keyword Density Analyzer works with all major automation and integration platforms available on Apify. Connect it to Make (formerly Integromat) or Zapier to trigger content optimization workflows when keyword density falls outside target ranges. Export results to Google Sheets to build keyword tracking dashboards for your content team. Send Slack notifications when new content is analyzed and keyword targets are not met. Use webhooks to receive instant callbacks when a run completes, or integrate with n8n for advanced automation pipelines. Schedule recurring runs on Apify to track keyword density changes over time as content is updated.

Tips and best practices

  • Target 1-2% density for primary keywords -- most SEO experts recommend keeping primary keyword density between 1% and 2% to avoid over-optimization penalties
  • Use two-word and three-word phrases -- multi-word phrases (n-grams) are often more actionable than single words for SEO optimization
  • Compare against competitors -- run the same analysis on competitor pages ranking for your target keywords to see what density they use
  • Check title and H1 alignment -- verify that your target keywords appear in both the title tag and H1 heading, not just the body text
  • Increase topN for long-form content -- for pages with 3,000+ words, increase topN to 50 or 100 to get a more complete picture of keyword distribution

FAQ

What is keyword density? Keyword density is the percentage of times a keyword appears relative to the total word count on a page. A density of 1.5% means the keyword appears roughly 15 times per 1,000 words.

What density is too high? There is no exact threshold, but keyword density above 3% for a single term may be considered keyword stuffing by search engines. Focus on natural language and user readability rather than hitting a specific number.

Does the actor filter out stop words? The actor analyzes all words on the page. Common stop words (the, and, is, etc.) are typically filtered from the top results since they are not useful for SEO analysis.

What is the difference between single words and phrases? Single words (unigrams) show individual word frequency, while two-word phrases (bigrams) and three-word phrases (trigrams) show multi-word combinations. Multi-word phrases are usually more relevant for SEO because they represent specific topics and long-tail keywords.

Can I analyze pages in languages other than English? Yes. The actor works with any language. It analyzes word frequency based on whitespace-separated tokens, which works for most Latin-script and many other languages. Results are most accurate for languages that use spaces between words.