While the answer is correct, there is an easier way to do this.
Since you are using a query, you can also add the gzip: true flag:
var request = require('request'); var url = 'http://api.stackexchange.com/2.1/questions?pagesize=100&fromdate=1356998400&todate=1359676800&order=desc&min=0&sort=votes&tagged=javascript&site=stackoverflow'; request.get({ url: url, headers: {'accept-encoding': 'gzip'}, gzip: true }, function(error, response, body) { console.log(body);
source share