Skip to Content
Documentation

Check keyword difficulty

Keyword Difficulty API · 500 points per successful call

Product overview and demoAll Ahrefs API endpointsError codes

GET
/v1/ahrefs/keyword-difficulty

Scores how hard it is to rank in the top 10 for a keyword, 0–100, with an estimate of the referring domains a page would need, and the organic results currently holding the top of the SERP. Returns 404 NOT_FOUND for a keyword the source has no data on. meta.as_of is the time the underlying SERP snapshot was taken.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Your API key, sent as a bearer token. In the console on this page you can leave it empty: signed in, calls run on your own plan; otherwise they run on a shared demo key after a quick human check.

Query Parameters

keyword*string

The keyword to analyze.

Length1 <= length <= 200
country?string

Two-letter code of the country whose search results to read.

Match^[A-Za-z]{2}$
Default"us"

Response Body

Successful response

application/json
  1. response
meta*
data*
Example Request
curl -X GET 'https://api.endpointry.com/v1/ahrefs/keyword-difficulty?keyword=keyword+research&country=us'
Example Response
{
  "meta": {
    "request_id": "req_7729f93d3facf68ff83e5c50",
    "as_of": "2026-07-30T16:44:48.000Z",
    "cache": "MISS"
  },
  "data": {
    "keyword": "keyword research",
    "country": "us",
    "difficulty": 92,
    "backlinks_needed": 932,
    "serp": [
      {
        "position": 1,
        "title": "Free Keyword Tool: Find the Right Keywords for SEO & AI",
        "url": "https://www.semrush.com/analytics/keywordmagic/",
        "domain_rating": 92,
        "url_rating": 34,
        "backlinks": 11653,
        "referring_domains": 3776,
        "traffic": 291387,
        "traffic_value": 669737,
        "keywords": 3532,
        "top_keyword": "keyword research",
        "top_keyword_volume": 600000,
        "word_count": 1712
      }
    ]
  }
}