Wordnik API Version 3.1 is available

Wordnik is pleased to announce version 3.1 of our public API. This includes a new mechanism for getting suggestions for case variations and common misspellings. You can get interesting bi-gram phrases containing the word. You can also now take advantage of padded JSON responses (JSONP) against any response requested in JSON format.

Take a look at the V3.1 Changelog and Methods pages for all the details.  These new APIs are live and available now.

How Do I Get Access?

Our API is available now. You’ll first need to be approved and be assigned an access key. Please visit http://api.wordnik.com/signup to get one. As you’ll see on the signup site, we’re accepting applications based on manual review.

Once approved, you can access the API by passing your API token in your requests to our servers. For example:

curl -H "api_key:{token}" http://api.wordnik.com/api/word.json/cat/definitions

Replace {token} with a valid API token, of course.

Is This Service Really in Alpha?

Yes. Like all good things on the Internet, the API is under constant development. Some day we’ll graduate from alpha and call it beta. Follow @wordnikapi on Twitter for announcements on the service. We’ll be adding features to the API weekly, and exposing more nuggets from our full corpus. Of course you can also contact us the old-fashioned way, at apiteam@wordnik.com, with service-related issues, etc.

Wordnik wants your suggestions on making the API better. Please don’t hesitate to ask. No reasonable requests will be ignored.

What Kind of Data is Available?

You can get immediate access to the following information through our API:

  • Definitions from the The Century Dictionary
  • Frequency data reflecting occurrences in our alpha API corpus
  • Example sentences for words
  • An autocomplete service
  • Access to our Word of the Day

This list will grow weekly so please follow the Twitter updates and watch for emails to the email address we have for your Wordnik account.

More Important Info

The service is RESTful so the resources and operations should be easy to understand. We adhere to the following principles:

  • You need to specify the requested format of data in the URL.
  • Your key should be passed in the HTTP headers. In GET operations you can pass your key in the request parameters, but this is not the preferred method.
  • You will receive a 2xx HTTP response code if your request was successful. You can always attempt to parse the response message in this scenario.
  • If you want something that doesn’t exist, you’ll get a 404 response.
  • If you request a list of objects and that list is empty, you’ll receive an empty array with a 2xx status code.
  • If you receive a non-2xx or non-3xx response code, you should always receive an error message wrapped in an ApiResponse:

in JSON format:

{
 message: "word not found"
 type: "error"
}

in XML:

<apiresponse>
  <message>word not found</message>
  <type>error</type>
</apiresponse>

You can get data in either XML or JSON format. If you’re interested in our API then you probably know which format you’d prefer. The same data is served up for both formats.

Methods

Please see the Methods page for specific methods of making API requests.

Where to Go Next

The best place to start is to check out our sample code on our public GitHub repository:

git://github.com/wordnik/api-examples.git

Note that for any access to the API you’ll first need an approved API key!

Terms of Service

Please take a minute to read our brief Terms of Service before using the API.