Bulk Keyword difficulty API
Price: 12 credits per request
Description: Quickly discover how hard it is to rank in search for a specific keyword with the keyword difficulty API. Post up to a 1000 keywords to this API endpoint and receive real-time results.
Query string parameters
Name | Parameter | Description |
---|---|---|
Keyword | &keyword= |
The keyword or phrase is used by the the algorithm to calculate the keyword difficulty score. example: seo tools |
Language | &hl= |
The language that is used as input to analyze the relevant Google search results (full list of the available languages) example: English |
Location | &location= |
The geographical location that is used as input to analyze the relevant Google search results example: United States |
API key | &key= | Your private API key |
Response elements
Name | Description |
---|---|
keyword | Input keyword |
keyword difficulty | The keyword difficulty score (on a 0 – 100 scale) |
Tool: Keyword Difficulty checker (API powered)
More information: discover more about this API
PHP code example
<?php
/*
API documentation for SEO Review Tools.
API info: https://www.seoreviewtools.com/seo-api/
API documentation: https://api.seoreviewtools.com/documentation/
LinkedIn: https://www.linkedin.com/company/seo-review-tools
*/
function curlFunction ($toolRequestUrl, $curlData){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $toolRequestUrl);
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlData);
$html = curl_exec($ch);
$curlInfo = curl_getinfo($ch);
return($html);
}
// API key
$apiKey = 'YOUR-API-KEY';
// Location
$location = "United States";
// Language
$language = "English";
// input keywords
$data = json_encode(['keywords' => ['SEO', 'search', 'Google']]);
$toolRequestUrl = 'https://api.seoreviewtools.com/bulk-keyword-difficulty/?location='.urlencode($location).'&hl='.urlencode($language).'&key='.$apiKey;
// get data from API
$dataJson = curlFunction($toolRequestUrl, $data);
// convert JSON to PHP array
$dataArray = json_decode($dataJson, true);
// check if API call is success or failed
// (just some basic validation)
// API call fail
if ($dataArray['status'] !== 'ok'){
// return error message
echo 'Error message: '.$dataArray['error message'];
// API call success
} else {
print_r($dataArray['data']['data']);
}
?>