Wordnik

Wordnik

Media

Dictionary Data API. Definitions from five dictionaries, including the American Heritage Dictionary of the English Language, the Century Dictionary, Wiktionary, the GNU International Dictionary of English, and Wordnet, covering more than 800,000 words, Synonyms, antonyms, and other word relations, Real example sentences and links to their sources for more than 10,000,000 words, Audio pronunciations, A word-of-the-day API A random-word API.

Visit API

📚 Documentation & Examples

Everything you need to integrate with Wordnik

🚀 Quick Start Examples

Wordnik Javascript Examplejavascript
// Wordnik API Example
const response = await fetch('http://developer.wordnik.com', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Getting to know the Wordnik API

The Wordnik API allows developers to explore the entire English language, with a vast array of resources including dictionaries, thesauri, and example sentences. With a variety of endpoints to query, developers can gain insight into the meaning and usage of millions of words, idioms, and phrases.

Basic Usage

In order to use the Wordnik API, developers are required to sign up for an API key, which can be obtained at http://developer.wordnik.com/signup/. Once you have your key, you can start making requests to the API.

Endpoint: /word.json/{word}

The /word.json/{word} endpoint returns basic information about a particular word, including its definition(s), part(s) of speech, and example sentences. Here's how you can make a request to this endpoint:

const request = require('request');

const options = {
  url: 'http://api.wordnik.com/v4/word.json/test?api_key=YOUR_API_KEY',
  json: true
};

request.get(options, (error, response, body) => {
  if (error) {
    console.error(error);
  } else {
    console.log(body);
  }
});

Note that you'll need to replace YOUR_API_KEY with your actual API key.

Endpoint: /word.json/{word}/pronunciations

The /word.json/{word}/pronunciations endpoint returns an array of pronunciations for a given word. Here's an example of how to use this endpoint:

const request = require('request');

const options = {
  url: 'http://api.wordnik.com/v4/word.json/test/pronunciations?api_key=YOUR_API_KEY',
  json: true
};

request.get(options, (error, response, body) => {
  if (error) {
    console.error(error);
  } else {
    console.log(body);
  }
});

Endpoint: /word.json/{word}/definitions

The /word.json/{word}/definitions endpoint returns an array of definitions for a specified word. Here's how you can use this endpoint:

const request = require('request');

const options = {
  url: 'http://api.wordnik.com/v4/word.json/test/definitions?api_key=YOUR_API_KEY',
  json: true
};

request.get(options, (error, response, body) => {
  if (error) {
    console.error(error);
  } else {
    console.log(body);
  }
});

Endpoint: /words.json/search/{query}

The /words.json/search/{query} endpoint allows developers to search for words based on a given query. This can be useful when building a type-ahead feature for an application. Here's an example of how to use this endpoint:

const request = require('request');

const query = 'test';
const options = {
  url: `http://api.wordnik.com/v4/words.json/search/${query}?api_key=YOUR_API_KEY`,
  json: true
};

request.get(options, (error, response, body) => {
  if (error) {
    console.error(error);
  } else {
    console.log(body);
  }
});

Conclusion

The Wordnik API provides a rich set of resources for developers looking to build language-focused applications. Whether you're building a dictionary app, a game that involves wordplay, or anything in between, the Wordnik API can be a powerful tool in your arsenal.

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jul 6Jul 8Jul 10Jul 12Jul 14Jul 16Jul 18Jul 20Jul 22Jul 24Jul 26Jul 28Jul 30Aug 1Aug 404008001440Minutes
Online
Offline

Related APIs in Media