Cluster keywords by SERP similarity, detect search intent, and track rankings — all programmatically.Documentation Index
Fetch the complete documentation index at: https://docs.keywordinsights.ai/llms.txt
Use this file to discover all available pages before exploring further.
Full endpoint reference available on Swagger.
Quick Start
Create a clustering order with the minimum required parameters:Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/keywords-insights/order/ | Create a clustering order |
| GET | /api/keywords-insights/order/?order_id={id} | Check order status |
| GET | /api/keywords-insights/order/json/{order_id}/ | Get results as JSON (paginated) |
| GET | /api/keywords-insights/order/xlsx/{order_id}/ | Export results as XLSX |
| GET | /api/keywords-insights/orders/?n_orders={n} | List recent orders |
| GET | /api/keywords-insights/order/cost/?n_keywords={n}&insights=cluster | Estimate cost |
| GET | /api/keywords-insights/languages/ | Supported languages |
| GET | /api/keywords-insights/locations/ | Supported locations |
Parameters
Required
| Parameter | Type | Description |
|---|---|---|
project_name | string | Name shown in the dashboard |
keywords | string[] | List of keywords to cluster (min 5, max 200,000) |
search_volumes | number[] | Search volume per keyword (same length as keywords) |
language | string | Language code (e.g. en). See /api/keywords-insights/languages/ |
location | string | Location name (e.g. United States). See /api/keywords-insights/locations/ |
insights | string[] | Insight types: cluster, context, rank |
folder_id | string | Dashboard folder ID to save the project into. Retrieve from the browser URL in the KWI dashboard |
Optional
| Parameter | Type | Default | Description |
|---|---|---|---|
clustering_method | string | volume | volume or agglomerative |
grouping_accuracy | integer | 4 | SERP overlap threshold (1–7). Higher = stricter clusters |
hub_creation_method | string | medium | Topical cluster similarity: soft, medium, hard |
device | string | desktop | SERP device: desktop, mobile, tablet |
mobile_type | string | — | iphone or android (when device is mobile) |
tablet_type | string | — | ipad or android (when device is tablet) |
url | string | — | Domain URL for ranking. Required when rank is in insights |
Insight Types
Theinsights array controls what analysis runs:
cluster— Groups keywords by SERP similarity. Required for all clustering orders.context— Detects search intent (informational, commercial, transactional, navigational).rank— Tracks your domain’s ranking for each keyword. Requires theurlparameter.
Customizations
Clustering Method
volume(default) — Groups keywords based on shared SERP URLs. Controlled bygrouping_accuracy(1 = loose, 7 = strict). Best for most use cases.agglomerative— Uses hierarchical clustering for larger keyword sets. Better for discovering broader topic relationships.
Topical Clusters
Thehub_creation_method controls how tightly related keywords must be to form a topical cluster:
soft— Broad grouping, more keywords per topical clustermedium— Balanced (recommended)hard— Strict grouping, fewer but more focused clusters
Checking Order Status
Orders process asynchronously. Poll the status endpoint untilstatus is "done":
Retrieving Results as JSON
Get paginated cluster data:| Parameter | Type | Default | Description |
|---|---|---|---|
page_size | integer | 50 | Results per page (max 1,000) |
page_number | integer | 1 | Page number |
sort_by | string | search_volume | Sort field (e.g. search_volume, keyword, cluster_id) |
ascending | boolean | false | Sort direction |
filter_id | string | — | Filter ID from the filters endpoint |
Exporting as XLSX
Download results as an Excel file:Estimating Cost
Check how many credits an order will cost before creating it:| Insights | Cost per keyword |
|---|---|
cluster only | 1 credit |
cluster + context | 2 credits |
cluster + rank | 2 credits |
cluster + context + rank | 3 credits |