Keyword Difficulty in DataForSEO API responses is a metric indicating how difficult it is to rank in the top 10 organic results for a keyword. It can take values from 0 to 100, where 0 is easy and 100 is extremely hard.
The metric can be found in the following endpoints:
- Keywords For Site;
- Related keywords;
- Keyword suggestions;
- Ranked keywords;
- Keyword ideas;
- Keywords for categories;
- Domain intersection;
- Page intersection;
- Top Google searches;
- Bulk Keyword Difficulty.
How Keyword Difficulty is calculated
1 To calculate keyword_difficulty
, the API first collects the top 10 websites that rank organically for the keyword on the first page of Google.
2 Then, it calculates the ranking score for the first domain and the score for its page ranking for the keyword. These scores are based on the number of backlinks pointing to the domain and its page. They range from 0 (no backlinks detected) to 1,000 (highest rank).
3 Once it’s done, the domain rank is multiplied by 0.1, and the page rank is multiplied by 0.9. The resulting values are added and then divided by 500.
((domain rank * 0.1) + (page rank * 0.9)) / 500
4 The same calculation is performed for each of the ten domains and their pages.
5 After that, the API sorts domains by rank value in ascending order, calculating both the median and average values.
6 The keyword difficulty score is calculated by using the greater of the two (the median or the average value), subtracting 0.2, and dividing the result by 0.8.
(max(median value, average value) – 0.2) / 0.8
7 The resulting value is multiplied by 100 to convert it to an integer (e.g., 0.6 * 100 = 60). If the value is greater than 1, it’s truncated to 1.
Note that keyword_difficulty
is a country-specific metric. SERPs may vary significantly depending on the location where the search session is initiated. Thus, to receive accurate data for the target country, don’t forget to specify location_code
(or location_name
) and language_code
(or language_name
) when setting a task.
You can receive the complete list of available locations and languages for DataForSEO Labs API by calling the Locations and languages endpoint.
GET https://api.dataforseo.com/v3/dataforseo_labs/locations_and_languages