getSearchEngines

Returns all daily or weekly crawled search engines. (Also contains relevant data for other operations.)

Route /keywords/getSearchEngines[/:key[/:format[/:limit[/:skip[/:interval]]]]]
Necessary parameter
Optional parameter format
limit (max:1000)
skip
interval

Return values id
name
location
Cross references
Hints Limit: Das maximale Limit ist 1000. Um mehr Ergebnisse zu erhalten, benutzen Sie den Parameter Skip.

Parameters

Labeling Description Values margin Default value
interval Defines whether the daily or weekly crawled searchengines are demanded. daily|weekly weekly
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
id Id – Contains a unique identifier for the returned search engine. (0-9)+
name Contains the name of the search engine. (a-z)+.(a-z)+
location Contains the location of the specific search engine. (a-zA-Z)+

Messages

Message Description
maximum limit exeeded The maximum limit is reached.
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',
 'method' =>'getSearchEngines',
 'key' =>'myPersonalKey',
 );
$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":[
      {
       "id":"1",
       "name":"google.de",
       "location":"Germany"
      },
      {
       "id":"2",
       "name":"google.at",
       "location":"Austria"
      },
      {
       "id":"28",
       "name":"google.ch",
       "location":"Switzerland"
      },
     {
       "id":"51",
       "name":"bing.de",
       "location":"Germany"
     }]
 }
 

XML

<?xml version="1.0"?>
<result>
    <apiErrorCode>0</apiErrorCode>
    <apiErrorMessage>0k.</apiErrorMessage>
    <apiResult>
        <searchengines>
            <searchengine>
                <id>1</id>
                <name>google.de</name>
                <location>Germany</location>
            </searchengine>
            <searchengine>
                <id>2</id>
                <name>google.at</name>
                <location>Austria</location>
            </searchengine>
            <searchengine>
                <id>28</id>
                <name>google.ch</name>
                <location>Switzerland</location>
            </searchengine>
            <searchengine>
                <id>51</id>
                <name>bing.de</name>
                <location>Germany</location>
            </searchengine>
        </searchengines>
    </apiResult>
</result>