Keyword Difficulty (KD) API
Query keyword difficulty and normalized SERP results by keyword.
Endpoint
GET https://api.goanyapi.com/api/v1/keyword-difficultyWith the current configuration, each successful request costs 3 credits.
Authentication
Authorization: Bearer YOUR_API_KEYRequest Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Target keyword, up to 200 characters, e.g. ai |
country | string | No | Two-letter country code. Defaults to us |
Example
GET /api/v1/keyword-difficulty?keyword=ai&country=us
Authorization: Bearer YOUR_API_KEYResponse Example
{
"code": "ok",
"message": "ok",
"data": {
"endpoint": "keyword-difficulty",
"remainingCredits": 97,
"query": {
"keyword": "ai",
"country": "us"
},
"keyword": "ai",
"country": "us",
"difficulty": 95,
"shortage": 1391,
"lastUpdate": "2026-08-09 05:00:20",
"source": "Serps",
"serp": {
"source": "Serps",
"results": [
{
"type": "organic",
"position": 1,
"positionWithMetrics": 1,
"title": "Artificial intelligence",
"url": "https://en.wikipedia.org/wiki/Artificial_intelligence",
"displayUrl": "https://en.wikipedia.org wiki Artificial_intelligence",
"metrics": {
"rank": 15,
"domainRating": 97,
"urlRating": 37,
"traffic": 583603,
"keywords": 946,
"topKeyword": "artificial intelligence",
"topVolume": 740000,
"httpCode": 200
},
"siteLinks": []
},
{
"type": "questions",
"position": 3,
"questions": [
{
"title": "Which AI is free to use?"
}
]
}
]
}
}
}Response Fields
| Field | Description |
|---|---|
data.endpoint | Fixed value: keyword-difficulty |
data.costCredits | Credits consumed by the request: 3 |
data.remainingCredits | Remaining credits after deduction |
data.keyword | Normalized queried keyword |
data.country | Search country included in the result |
data.difficulty | Keyword Difficulty (KD) score |
data.shortage | Shortage value included in the result |
data.lastUpdate | Data update time |
data.source | Data source label |
data.serp.results | Normalized SERP entries |
data.serp.results[].type | organic, ai_overview, questions, or another result type |
Organic entries may include position, title, URL, display URL, site links, and SEO metrics. AI Overview entries may include description and cited links. Question entries contain normalized question titles and optional links.
Internal URL signatures, URL input objects, and tagged values are removed from the public response.
Billing
The current request cost follows the API configuration shown on this page.
- Credits are deducted only after the request succeeds and its business code is
0 - Failed requests do not consume credits