Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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