Competitor Analysis API



Price: 3 credits per request


Description: Find competitors in search, based on keywords that a domain ranks for in the organic and paid Google results. The API will return the top 15 competitors for a specific domain including monthly traffic statistics. The results are ordered based on “keywords in common” count.  

Query string parameters

Name Parameter Description
URL &url=

The domain you want to analyse (add the domain name without parameters, schema, path and www)

example: domain.com

Language &hl=

The language (required) → full list

example: English

Location &location=

The geographical location (required) → full list

example: United States

API key &key= Your private API key

Response elements

Name Description
target The input domain
competitor The competitor domain
keywords in common The number of keywords that the input domain and the competitor both rank for in Google search
organic Monthly organic traffic estimate
paid Monthly paid traffic estimate
paid traffic cost Monthly paid traffic cost estimate

Additional information

These domains are excluded from the results to only show highly relevant competitors: ‘wikipedia.org’, ‘pinterest.com’, ‘amazon.com’, ‘google.com’, ‘facebook.com’, ‘wordpress.com’, ‘medium.com’, ‘quora.com’, ‘reddit.com’, ‘youtube.com’, ‘ebay.com’, ‘instagram.com’, ‘twitter.com’, ‘linkedin.com’


PHP code example

 <?php

/*
    API documentation for SEO Review Tools.
    API info: https://www.seoreviewtools.com/seo-api/
    API documentation: https://api.seoreviewtools.com/documentation/
    LinkedIn: https://www.linkedin.com/company/seo-review-tools
*/

// API key 
$apiKey 'YOUR-API-KEY';

// domain
$inputUrl 'searchengineland.com'

// Location
$location "United States"

// Language
$language "English"

// specific API url 
$apiRequestUrl 'https://api.seoreviewtools.com/competitor-analysis/?url='.urlencode($keyword).'&location='.$location.'&hl='.$language.'&key='.$apiKey;

// get data from API
$jsonReposnse file_get_contents($apiRequestUrl);

// convert JSON to PHP array
$dataArray json_decode($jsonReposnsetrue);

// check if API call is success or failed
// (just some basic validation)

// API call fail
if ($dataArray['status'] !== 'ok'){

    
// return error message
    
echo 'Error message: '.$dataArray['error message'];

// API call success    
} else {

    
// print data
    
print_r($dataArray); 
}

?> 

JSON response example







Trusted by →

clients