Skip to content

Instantly share code, notes, and snippets.

@petercunha
Created February 18, 2017 21:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save petercunha/1bbd9220448d22bada25db771d840f47 to your computer and use it in GitHub Desktop.
Wolfram API Query for don don
var request = require('request');
function wolframQuery(query) {
var options = {
url: 'https://api.wolframalpha.com/v1/result?appid=<! PUT YOUR API KEY HERE !>&i=' + encodeURI(query),
headers: {}
};
function callback(error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
}
}
request(options, callback);
}
wolframQuery("how far from new york to los angeles");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment