getPages

Returns all subpages of a domain.

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

Return values url
keyword
position
Cross references getSearchEngines()
Hints If the parameter keyword is set, the function returns only sub-pages that contain that keyword. If no keyword is set, all the bases are transferred to the 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

keyword

Labeling Description Values margin Default value
sengine Contains a search engine which is scanned by XOVI. see getSearchEngines()
keyword Contains a particular keyword. (A-Z|a-z|0-9)+
date Contains a concrete date in ISO8601 format.  Date: YYYY-MM-DD date from the week before
limit Defines the amount of the returned results. (max:1000) 0-1000 100
skip Defines the starting row of the result. (0-9)+ 0
 format Defines in which format the result will be returned. json|xml json

RETURN VALUES

Labeling Description Values margin
url Shows the best ranking url.  http[s]?://(www.)?(A-Z|a-z|0-9)+.(a-z)+

MESSAGES

Message Description
maximum limit exeeded The maximum limit is reached.
no permission The key has no permission 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' =>'getPages',
 'key' =>'yourPersonalKey',
 'urlpattern' => 'www.xovi.de',
 'sengine' => 'google.de',
 'format' => 'json',
 'limit' => '2',
 );
$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;
?>
[/php]

EXEMPLARY RESULTS

JSON

{
 "apiErrorCode":"0",
 "apiErrorMessage":"0k.",
 "apiResult":[
           {"URL":"http:\/\/www.xovi.de\/"},
           {"URL":"http:\/\/www.xovi.de\/Backlink-Tool"}]
}

XML

<?xml version="1.0"?>
<result>
     <apiErrorCode>0</apiErrorCode>
     <apiErrorMessage>0k.</apiErrorMessage>
     <apiResult>
          <keywords>
               <keyword>
                    <URL>http://www.xovi.de/</URL>
               </keyword>
               <keyword>
                    <URL>http://www.xovi.de/Backlink-Tool/</URL>
               </keyword>
          </keywords>
      </apiResult>
</result>