API Documentation

Keyword Difficulty (KD) API

Query keyword difficulty and normalized SERP results by keyword.

Test API

Endpoint

GET https://api.goanyapi.com/api/v1/keyword-difficulty

With the current configuration, each successful request costs 3 credits.

Authentication

Authorization: Bearer YOUR_API_KEY

Request Parameters

ParameterTypeRequiredDescription
keywordstringYesTarget keyword, up to 200 characters, e.g. ai
countrystringNoTwo-letter country code. Defaults to us

Example

GET /api/v1/keyword-difficulty?keyword=ai&country=us
Authorization: Bearer YOUR_API_KEY

Response 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

FieldDescription
data.endpointFixed value: keyword-difficulty
data.costCreditsCredits consumed by the request: 3
data.remainingCreditsRemaining credits after deduction
data.keywordNormalized queried keyword
data.countrySearch country included in the result
data.difficultyKeyword Difficulty (KD) score
data.shortageShortage value included in the result
data.lastUpdateData update time
data.sourceData source label
data.serp.resultsNormalized SERP entries
data.serp.results[].typeorganic, 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