Search our Knowledge Base
Search

Rank Stats API



The rank stats method returns ranking data for all keywords in a campaign for a specific date including domain URL, landing page, keyword, tags for that keyword, rank, search volume and search engine name and URL.

Refer to Rank Ranger API Overview page for information on how to obtain API access, obtain an API Key, error codes and a full list of API methods.


 

Parameters

 
key string The unique API key assigned to your account
domain tld Top level domain requested: this must be a domain that is being tracked in the campaign
date yyyy-mm-dd Requested data date
campaign_id
string Campaign ID number
keyword_id string Optional: you can add the &additional_tags=keyword_id parameter to the end of the call and it will display the Rank Ranger keyword_id in the success response
se_id string Optional: you can add the &se_id parameter to the end of the call and in the success response only the results for the search engine id you enter will display.
best_rank string Optional: you can add the &include_best_rank=true  parameter to the end of the call and it will display the best rank an individual keyword has achieved since Rank Ranger began tracking it.
rank_breakdown string Optional: you can add the &rank_breakdown=true  parameter to the end of the request and it will include a breakdown of the number of keywords that ranked in each rank position or range.
output string Output format options:
  • &output=xml  (this is the default format)
  • &output=json
    Either of these parameters can be added to the json output parameter:
    • &output=json&json_strict=true 
      (forces the results to come back as array instead of objects) 
    • &output=json&json_arr=true 
      (causes the entire json to be wrapped as array)


Example

 

Construct & test API requests in the API Console or follow one of these examples:

Base URL
https://www.rankranger.com/api/v2/?rank_stats&key=YOURAPIKEY&campaign_id=XXXXX&domain=example.com&date=YYYY-MM-DD

Example with call to retrieve keyword_id and best rank
https://www.rankranger.com/api/v2/?rank_stats&key=YOURAPIKEY&campaign_id=XXXXX&domain-example.com&date=YYYY-MM-DD&additional_tags=keyword_id&include_best_rank=true

Example with call to retrieve results for only a specific search engine and keyword
https://www.rankranger.com/api/v2/?rank_stats&key=YOURAPIKEY&domain=yourdomain.com&date=YYYY-MM-DD&se_id=XXX&keyword=your keyword 



Response

 
URL for this example:
https://www.rankranger.com/api/v2/?rank_stats&key=YourAPIKey&date=YYYY-MM-DD&campaign_id=12345&se_id=123&domain=example.com&rank_breakdown=true&include_best_rank=true

AخA
 
<tracking-data provider="rankranger" date="07/10/2019" time="14:08:32" status="ok" total_results="59">
    <results>
        <result>
            <date>07/10/2019</date>
            <url>www.allrecipes.com</url>
            <lp>/recipes/84/healthy-recipes/</lp>
            <keyword>healthy recipes</keyword>
            <tags>
                <tag>healthy</tag>
            </tags>
            <search_volume>246000</search_volume>
            <se>google.com</se>
            <se_name>Google USA</se_name>
            <rank>3</rank>
            <best_rank>1</best_rank>
        </result>
        <result>
            <date>07/10/2019</date>
            <url>www.allrecipes.com</url>
            <lp>
/recipes/453/everyday-cooking/family-friendly/kid-friendly/
</lp>
            <keyword>recipes for kids</keyword>
            <tags/>
            <search_volume>40500</search_volume>
            <se>google.com</se>
            <se_name>Google USA</se_name>
            <rank>1</rank>
            <best_rank>1</best_rank>
        </result>
        <result>
            <date>07/10/2019</date>
            <url>www.allrecipes.com</url>
            <lp>/recipes/156/bread/</lp>
            <keyword>bread recipes</keyword>
            <tags/>
            <search_volume>90500</search_volume>
            <se>google.com</se>
            <se_name>Google USA</se_name>
            <rank>1</rank>
            <best_rank>1</best_rank>
        </result>
        <result>
            <date>07/10/2019</date>
            <url>www.allrecipes.com</url>
            <lp>/recipe/12682/apple-pie-by-grandma-ople/</lp>
            <keyword>best apple pie recipe</keyword>
            <tags>
                <tag>dessert</tag>
            </tags>
            <search_volume>14800</search_volume>
            <se>google.com</se>
            <se_name>Google USA</se_name>
            <rank>2</rank>
            <best_rank>1</best_rank>
        </result>
        <result>
            <date>07/10/2019</date>
            <url>www.allrecipes.com</url>
            <lp>/recipe/219165/chef-johns-easy-apple-pie/</lp>
            <keyword>how to make apple pie</keyword>
            <tags>
                <tag>dessert</tag>
            </tags>
            <search_volume>22200</search_volume>
            <se>google.com</se>
            <se_name>Google USA</se_name>
            <rank>2</rank>
            <best_rank>1</best_rank>
        </result>
        <result>
            <date>07/10/2019</date>
            <url>www.allrecipes.com</url>
            <lp>/recipes/76/appetizers-and-snacks/</lp>
            <keyword>appetizer ideas</keyword>
            <tags>
                <tag>appetizers</tag>
            </tags>
            <search_volume>12100</search_volume>
            <se>google.com</se>
            <se_name>Google USA</se_name>
            <rank>3</rank>
            <best_rank>1</best_rank>
        </result>
      
      *** CONTINUES FOR EACH KEYWORD ***     
       
    </results>
    <rank_breakdown>
        <result>
            <se>
                <id>1</id>
                <name>Google USA</name>
                <url>google.com</url>
            </se>
            <ranks>
                <rank>
                    <position>1</position>
                    <count>14</count>
                </rank>
                <rank>
                    <position>2</position>
                    <count>12</count>
                </rank>
                <rank>
                    <position>3</position>
                    <count>9</count>
                </rank>
                <rank>
                    <position>1-3</position>
                    <count>35</count>
                </rank>
                <rank>
                    <position>4-7</position>
                    <count>9</count>
                </rank>
                <rank>
                    <position>4-10</position>
                    <count>11</count>
                </rank>
                <rank>
                    <position>8-10</position>
                    <count>2</count>
                </rank>
                <rank>
                    <position>1-10</position>
                    <count>46</count>
                </rank>
                <rank>
                    <position>1-20</position>
                    <count>52</count>
                </rank>
                <rank>
                    <position>11-20</position>
                    <count>6</count>
                </rank>
                <rank>
                    <position>21-30</position>
                    <count>2</count>
                </rank>
                <rank>
                    <position>21-50</position>
                    <count>4</count>
                </rank>
                <rank>
                    <position>31-40</position>
                    <count>2</count>
                </rank>
                <rank>
                    <position>41-50</position>
                    <count>0</count>
                </rank>
                <rank>
                    <position>51-100</position>
                    <count>0</count>
                </rank>
                <rank>
                    <position>100+</position>
                    <count>3</count>
                </rank>
            </ranks>
        </result>
    </rank_breakdown>
</tracking-data>


How to Obtain API Access

More

How to Generate New API Keys

More

API Console: Construct & Test API Requests

More

API Query Limits

More

Developer API Methods

More

API Error Codes

More

Get the ultimate SEO tools with the Rank Ranger Software
Learn More About Rank Ranger