getStaticOviTrend

Returns the static OVI trend of a domain.

Route /keywords/getStaticOviTrend[/:key[/:urlpattern[/:sengine[/:format[/:limit[/:skip[/:date]]]]]]]
Necessary parameter urlpattern
sengine
Optional parameter format
limit (max:1000)

skip
date
Return values date
staticOvi
Cross references getSearchEngines() – get all available search engines.
Hints sengine – Contains a search engine which is crawled by XOVI.
domain – It’s possible to add a domain or an URL (e.g. Subpage of a domain)
Limit – The maximum limit is 1000. To get more results, please use the parameter skip.
resultCount – Shows the amount of the result without limits. Usefull for pagination.

Parameter

Labeling Description Values margin Default value
urlpattern Contains a qualified domain name or URL. (www.|*)?(A-Z|a-z|0-9)+. (a-z|*)+
sengine Contains a search engine which is crawled by XOVI. see getSearchengines()
limit Defines the amount of the returned results.(max:1000) 0-1000 100
skip Defines the starting page of the result. One page equals the the value of limit. (0-9)+ 0
date Contains a date. YYYY-MM-DD latest crawldate

Return values

Labeling Description Values margin
date Shows the date the OVI got determined. Date: YYYY-MM-DD
staticOvi Contains the static OVI of a domain. (0-9)+.(0-9)+

Messages

Message Description
maximum limit exeeded The maximum limit is reached.
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

<!--?php $root = 'https://suite.xovi.net/api/'; $arrayParams = array(                      'service' =-->'keywords',
<%%KEEPWHITESPACE%%>                     'method'  =&gt;'getStaticOviTrend',
<%%KEEPWHITESPACE%%>                     'key'     =&gt;'myPersonalKey',
<%%KEEPWHITESPACE%%>                     'urlpattern'  =&gt;urlencode(urlencode('*.zalando.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

{
<%%KEEPWHITESPACE%%>    "apiErrorCode":0,
<%%KEEPWHITESPACE%%>    "apiErrorMessage":"0k.",
<%%KEEPWHITESPACE%%>    "apiResult":[
<%%KEEPWHITESPACE%%>        {
<%%KEEPWHITESPACE%%>            "date":"2013-02-11",
<%%KEEPWHITESPACE%%>            "staticOvi":5995.01
<%%KEEPWHITESPACE%%>        },
<%%KEEPWHITESPACE%%>        {
<%%KEEPWHITESPACE%%>            "date":"2013-02-18",
<%%KEEPWHITESPACE%%>            "staticOvi":5859.46
<%%KEEPWHITESPACE%%>        },
<%%KEEPWHITESPACE%%>        {
<%%KEEPWHITESPACE%%>            "date":"2013-02-25",
<%%KEEPWHITESPACE%%>            "staticOvi":5626.82
<%%KEEPWHITESPACE%%>        }]
}

XML

<?xml version="1.0"?>
<result>
    <apiErrorCode>0</apiErrorCode>
    <apiErrorMessage>0k.</apiErrorMessage>
    <apiResult>
        <staticovitrends>
            <staticovitrend>
                <date>2013-02-18</date>
                <staticOvi>97.67</staticOvi>
            </staticovitrend>
            <staticovitrend>
                <date>2013-02-25</date>
                <staticOvi>93.36</staticOvi>
            </staticovitrend>
            <staticovitrend>
                <date>2013-03-04</date>
                <staticOvi>91.98</staticOvi>
            </staticovitrend>
        </staticovitrends>
    </apiResult>
</result>