Requirements:
- Node.js installed
- A Wordnik account
Note: Since one of the most common uses of the Wordnik API is to generate random words, my examples will be aimed toward that goal.
Generating and getting your API Key:
Visit the developer side of Worknik.
On the right-hand side will be a form.
Complete the form and then click on the “Sign me up for an API key” button. (Yes, it really is that easy.)
Once the key has been generated, it will at the bottom of your user settings page. Right above the section to delete your account will now be your API key.
Two ways to use the Wordnik API in Node.js:
-
Using Node-REST-Client (harder)
-
Using the wordnik-bb module (easier)
Using the Node-REST-Client Module
npm install node-rest-client
Start by installing the Node-REST client module. Using this method, we will be constructing a call using the Client object of the module to pass it the options we want via building a query string.
As an example of how to use this method, fill in your API key in the following code.
Using the Wordnik-bb Module
npm install wordnik-bb
Start by installing the wordnik-bb module. For this method, instead of creating a REST client, we can use the module designed specifically for calling the Wordnik API.
As an example of how to use this method, fill in your API key in the following code.


