editKeywords

Changes added monitoring keywords.

Route /monitor/editKeywords[/:key[/:format[/:keyword[/:domain[/:sengineid[/:isRanking[/:posMin[/:posMax [/:posChangeMin[/:posChangeMax[/:resultsmin[/:resultsmax[/:ignoreUSearch[/:url[/:labelid[/:date[/:device]]]]]]]]]]]]]]]]]
Necessary parameters keyword(s)
– or –
domain(s)
Optional parameters format
sengineid(s)
isRanking
posMin
posMax
posChangeMin
posChangeMax
resultsmin
resultsmax
ignoreUSearch
url
date
labelid(s)
device(s)
add_crawldays *
del_crawldays *
set_crawldays *
add_labels *
del_labels *
set_labels *
set_start *
set_usearch *
* = (GET/POST only)
Return values resultCount
Cross references getSearchEngines()
getLabels()
Hints

All parameters can be included in the route, or as GET or POST parameters.

(s): All parameters marked with (s) can be sent either separately or in an array, e.g. “domain” => “*.xovi.de/*” or “domains” => [“*.xovi.de/*”,”*.xovi.com/*”]

resultCount: Contains the amount of edited keywords.

Parameter

Labeling Description Value range Default value
format Sets the returned format. json|xml json
keyword Contains the keyword. string
domain Contains a qualified domain name. (www.)?(A-Z|a-z|0-9)+.(a-z)+ NULL (result independent from domain)
sengineid Contains a distinct identifier for the search engine. see getSearchEngines()
(parameter: id)
NULL (result independent from sengineid)
labelid Contains a distinct identifier for a label assigned to the keyword. see getLabels()
(parameter: hash)
NULL (result independent from labelid if labelid is not set)
labelids Contains one or more distict identifier for a label assigned to the keyword. array of labelids
see getLabels()
(parameter: hash)
NULL (result independent from labelids if labelids is not set)
isRanking Defines whether keywords are shown that rank or do not rank. -1: independent of ranking
1: only ranking
2: only not ranking
-1
posMin Defines the minimum position. int 0
posMax Defines the maximum position. int 120
posChangeMin Defines the minimal change in position. int -120
posChangeMax Defines the maximal change in position. int 120
resultMin Defines the lowest level of search volume. int 0
resultMax Defines the highest level of search volume. int 1000000000000
ignoreUSearch Defines whether Universal Search should be considered in the result set or not. -1: all keywords
1: only where Universal Search is ignored
2: only where Universal Search is considered
-1
url Shows the url a certain domain ranks best with (given a certain keyword and a certain searchengine). http[s]?://(www.)?(A-Z|a-z|0-9)+.(a-z)+
date Sets the filter to a specific date. YYYY-MM-DD
For each keyword the last individual crawl day.
device Sets the filter to a specific device. 1 -> PC
2 -> Tablet
3 -> Smartphone
NULL (Filter turned off)
add_crawldays Adds defined crawl days, if not already added. array of week days: [„mo“, „tu“, „we“, „th“, „fr“, „sa“, „so“] NULL
del_crawldays Removes defined crawl days. array of week days: [„mo“, „tu“, „we“, „th“, „fr“, „sa“, „so“] NULL
set_crawldays Overwrites crawl days for all keywords that have been found. array of week days: [„mo“, „tu“, „we“, „th“, „fr“, „sa“, „so“] NULL
add_labels Adds definded labels, if not already added. array of Label Hash: [„abc“, „def“] NULL
del_labels Removes defined labels.. array of Label Hash: [„abc“, „def“] NULL
set_labels Overwrites labels for all keywords that have beeen found. array of Label Hash: [„abc“, „def“] NULL
set_start Changes the optimization start date. YYYY-MM-DD NULL
set_usearch Changes Universal Search settings. 0: best ranking
1: only organic ranking
3: only Universal Search ranking
NULL

Messages

Message Description
no permission The key has no access to this function.
maximum limit exeeded The maximum limit has been exceeded.
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 = [
    'monitor', // service
    'editKeywords', // method
    'myPersonalKey', // key
    'json', // format
    'NULL', // keyword
    '*.xovi.de/*', // domain
    '1', // sengineid
];
$postParams = [
    'del_crawldays' => ['we'],
    'add_labels' => [
        'abc',
    ],
    'del_labels' => [
        'def',
    ],
    'set_start' => '2021-01-01',
    'set_usearch' => 0,
];

foreach ($arrayParams as &$arrayParam) {
    $arrayParam = rawurlencode($arrayParam);
}
$routeParams = implode('/', $arrayParams);

$requestURL = $root . $routeParams; 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); if (count($postParams)) { curl_setopt($ch, CURLOPT_POST, count($postParams)); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postParams)); } // 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.",
    "apiMeta":{
	"resultCount":2
    },
    "apiResult":{
	"success":true,
	"message":"2 rows found. 0 updated. 4 labels added. 0 labels deleted. ",
	"count":2,
	"updated":0,
	"labels_added":4,
	"labels_deleted":0,
	"updated_settings":2
    }
}

XML

<?xml version="1.0"?>
<result>
<apiMeta>
<resultCount>2</resultCount>
</apiMeta> <apiErrorCode>0</apiErrorCode> <apiErrorMessage>0k.</apiErrorMessage> <apiResult> <monitorkeywordedits> <monitorkeywordedit> <success><success/>
<message>2 rows found. 0 updated. 4 labels added. 0 labels deleted. </message>
<count>2</count>
<updated>0</updated>
<labels_added>4</labels_added>
<labels_deleted>0</labels_deleted>
<updated_settings>2</updated_settings> </monitorkeywordedit> </monitorkeywordedits> </apiResult> </result>