getRankingValue

Returns the value of a domain calculated from position, searchvolume, CPC and trafficfactor to a certain time.

Route /keywords/getRankingValue[/:key[/:urlpattern[/:sengine[/:format[/:date]]]]]
Necessary parameter urlpattern
sengine
Optional parameter format
date
Return value rankingvalue
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. google.de|google.at|google.ch|
bing.de
date Contains a concrete date in ISO8601 format. Date: YYYY-MM-DD date from the week before
format Defines in which format the result will be returned. json|xml json

Return values

Labeling Description Values margin
domainvalue Shows the value of a domain

Messages

Message Description
no permission The key has no access to this function.
urlpattern not supported The urlpattern is not supported.
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

<?php
$root = 'https://suite.xovi.net/api/';
$arrayParams = array(
<%%KEEPWHITESPACE%%> 'service' =>'keywords',
<%%KEEPWHITESPACE%%> 'method' =>'getRankingValue',
<%%KEEPWHITESPACE%%> 'key' =>'yourPersonalKey',
<%%KEEPWHITESPACE%%> 'urlpattern' =>'www.xovi.de',
<%%KEEPWHITESPACE%%> 'sengine' => 'google.de',
<%%KEEPWHITESPACE%%> 'format' => '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;
?>

Exemplary results

JSON

{
 "apiErrorCode":"0",
 "apiErrorMessage":"0k.",
 "apiResult":[
     { 
         "rankingvalue":"552728.88"
     }]
}

XML

<?xml version="1.0"?>
<result>
    <apiErrorCode>0</apiErrorCode>
    <apiErrorMessage>0k.</apiErrorMessage>
    <apiResult>
        <rankingvalues>
            <rankingvalue>
                <rankingvalue>552728.88</rankingvalue>
            </rankingvalue>
        </rankingvalue>
    </apiResult>
</result>