PHP code example of jaybizzle / rankinity-api

1. Go to this page and download the library: Download jaybizzle/rankinity-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jaybizzle / rankinity-api example snippets


use Jaybizzle\Rankinity;

$r = new Rankinity('YOUR_API_KEY');

// get all projects
$projects = $r->getProjects();

$projects = $r->sortProperty('name')->getProjects();

$projects = $r->sortProperty('name')->sortAscending('false')->getProjects();

//  list of competitors
$competitors = $r->project('project_id')->getCompetitors();

// list of keywords
$keywords = $r->project('project_id')->getKeywords();

// list of keyword groups
$groups = $r->project('project_id')->getGroups();

// list of ranks
$ranks = $r->project('project_id')->searchEngine('search_engine_id')->getRanks();