getRankingColumn

Returns the ranking spread of a domain (number of keywords for which the URL ranks on Google SERPs 1 – 10).

Route /keywords/getRankingColumn[/:key[/:urlpattern[/:sengine[/:format]]]]
Necessary parameter urlpattern
sengine

Optional parameter format
Return values column
rankings
Cross reference getSearchEngines()
Hint

Parameter

Labeling Description Values margin Default value
urlpattern Contains a qualified domain name. (www.|*)?(A-Z|a-z|0-9)+.(a-z|*)+
sengine Contains a search engine which is crawled by XOVI. see getSearchengines()
format Defines in which format the result will be returned. json|xml json

Return values

Labeling Description Values margin
column Contains a pagenumber. (0-9)+
rankings Sum of keywords ranking on one column (0-9)+

Messages

Message Description
no permission The key has no access to this function.
internal error An internal error occured.
param missing A required parameter is missing.
param invalid The value of a parameter is not valid.
result empty The request was successful, but the result itself is empty.
cost error The current credit amount is not sufficient to handle the request.
0k. The processing was successful.

Exemplary code

<%%KEEPWHITESPACE%%> $root = 'https://suite.xovi.net/api/';
$arrayParams = array(
<%%KEEPWHITESPACE%%> 'service' =&gt;'keywords',
<%%KEEPWHITESPACE%%> 'method' =&gt;'getRankingColumn',
<%%KEEPWHITESPACE%%> 'key' =&gt;'yourPersonalKey',
<%%KEEPWHITESPACE%%> 'urlpattern' =&gt;'www.xovi.de',
<%%KEEPWHITESPACE%%> 'sengine' =&gt; 'google.de',
<%%KEEPWHITESPACE%%> 'format' =&gt; 'json',
<%%KEEPWHITESPACE%%> );
$GETparams = implode('/', $arrayParams);

$requestURL = $root.$GETparams;

if (!function_exists('curl_init')) die('cURL not available');

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_URL, $requestURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Download the given URL, and return output
$output = curl_exec($ch);

// Close the cURL resource, and free system resources
curl_close($ch);

echo $output;
?&gt;

Exemplary results

JSON

{
 "apiErrorCode":"0",
 "apiErrorMessage":"0k.",
 "apiResult":[
              {"column":"1","rankings":"422"},
              {"column":"2","rankings":"210"},
              {"column":"3","rankings":"155"},
              {"column":"4","rankings":"143"},
              {"column":"5","rankings":"105"},
              {"column":"6","rankings":"87"},
              {"column":"7","rankings":"89"},
              {"column":"8","rankings":"85"},
              {"column":"9","rankings":"69"},
              {"column":"10","rankings":"1"},
             ]
}

XML

<?xml version="1.0"?>
<result>
     <apiErrorCode>0</apiErrorCode>
     <apiErrorMessage>0k.</apiErrorMessage>
     <apiResult>
         <rankingcolumns>
             <rankingcolumn>
                 <column>1</column>
                 <rankings>422</rankgins>
             </rankingcolumn>
             <rankingcolumn>
                 <column>2</column>
                 <rankings>210</rankgins>
             </rankingcolumn>
             <rankingcolumn>
                 <column>3</column>
                 <rankings>155</rankgins>
             </rankingcolumn>
             <rankingcolumn>
                 <column>4</column>
                 <rankings>143</rankgins>
             </rankingcolumn>
             <rankingcolumn>
                 <column>5</column>
                 <rankings>105</rankgins>
             </rankingcolumn>
             <rankingcolumn>
                 <column>6</column>
                 <rankings>87</rankgins>
             </rankingcolumn>
             <rankingcolumn>
                 <column>7</column>
                 <rankings>89</rankgins>
             </rankingcolumn>
             <rankingcolumn>
                 <column>8</column>
                 <rankings></rankgins>
             </rankingcolumn>
             <rankingcolumn>
                 <column>9</column>
                 <rankings>69</rankgins>
             </rankingcolumn>
             <rankingcolumn>
                 <column>10</column>
                 <rankings>1</rankgins>
             </rankingcolumn> 
         </rankingcolumns> 
     </apiResult> 
</result>