Skip to content

LunarDevelopment/MajesticAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Majestic API

A package to allow communication with Majestic.com API, through production or sandbox environments.

Prerequisits

Installation

Via composer

composer require lunardevelopment/majestic

Via ZIP

Download this ZIP and manually include

require_once 'theUnzippedDirectory/src/Majestic.php'

Usage

See in depth commands and parameters at Majestic.com API Commands

GetIndexItemInfo

 use LunarDevelopment\Majestic; $majestic_api_key = "YOUR_API_KEY"; $domain = "example.com"; $service = new Majestic($majestic_api_key, false); $params = array( 'datasource'=>'fresh', 'item0' => $domain , 'items' => 1 ); $response = $service->executeCommand('GetIndexItemInfo', $params); $majestic_json_data = json_encode(json_decode($response->getBody())->DataTables->Results->Data[0]); dd($majestic_json_data); 

GetBackLinkData

 use LunarDevelopment\Majestic; $majestic_api_key = "YOUR_API_KEY"; $domain = "example.com"; $service = new Majestic($majestic_api_key, false); $params = array( 'item' => $domain, 'datasource' => 'fresh', 'Count' => 1000, 'Mode' => 1, 'ShowDomainInfo' => 1, 'MaxSourceURLsPerRefDomain' => 1, 'MaxSameSourceURLs' => 1, 'FilterTopicsRefDomainsMode' => 1 ); $response = $service->executeCommand('GetBackLinkData', $params); $backlinks = json_decode($response->getBody())->DataTables->BackLinks->Data; dd($backlinks); 

About

Package to communicate with Majestic.com Live and Sandbox URLs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages