Search our Knowledge Base
Search

Add Campaign API



 
 

Parameters

 
 
key string The unique API key assigned to your account
campaign_name string The campaign name
campaign_domain string The primary URL/domain for your campaign
campaign_ranking_system string The ranking system you would like to setup for this campaign
Available parameters:
  • default

    (Domains or sub-domains)


    Count rank results as is when checking your rankings in search engine results.
    This is used when you want to monitor domains (e.g. yoursite.com/*),
    or sub-domains (e.g., *.yoursite.com/*).

  • explicit_domain_count(Domains or sub-domains)
    When checking your rankings this option will ignore duplicate domains in search engine results.
    This is used when you want to monitor domains (e.g. yoursite.com/*),
    or sub-domains (e.g., *.yoursite.com/*).

  • exact(Sub-Directory or Specific Page)
    Monitoring Exact URL rankings means that you are interested in tracking the rank of a specific page or section within a website. When you choose this option Rank Ranger will match the results only if the exact URL matches the search engine result.
    This is used when you want to monitor
    sub directories (e.g. http://yoursite.com/subdirectory),
    or specific landing pages (e.g., http://yoursite.com/yourpage.html).
    Please note that you will only be able to insert a specific URL for your campaign if you have selected this option. If you select one of the alternative SERP options then any sub-directory and/or landing page entered will be stripped and only the domain name (e.g., yoursite.com) will be used for ranking.
Refer to Ranking System Count documentation for examples and additional information.
profile_id or

profile_ref_id
int

string
Profile ID (refer to Get All Profiles to obtain a list of Profile IDs.)

Optional: your internal profile_ref_id can be used instead of profile_id if this parameter has been added to your account (refer to  Add Profile).
reference_id string Optional parameter for your internal reference, e.g., primary domain identifier. Character limit is 50 English letters, numbers and/or the characters ". _ -"
package_id string If you have more than one package in your account, you need to include the package ID in order for the campaign to be added to the correct package.
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)


Examples

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

https://www.rankranger.com/api/v2/?add_campaign&key=YOURAPIKEY&campaign_name=yourcampaignname
&campaign_domain=yourdomain.com&campaign_ranking_system=count_as_is&package_id=123456789

Example including profile ID
https://www.rankranger.com/api/v2/?add_campaign&key=YOURAPIKEY&campaign_name=yourcampaignname
&campaign_domain=yourdomain.com&campaign_ranking_system=count_as_is&profile_id=ProfileIDnumber&package_id=123456789

Example including your reference ID
https://www.rankranger.com/api/v2/?add_campaign&key=YOURAPIKEY&campaign_name=yourcampaignname
&campaign_domain=yourdomain.com&campaign_ranking_system=count_as_is&reference_id=YourReferenceID&package_id=123456789

Example including your profile and your reference ID
https://www.rankranger.com/api/v2/?add_campaign&key=YOURAPIKEY&campaign_name=yourcampaignname
&campaign_domain=yourdomain.com&campaign_ranking_system=count_as_is&profile_ref_id=YourProfileReferenceID
&reference_id=YourReferenceID&package_id=123456789


Response

 
<?xml version="1.0" encoding="utf-8"?>
<tracking-data provider="rankranger" date="02/01/2016" time="19:15:12" status="ok" >
  
<new_campaign_id>1234567</new_campaign_id
</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