Although stand-alone SQL provides a simple, powerful interface for analyzing web data, there are always use cases where you may need to utilize language-dependent methods and libraries to further process the data or integrate Mixnode into an existing pipeline. Following the release of our first SDK, you can now use Mixnode's brand new Node.js SDK to execute SQL queries from your Node.js application.
Installation
Mixnode can be installed from npm:
npm install mixnode-node-sdk --save
Authentication
var Mixnode = require('mixnode-node-sdk');
// Create an instance of the Mixnode SQL Client
const SQLClient = new Mixnode.SQLClient({
api_key: 'dfdb60dbf8dtesttest12c49edf60976' // Find your API key at https://www.mixnode.com/account/api
});
Running your first query
var Mixnode = require('mixnode-node-sdk');
// Create an instance of the Mixnode SQL Client
const SQLClient = new Mixnode.SQLClient({
api_key: 'dfdb60dbf8dtesttest12c49edf60976' // Find your API key at https://www.mixnode.com/account/api
});
// Gets 10 urls and their title from homepages table
SQLClient.execute('SELECT url, title from homepages LIMIT 10')
.then((response) => {
console.log(response);
}).catch((err) => {
console.log(err);
});
What's next?
Give the Mixnode Node.js SDK a try and let us know if you have any questions or feedback. Also, stay tuned for SDKs in more languages!