Keyword density: top keywords and phrases of a text or page
Keyword density of a text or a web page: the most frequent words and two-word phrases (English stop words removed), each with its count and share of all words, plus total and unique word counts. Give text, or a URL whose readable text is used (HTML, up to 1 MB). Use for SEO copy checks, comparing a page against a target keyword, or summarising what a page is about; for readability use text_stats.
Inputs
| Name | Type | Description |
|---|---|---|
text | string | The text (up to 50,000 characters); or give url instead |
url | string | A page URL to analyse instead of text |
top | integer | How many keywords and phrases to return, 1-50 (default 15) |
Request
Over HTTP, with a card key from /credits:
curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/text/keyword-density?text=Agents%20pay%20per%20call.%20Agents%20pay%20with%20USDC.%20Pay%20per%20call%20tools%20for%20agents."
Or one of your 25 free calls, no key:
curl "https://agent-data-tools.revmesh2074.workers.dev/text/keyword-density?text=Agents%20pay%20per%20call.%20Agents%20pay%20with%20USDC.%20Pay%20per%20call%20tools%20for%20agents.&trial=1"
Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum or Solana over x402; Base or Tempo over MPP) and retries.
Example result
{
"source": "text",
"totalWords": 14,
"uniqueWords": 7,
"keywords": [
{
"word": "agents",
"count": 3,
"densityPct": 21.43
},
{
"word": "pay",
"count": 3,
"densityPct": 21.43
}
],
"phrases": [
{
"phrase": "pay per",
"count": 2,
"densityPct": 14.29
}
]
}
From an AI agent (MCP)
Add the MCP server to Claude, Cursor or any MCP client. This tool is text_keyword_density, and the first 25 successful calls are free:
https://agent-data-tools.revmesh2074.workers.dev/mcp