tomato-url-short First run npm i tomato-url-short var TmSh = require('tomato-url-short'); TmSh.shorten('http://google.com', function(res, err) { if (err) console.log(err) console.log(res); });