Tuesday, 14 March 2017

TypeError: semrush.backlinks_refdomains is not a function

Guys when i was trying to get data from SEMRUSH API using backlinks_refdomains and backlinks_refips its showing me this error.

And when i called same function domain_rank it responded me in json format. can you help me out in this. Attached image is the result when is is give me domain_rank but not other factors like baclinks and etc. I am using this code.

`

module.exports = {
index: function(req,res){

    console.log("Hello welocme!");
    var SEMRushAPI = require('sails-semrush');
    var URL = "www.flipkart.com";
    var database = {database:'us'};
    var semrush = new SEMRushAPI('XXXXXXXXXXXXXXX');

semrush.backlinks(URL, database, function(err, response){
if (err){

        console.log("There is some error to fetching web traffic on API !");
        console.log("err: ",err);
        console.log("There is some error to fetching web traffic on API !");
        }else{
                 console.log("backlinks");
            console.log(" Response: ",response);
            console.log("**************** Get the web traffic successfully ***************");
            console.log("******zone, country, ip*******");
        } 

semrush.backlinks_refdomains(URL, database, function(err, response){ 
          if (err){

        console.log("There is some error to fetching web traffic on API !");
        console.log("err: ",err);
        console.log("There is some error to fetching web traffic on API !");
        }else{

console.log("domain_score_asc, domain_score_desc, backlinks_asc, backlinks_desc, last_seen_asc, last_seen_desc, first_seen_asc, first_seen_desc");
console.log(" Response: ",response);
console.log("**************** Get the web traffic successfully **************");
console.log("zone, country, ip");
}
});

`

This is image of my output, where i getting domain ranks but not backlinks can some one help me in this

Thanks in advance!!



via Sanyog Tiwari

No comments:

Post a Comment