Skip to content

scott-wyatt/sails-semrush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sails-semrush - An SEMRush API library for Node.js and Sail.js

This module provides calls to the SEMRushAPI for Nodejs and Sails.js.

Installation

You can install this through npm: npm install sails-semrush

Usage

var SEMRushAPI = require('sails-semrush');
var semrush = new SEMRushAPI('<YOUR API KEY>');

semrush.<ReportType>('<DOMAIN>', {<RequestParams>}, function(err, response) {
  if (err) throw err;

  // sails-semrush returns camelCased columns names and then the csv is converted to JSON.
  // See http://www.semrush.com/api.html for format of returned object before camelCasing and special character removal. 
  

  var report = response;

  // Do something with data
});

Discrepancies

SEMRush loves to return data in a csv format with certain columns containing special characters that are not allowed in databases such as mongodb. sails-semrush gets rid of that and removes special characters while camelCasing the column names before exporting the csv as JSON. This makes it more native to Node.js. As always, I'm very open to Pull Requests!

About

Semrush API tailored for Sails.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages