MarketingTracer API
The MarketingTracer REST API allows users to access most of the MarketingTracer features in JSON format. Our API is designed to be simple and intuitive. All results are returned as a JSON object or an array of JSON objects.
1. General info
Api endpoint
https://app.marketingtracer.com/rest/
Api authentication
We use basic auth for our API authentication. Go to 'white label' to view your API credentials. If you do not currently have a white label account please contact us.
curl https://app.marketingtracer.com/rest/sites/list --user API-key:API-secret
2. Site list
In order to request data from our API endpoint you will need to specify a website id. Use the site list endpoint to fetch a list of websites
get
https://app.marketingtracer.com/rest/sites/list
Example response
[ { "_id":{ "$oid":"my_id" }, "domain":"www.example.com", "locale":{ "lang":"en", "cc":"en", "lc":"en" } }, { "_id":{ "$oid":"my_id" }, "domain":"www.example2.com", "locale":{ "lang":"en", "cc":"en", "lc":"en" } } ]
3. RankTracker API
The RankTracker API is used to retrieve ranking data for your website.
3.1 Rank Tracker list
get
https://app.marketingtracer.com/rest/rank-tracker/list?websiteid=<websiteid>
Example response
[ { "_id":{ "$oid":"some_id" }, "q":"my_keyword", "meta":{ "star":false, "label":"", "cpc":3.720173, "seo":35.064935064935064, "vol":1320 }, "summary":{ "google":{ "start":55, "pos":1, "best":1, "worst":66 }, "googlemobile":{ "start":70, "pos":2, "best":1, "worst":75 } } }]
3.2 Rank Tracker keyword history
get
https://app.marketingtracer.com/rest/rank-tracker/history?ranking_id=<rankingid>&websiteid=<websiteid>
Example response
{ "wwwurl1":{ "url":"www.example.com/url1", "data":[ { "date":"20190413", "pos":41 }, { "date":"20190413", "pos":41 } ] }, "www.example.com/url2":{ "url":"www.example.com/url2", "data":[ { "date":"20190426", "pos":44 } ] } }