A simple PHP wrapper for the Rankinity API

v1.0.0 2016-03-02 22:28 UTC

This package is auto-updated.

Last update: 2021-01-06 01:11:00 UTC


Build Status StyleCI Total Downloads


Add "jaybizzle/rankinity-api": "1.*" to your composer.json.


You can read the official Rankinity API documention here - http://my.rankinity.com/api.en

All the Rankinity API endpoints can be called by prefixing the name with get e.g

use Jaybizzle\Rankinity;

$r = new Rankinity('YOUR_API_KEY');

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

Most Rankinity API endpoints can accept query string parameters, such as sort_property to sort the results returned. Taking the above projects example, we can simply do this...

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

These can also be chained...

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

Some more examples...

//  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();

NOTE: Query parameters are listed in the Rankinity API docs as snake_case but we access them using camelCase methods so all method calls have a consistent naming convention