AgencyAnalytics Documentation & Developer Hub

Welcome to AgencyAnalytics docs. You'll find comprehensive guides and documentation to help you start working with AgencyAnalytics as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

API Documentation

The AgencyAnalytics REST API allows users to access market analysis features in JSON outputs. Get the documentation here!

 

We have created a simple REST API. It is designed to be simple, predictable and light-weight. All output is returned in JSON.

The system is comprised of two distinct objects referred to as models and feeds. A model is a thing while a feed is a statistical report.

API Endpoint

Authentication

All authentication is handled using basic HTTP auth. Provide your API key as your basic auth password; a username is not necessary.

curl --request GET https://api.clientseoreport.com/v3/campaigns \
-u :{api_key}

Errors

We use traditional HTTP response codes to indicate success or failure of an API request.

200 - everything went as expected, payload is returned
204 - everything went as expected, no payload is returned
403 - you've supplied an invalid API key
404 - you've tried to access a URL resource that doesn't exist
500 - something went wrong on our side

 
Suggest Edits

Login User

 
gethttps://api.clientseoreport.com/v3/users/user_id/loginGrant
 
curl --request GET https://api.clientseoreport.com/v3/users/{user_id}/loginGrant \
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

{
  "metadata": {
    "total_pages":1,
    "total_records":1
  },
  "data":{
    "token":"tkn.7bf94c2ks9f2e7d86174a4b3fc01c5ae",
    "time":"2015-04-13 16:34:57",
    "login_url":"http:\/\/test.clientseoreport.com\/v2\/#login-token\/99\/tkn.c6e1768b8e01ddwq2461ace8886b",
    "user_id":123,
    "origin_user_id":48
  }
}
 
Suggest Edits

Create User

 
posthttps://api.clientseoreport.com/v3/users

Form Data

first_name
string
required

first name

last_name
string
required

last name

username
string
required

unique identifier

password
string
required

desired password

email
string

email address

role
string
required

type of user

email_credentials
string

send welcome email

 
curl --request POST https://api.clientseoreport.com/v3/users \
  -u :{api_key} \
  -d '{
  	     "role": "client",
  	     "username": "JDoe",
  	     "email": "JDoe@test.com",
  	     "password": "crypticPaSSword8",
  	     "first_name": "John",
  	     "last_name": "Doe"
  }'
A binary file was returned

You couldn't be authenticated

{
  "metadata": {
    "total_pages":1,
    "total_records":1
  },
  "data":{
    "id":123,
    "date_created":"2015-03-30 10:06:24",
    "email":"JDoe@test.com",
    "username":"JDoe@test.com",
    "first_name":"John",
    "last_name":"Doe",
    "role":"client",
    "campaign_access":"restricted",
    "account_id":1
  }
}
 
Suggest Edits

List Users

 
gethttps://api.clientseoreport.com/v3/users

Query Params

filter
string

search of user

page
int32

pagination value

limit
int32

number of records to return

order_by
string

field to order by

order_direction
string

sort direction

role
array of strings

role of user

 
curl --request GET https://api.clientseoreport.com/v3/users?filter=John&limit=10&page=1&order_by=email&order_direction=desc \
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

{
  "metadata": {
    "total_pages":1,
    "total_records":1
  },
  "data":[{
    "id":123,
    "date_created":"2015-03-30 10:06:24",
    "email":"JDoe@test.com",
    "username":"JDoe@test.com",
    "password":null,
    "first_name":"John",
    "last_name":"Doe",
    "role":"client",
    "campaign_access":"restricted",
    "account_id":1
  }]
}
 
Suggest Edits

Update User

 
puthttps://api.clientseoreport.com/v3/users/user_id

Path Params

user_id
int32
required

id of user

Query Params

first_name
string

users first name

password
string

desired password

email
string

email address

username
string

unique identifier

last_name
string

users last name

role
string

type of user

 
curl --request PUT https://api.clientseoreport.com/v3/users/{user_id} \
  -u :{api_key} \
  -d '{
  	     "role": "client",
  	     "username": "JDoe",
  	     "email": "JDoe@test.com",
  	     "password": "crypticPaSSword8",
  	     "first_name": "John",
  	     "last_name": "Doe"
  }'
A binary file was returned

You couldn't be authenticated

{
  "metadata": {
    "total_pages":1,
    "total_records":1
  },
  "data":{
    "id":123,
    "date_created":"2015-03-30 10:06:24",
    "email":"JDoe@test.com",
    "username":"JDoe@test.com",
    "first_name":"John",
    "last_name":"Doe",
    "role":"client",
    "campaign_access":"restricted",
    "account_id":1
  }
}
 
Suggest Edits

Delete User

 
deletehttps://api.clientseoreport.com/v3/users/user_id

Path Params

user_id
int32
required

id of user

 
curl --request DELETE https://api.clientseoreport.com/v3/users/{user_id} \
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

 
Suggest Edits

View a User

 
gethttps://api.clientseoreport.com/v3/users/user_id

Path Params

user_id
int32
required

id of user

 
curl --request GET https://api.clientseoreport.com/v3/users/{user_id}\
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

{
  "metadata": {
    "total_pages":1,
    "total_records":1
  },
  "data":{
    "id":123,
    "date_created":"2015-03-30 10:06:24",
    "email":"JDoe@test.com",
    "username":"JDoe@test.com",
    "password":null,
    "first_name":"John",
    "last_name":"Doe",
    "role":"client",
    "campaign_access":"restricted",
    "account_id":1
  }
}
 
Suggest Edits

Create Campaign

 
posthttps://api.clientseoreport.com/v3/campaigns

Form Data

url
string
required

website address

company
string
required

company name

scope
string

scope of url

group_title
string

group name

This is a POST function but I noticed it has a "GET" tag next to it in the docs.

curl --request POST https://api.clientseoreport.com/v3/campaigns \
  -u :{api_key} \
  -d '{
  	     "url": "http://www.test.com",
  	     "company": "Acme Inc.",
  	     "scope": "domain"
  		}'
A binary file was returned

You couldn't be authenticated

{
    "metadata":{
        "total_pages":1,
        "total_records":1
    },
    "data":{
        "id":123,
        "date_created":"2015-03-30 10:06:24",
        "date_modified":null,
        "url":"http://www.test.com",
        "company":"Acme Inc.",
        "scope":"domain",
        "account_id":567
    }
}
 
Suggest Edits

List Campaigns

 
gethttps://api.clientseoreport.com/v3/campaigns

Query Params

filter
string

search of campaign

page
int32

pagination value

limit
int32

number of records to return

order_by
string

field to order by

order_direction
string

sort direction

 
curl --request GET https://api.clientseoreport.com/v3/campaigns?limit=10&page=1&order_by=email&order_direction=desc&filter=Acme+Inc. \
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

{
    "metadata":{
        "total_pages":1,
        "total_records":1
    },
    "data":[{
      "id": 42,
      "date_created": "2018-08-01 00:00:00",
      "date_modified": "2018-11-01 22:25:37",
      "date_deleted": null,
      "url": "http://test.com",
      "company": "test",
      "status": "active",
      "scope": "domain",
      "google_ignore_places": "false",
      "google_places_id": null,
      "google_cid": null,
      "google_mybusiness_id": null,
      "google_mybusiness_name": null,
      "group_title": null,
      "timezone": null,
      "account_id": 1
    }]
}
 
Suggest Edits

Update Campaign

Update
PUT /campaigns/{campaign_id}

 
puthttps://api.clientseoreport.com/v3/campaigns/campaign_id

Path Params

campaign_id
int32
required

id of campaign

Form Data

url
string

website address

company
string

company name

scope
string

targeting

group_title
string

group name

 
curl --request PUT https://api.clientseoreport.com/v3/campaigns/{campaign_id} \
  -u :{api_key} \
  -d '{
  	     "url": "http://www.test.com",
  	     "company": "Acme Inc.",
  	     "scope": "domain"
  }'
A binary file was returned

You couldn't be authenticated

{
    "metadata":{
        "total_pages":1,
        "total_records":1
    },
    "data":{
        "id":123,
        "date_created":"2015-03-30 10:06:24",
        "date_modified":null,
        "url":"http://www.test.com",
        "company":"Acme Inc.",
        "scope":"domain",
        "group_title": null,
        "account_id":567
    }
}
 
Suggest Edits

Delete Campaign

 
deletehttps://api.clientseoreport.com/v3/campaigns/campaign_id

Path Params

campaign_id
int32
required

id of campaign

 
curl --request DELETE https://api.clientseoreport.com/v3/campaigns/{campaign_id} \
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

 
Suggest Edits

View a Campaign

 
gethttps://api.clientseoreport.com/v3/campaigns/campaign_id

Path Params

campaign_id
int32
required
 
curl --request GET https://api.clientseoreport.com/v3/campaigns/{campaign_id} \
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

{
    "metadata":{
        "total_pages":1,
        "total_records":1
    },
    "data":{
        "id":123,
        "date_created":"2015-03-30 10:06:24",
        "date_modified":null,
        "url":"http://www.test.com",
        "company":"Acme Inc.",
        "scope":"domain",
        "group_title": null,
        "account_id":567
    }
}
 
Suggest Edits

List Keywords

 
gethttps://api.clientseoreport.com/v3/keywords

Query Params

filter
string

search of keyword

page
int32

pagination value

limit
int32

number of records to return

order_by
string

field to order by

order_direction
string

sort direction

 
curl --request GET https://api.clientseoreport.com/v3/keywords?filter=test \
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

{
    "metadata":{
        "total_pages":1,
        "total_records":1
    },
    "data":[{
        "id":123,
        "date_created": "2015-03-30 10:06:24",
        "date_modified": "2015-03-31 9:32:19",
        "keyword_phrase":"test keyword",
        "primary_keyword": "false",
        "campaign_id":123
    }]
}
 
Suggest Edits

View a Keyword

 
gethttps://api.clientseoreport.com/v3/keywords/keyword_id

Path Params

keyword_id
int32
required

id of keyword

 
curl --request GET https://api.clientseoreport.com/v3/keywords/{campaign_id} \
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

{
    "metadata":{
        "total_pages":1,
        "total_records":1
    },
    "data":{
        "id":123,
        "date_created": "2015-03-30 10:06:24",
        "date_modified": "2015-03-31 9:32:19",
        "keyword_phrase":"test keyword",
        "primary_keyword": "false",
        "campaign_id":123
    }
}
 
Suggest Edits

List Rankings Campaign by Date

 
gethttps://api.clientseoreport.com/v3/feeds/ranking/campaign/date

Query Params

campaign_id
int32
required

campaign id

start_date
date
required

YYYY-MM-DD

end_date
date
required

yyyy-mm-dd

filter
string

fuzzy match

page
int32

pagination value

limit
int32

number of records to return

sort_metric
string

metric to order by

sort_direction
string

sort direction

compare_previous_period
string

calculate change from previous period

 
curl --request GET https://api.clientseoreport.com/v3/feeds/ranking/campaign/date?campaign_id={campaign_id} \
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

{
   "metadata":{
      "total_pages":1,
      "total_records":1
   },
   "data":{
      "totals":false,
      "rows":[
         {
            "keywordId":1260175,
            "keywordPhrase":"seo software",
            "primaryKeyword":"true",
            "googleRanking":36,
            "googleRankingChange":-7,
            "googleRankingUrl":"http:\/\/www.myseotool.com\/",
            "googleSerpUrl":"https:\/\/www.google.ca\/...",
            "googlePlacesRanking":0,
            "googlePlacesRankingChange":0,
            "googleMapsSerpUrl":"https:\/\/www.google.ca\/maps\/...",
            "bingRanking":0,
            "bingRankingChange":0,
            "bingRankingUrl":null,
            "globalMonthlySearches":8100,
            "localMonthlySearches":260,
            "competitors":74300,
            "gwtRanking":41,
            "gwtClicks":0,
            "gwtImpressions":5930,
            "gwtCtr":0,
            "backlinks":0,
            "lastGoogleRankingDate":"2015-02-24 20:08:47",
            "lastGooglePlacesRankingDate":"2015-02-24 09:36:55",
            "lastBingRankingDate":"2015-02-25 00:14:45",
            "lastSearchVolumeDate":"2015-02-12",
            "tags":[
               {
                  "id":22289,
                  "label":"tester"
               },
               {
                  "id":25054,
                  "label":"new tag"
               }
            ]
         }
      ]
   }
}
 
Suggest Edits

List Rankings Campaign by Keyword

 
gethttps://api.clientseoreport.com/v3/feeds/ranking/campaign/keyword

Query Params

campaign_id
int32
required

campaign id

start_date
date
required

YYYY-MM-DD

end_date
date
required

yyyy-mm-dd

filter
string

fuzzy match

page
int32

pagination value

limit
int32

number of records to return

sort_metric
string

metric to order by

sort_direction
string

sort direction

compare_previous_period
string

calculate change from previous period

 
curl --request GET https://api.clientseoreport.com/v3/feeds/ranking/campaign/keyword?campaign_id={campaign_id} \
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

{
   "metadata":{
      "total_pages":1,
      "total_records":1
   },
   "data":{
      "totals":false,
      "rows":[
         {
            "keywordId":1260175,
            "keywordPhrase":"seo software",
            "primaryKeyword":"true",
            "googleRanking":36,
            "googleRankingChange":-7,
            "googleRankingUrl":"http:\/\/www.myseotool.com\/",
            "googleSerpUrl":"https:\/\/www.google.ca\/...",
            "googlePlacesRanking":0,
            "googlePlacesRankingChange":0,
            "googleMapsSerpUrl":"https:\/\/www.google.ca\/maps\/...",
            "bingRanking":0,
            "bingRankingChange":0,
            "bingRankingUrl":null,
            "globalMonthlySearches":8100,
            "localMonthlySearches":260,
            "competitors":74300,
            "gwtRanking":41,
            "gwtClicks":0,
            "gwtImpressions":5930,
            "gwtCtr":0,
            "backlinks":0,
            "lastGoogleRankingDate":"2015-02-24 20:08:47",
            "lastGooglePlacesRankingDate":"2015-02-24 09:36:55",
            "lastBingRankingDate":"2015-02-25 00:14:45",
            "lastSearchVolumeDate":"2015-02-12",
            "tags":[
               {
                  "id":22289,
                  "label":"tester"
               },
               {
                  "id":25054,
                  "label":"new tag"
               }
            ]
         }
      ]
   }
}
 
Suggest Edits

List Rankings Keyword by Date

 
gethttps://api.clientseoreport.com/v3/feeds/ranking/keyword/date

Query Params

keyword_id
int32
required

keyword id

start_date
date
required

YYYY-MM-DD

end_date
date
required

YYYY-MM-DD

filter
string

fuzzy match

page
int32

pagination value

limit
int32

number of records to return

sort_metric
string

metric to order by

sort_direction
string

sort direction

compare_previous_period
string

calculate change from previous period

 
curl --request GET https://api.clientseoreport.com/v3/feeds/ranking/keyword/date?keyword_id={keyword_id} \
  -u :{api_key}
A binary file was returned

You couldn't be authenticated

{
   "metadata":{
      "total_pages":1,
      "total_records":1
   },
   "data":{
      "totals":{
         "googleRanking":{
            "value":15
         },
         "googleRankingChange":{
            "value":-1
         },
         "googleRankingUrl":{
            "value":"http:\/\/www.myseotool.com\/"
         },
         "googlePlacesRanking":{
            "value":0
         },
         "googlePlacesRankingChange":{
            "value":0
         },
         "bingRanking":{
            "value":13
         },
         "bingRankingChange":{
            "value":-5
         },
         "bingRankingUrl":{
            "value":"http:\/\/www.myseotool.com\/"
         },
         "backlinks":{
            "value":6115
         },
         "competitors":{
            "value":1080000
         },
         "globalMonthlySearches":{
            "value":27100
         },
         "localMonthlySearches":{
            "value":590
         },
         "gwtRanking":{
            "value":22
         },
         "gwtClicks":{
            "value":36
         },
         "gwtImpressions":{
            "value":11360
         },
         "gwtCtr":{
            "value":0
         }
      },
      "rows":[
         {
            "date":"2014-12-01",
            "googleRanking":15,
            "googleRankingUrl":"http:\/\/www.myseotool.com\/",
            "googlePlacesRanking":0,
            "bingRanking":13,
            "bingRankingUrl":"http:\/\/www.myseotool.com\/",
            "backlinks":6115,
            "competitors":1080000,
            "globalMonthlySearches":27100,
            "localMonthlySearches":590,
            "gwtRanking":22,
            "gwtClicks":36,
            "gwtImpressions":11360,
            "gwtCtr":0
         }
      ]
   }
}