On April 1st the Rank and Index Checkers price will grow by 2 kop. for a keyword on XS Pricing Plan. But for you the price won't change for now!
We've frozen old prices till June 1st for all accounts, active in 2025.
Follow us on Telegram 📧

Topvisor SDK::Page - Topvisor API

Page is an object with the results of an API call.

Class methods

  • getResult() - returns results of a call, in case of an API error or API server error, returns null
  • getNextOffset() - returns the next offset of the paginated selection, if this is the last page, returns null
  • getTotal() - returns the total count of the selection objects of the paginated selection, if this is the last page, returns null
  • getHeaders() - returns the array with API call response titles
  • getErrors() - returns the array with the errors
  • getMessages() - returns the array with the notes
  • getErrorsString() - returns all API errors in a single string
  • getMessagesString() - returns all API notes in a single string

Example

	<?php
	//..
	$projectId = '%NN%';

	$selectorKeywords = new TVPen($Session, 'get', 'keywords_2', 'keywords');
	$selectorKeywords->setData(['project_id' => $projectId]);
	$selectorKeywords->setLimit(10);

	$page = $selectorKeywords->exec();

	if(is_null($page->getResult())){
		echo $page->getErrorsString();
		return;
	}

	$countResults = count($page->getResult());

	echo "Received keywords: $countResults";
	if($page->getTotal()){
		echo ' из '.$page->getTotal();
	}
	//...