getLostKeywords

Returns the lost keywords of a domain compared to the week before.

Necessary parameter /keywords/getLostKeywords[/:key[/:urlpattern[/:sengine[/:format[/:limit[/:skip]]]]]]
Necessary parameter urlpattern
sengine
Optional parameter format
limit (max:1000)
skip
Return values keyword
position
Cross references getSearchEngines()
Hints 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

keyword

Labeling Description Values margin Default value
sengine Contains a unique identifier for the returned search engine. see getSearchengines()
urlpattern The observed domain. (www.|*)?(A-Z|a-z|0-9)+.(a-z|*)+
 format Defines in which format the result will be returned. json|xml json
 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

RETURN VALUES

Labeling Description Values margin
keyword  Chosen keyword for the daily monitoring.  (A-Z|a-z|0-9)+
position  Contains the best position of a keyword in a certain period of time.  (0-9)+

MESSAGES

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

$root = 'https://suite.xovi.net/api/';
$arrayParams = array(
     'service' =>'keywords',
     'method' =>'getLostKeywords',
     'key' =>'yourPersonalKey',
     'urlpattern' =>'www.xovi.de',
     'sengine' => 'google.de',
 );
$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":[
              {"keyword":"1000 backlinks",
               "position":"43"},
              {"keyword":"affiliate netzwerke vergleich",
               "position":"42"},
              {"keyword":"affiliate partnerprogramm",
               "position":"73"
              }]
 }

XML

<?xml version="1.0"?>
<result>
     <apiErrorCode>0</apiErrorCode>
     <apiErrorMessage>0k.</apiErrorMessage>
     <apiResult>
          <lostkeywords>
               <lostkeyword>
                    <keyword>1000 backlinks</keyword>
                    <position>43</position>
               </lostkeyword>
               <lostkeyword>
                    <keyword>affiliate netzwerke vergleich</keyword>
                    <position>42</position>
               </lostkeyword>
               <lostkeyword>
                    <keyword>affiliate partnerprogramm</keyword>
                    <position>73</position>
               </lostkeyword>
           </lostkeywords>
      </apiResult>
</result>