Web Data

Keyword density API

Measure how often words and phrases appear in the visible text of a page. Get the top one, two and three word keywords with density percentages, and check up to 10 target keywords for placement in the title, headings, URL and opening text.

Category Web Data
Endpoints 1
Key Features 4
Frequently asked questions 4

Used by people at these companies

InstantOutseerMongoDBRespondentSage Expense ManagementInstantlyD.R. HortonWhatConvertsAdobeLLM Pulse

Trust signals before you integrate

Transparent docs, authenticated requests, and visible reliability details make it easier to evaluate DomScan before you ship.

Live Service status

Check live service health and documented failure responses before you integrate.

OpenAPI API artifacts

OpenAPI, Swagger, Postman, CLI, SDK, and MCP links are one click away.

API keys Protected access

Authenticated endpoints use API keys with clear credit costs before you call them.

10,000 Free allowance

Start with 10,000 monthly credits and upgrade only when usage grows.

What this API helps you ship

Use this page as a production brief: endpoints, examples, response shape, and the workflow pieces needed to plug DomScan into your own product.

Product workflows

Embed domain checks, DNS intelligence, risk signals, or enrichment into onboarding, search, and internal tools.

Analyst automation

Replace repeated manual lookups with scheduled jobs, alerting, and reproducible investigation steps.

Clean JSON data

Use predictable fields, documented status codes, and credit costs instead of scraping provider pages.

AI and ops tooling

Feed agents, dashboards, SOAR playbooks, and CRMs through OpenAPI, SDK, Postman, or MCP.

Integration workflow

A simple path from first request to repeatable production usage.

1
Authenticate once

Send your API key with the documented header and keep requests consistent across services.

2
Query with examples

Start from the curl and HTTP samples, then map the parameters into your application code.

3
Operate and monitor

Use status codes, credit costs, and response fields to build retries, logs, and alerts.

Developer kit

Jump from this page into machine-readable docs, request collections, SDKs, or agent tooling.

Parameters and response map

Scan the inputs, output fields, and status codes before wiring the endpoint into your client.

Request parameters

Parameter

urlrenderkeywordstopinclude_stopwords
Response fields

Example response

statuslanguagetotal_wordskeywordskeywords.one_wordkeywords.two_wordskeywords.three_wordstargets
Status coverage

HTTP status codes

200400401402429

Endpoints

GET /v1/keyword-density
Credits: 2-6Authentication: Authentication required

Trust signals before you integrate

Transparent docs, authenticated requests, and visible reliability details make it easier to evaluate DomScan before you ship.

Service status API artifacts

OpenAPI, Swagger, Postman, CLI, SDK, and MCP links are one click away.

API keys Protected access

Authenticated endpoints use API keys with clear credit costs before you call them.

Free allowance Sign up for free

Start with 10,000 monthly credits and upgrade only when usage grows.

Active Example request

Start from the curl and HTTP samples, then map the parameters into your application code.

Key Features

Phrases, not just words

One, two and three word keywords are counted separately, and phrases never cross sentence or line breaks.

Language aware

Common function words are removed for English, Spanish, German, French, Portuguese, Italian, Dutch and Swedish pages. Keep them with include_stopwords=true.

Target keyword placement

For each target keyword see its count, density and whether it appears in the title, meta description, H1, any heading, the URL and the first 100 words.

Visible text only

Scripts, styles and the document head are excluded. Set render=true to include text that JavaScript adds after the page loads.

Example request

GET /v1/keyword-density?url=example.com/shoes/trail-runner&keywords=trail+running+shoes bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/keyword-density?url=example.com/shoes/trail-runner&keywords=trail+running+shoes"

Example response

200 OK json
{
  "status": "ok",
  "language": "en",
  "total_words": 122,
  "keywords": {
    "one_word": [{ "keyword": "trail", "count": 5, "density": 4.1 }],
    "two_words": [{ "keyword": "trail running", "count": 5, "density": 4.1 }],
    "three_words": [{ "keyword": "trail running shoes", "count": 4, "density": 3.28 }]
  },
  "targets": [
    { "keyword": "trail running shoes", "count": 4, "in_title": true, "in_h1": true, "in_url": false }
  ]
}

Frequently asked questions

How is density calculated?

Density is the number of times a keyword or phrase appears divided by the total number of words on the page, as a percentage with two decimals.

Is there an ideal keyword density?

No single number works for every page. Use density to spot over-optimised or off-topic pages and to compare pages with competitors, not as a target.

Does it work for Chinese, Japanese or Korean pages?

Text is split on word boundaries, which these languages do not mark with spaces. Results are returned with a caveat that word segmentation is approximate.

How many credits does it cost?

Two credits for raw HTML and six credits with render=true. Results that end in status unknown are refunded.

Related tools and resources

HTTP status codes

These are the HTTP status codes to handle, so you can tell apart successful responses, auth issues, credits, rate limits, missing data, and upstream failures.

OK 200

Request successful

Bad Request 400

Invalid parameters

Unauthorized 401

Missing or invalid API key/session.

Payment Required 402

Not enough credits to run this request.

Too Many Requests 429

Rate limit exceeded