@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api api.wordnik.com
@base https://api.wordnik.com/v4
@version 4.0
@auth ApiKey api_key in query
@endpoints 16
@toc word.json(11), words.json(5)

@group word.json
@endpoint GET /word.json/{word}/audio
@desc Fetches audio metadata for a word.
@required {word: any # Word to get audio for.}
@optional {useCanonical: any # If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested., limit: any # Maximum number of results to return}
@returns(200) No response was specified

@endpoint GET /word.json/{word}/definitions
@desc Return definitions for a word
@required {word: any # Word to return definitions for}
@optional {limit: any # Maximum number of results to return, partOfSpeech: any # CSV list of part-of-speech types, includeRelated: any # Return related words with definitions, sourceDictionaries: any # Source dictionary to return definitions from.  If 'all' is received, results are returned from all sources. If multiple values are received (e.g. 'century,wiktionary'), results are returned from the first specified dictionary that has definitions. If left blank, results are returned from the first dictionary that has definitions. By default, dictionaries are searched in this order: ahd-5, wiktionary, webster, century, wordnet, useCanonical: any # If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested., includeTags: any # Return a closed set of XML tags in response}
@returns(200) No response was specified

@endpoint GET /word.json/{word}/etymologies
@desc Fetches etymology data
@required {word: any # Word to return}
@optional {useCanonical: any # If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.}
@returns(200) No response was specified

@endpoint GET /word.json/{word}/examples
@desc Returns examples for a word
@required {word: any # Word to return examples for}
@optional {includeDuplicates: any # Show duplicate examples from different sources, useCanonical: any # If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested., skip: any # Results to skip, limit: any # Maximum number of results to return}
@returns(200) No response was specified

@endpoint GET /word.json/{word}/frequency
@desc Returns word usage over time
@required {word: any # Word to return}
@optional {useCanonical: any # If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested., startYear: any # Starting Year, endYear: any # Ending Year}
@returns(200) No response was specified

@endpoint GET /word.json/{word}/hyphenation
@desc Returns syllable information for a word
@required {word: any # Word to get syllables for}
@optional {useCanonical: any # If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested., sourceDictionary: any # Get from a single dictionary. Valid options: ahd-5, century, wiktionary, webster, and wordnet., limit: any # Maximum number of results to return}
@returns(200) No response was specified

@endpoint GET /word.json/{word}/phrases
@desc Fetches bi-gram phrases for a word
@required {word: any # Word to fetch phrases for}
@optional {limit: any # Maximum number of results to return, wlmi: any # Minimum WLMI for the phrase, useCanonical: any # If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.}
@returns(200) No response was specified

@endpoint GET /word.json/{word}/pronunciations
@desc Returns text pronunciations for a given word
@required {word: any # Word to get pronunciations for}
@optional {useCanonical: any # If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested., sourceDictionary: any # Get from a single dictionary, typeFormat: any # Text pronunciation type, limit: any # Maximum number of results to return}
@returns(200) No response was specified

@endpoint GET /word.json/{word}/relatedWords
@desc Given a word as a string, returns relationships from the Word Graph
@required {word: any # Word to fetch relationships for}
@optional {useCanonical: any # If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested., relationshipTypes: any # Limits the total results per type of relationship type, limitPerRelationshipType: any # Restrict to the supplied relationship types}
@returns(200) No response was specified

@endpoint GET /word.json/{word}/scrabbleScore
@desc Returns the Scrabble score for a word
@required {word: any # Word to get scrabble score for.}
@returns(200) No response was specified

@endpoint GET /word.json/{word}/topExample
@desc Returns a top example for a word
@required {word: any # Word to fetch examples for}
@optional {useCanonical: any # If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.}
@returns(200) No response was specified

@endgroup

@group words.json
@endpoint GET /words.json/randomWord
@desc Returns a single random WordObject
@optional {hasDictionaryDef: any # Only return words with dictionary definitions, includePartOfSpeech: any # CSV part-of-speech values to include (allowable values are noun, adjective, verb, adverb, interjection, pronoun, preposition, abbreviation, affix, article, auxiliary-verb, conjunction, definite-article, family-name, given-name, idiom, imperative, noun-plural, noun-posessive, past-participle, phrasal-prefix, proper-noun, proper-noun-plural, proper-noun-posessive, suffix, verb-intransitive, verb-transitive), excludePartOfSpeech: any # CSV part-of-speech values to exclude (allowable values are noun, adjective, verb, adverb, interjection, pronoun, preposition, abbreviation, affix, article, auxiliary-verb, conjunction, definite-article, family-name, given-name, idiom, imperative, noun-plural, noun-posessive, past-participle, phrasal-prefix, proper-noun, proper-noun-plural, proper-noun-posessive, suffix, verb-intransitive, verb-transitive), minCorpusCount: any # Minimum corpus frequency for terms, maxCorpusCount: any # Maximum corpus frequency for terms, minDictionaryCount: any # Minimum dictionary count, maxDictionaryCount: any # Maximum dictionary count, minLength: any # Minimum word length, maxLength: any # Maximum word length}
@returns(200) No response was specified

@endpoint GET /words.json/randomWords
@desc Returns an array of random WordObjects
@optional {hasDictionaryDef: any # Only return words with dictionary definitions, includePartOfSpeech: any # CSV part-of-speech values to include (allowable values are noun, adjective, verb, adverb, interjection, pronoun, preposition, abbreviation, affix, article, auxiliary-verb, conjunction, definite-article, family-name, given-name, idiom, imperative, noun-plural, noun-posessive, past-participle, phrasal-prefix, proper-noun, proper-noun-plural, proper-noun-posessive, suffix, verb-intransitive, verb-transitive), excludePartOfSpeech: any # CSV part-of-speech values to exclude (allowable values are noun, adjective, verb, adverb, interjection, pronoun, preposition, abbreviation, affix, article, auxiliary-verb, conjunction, definite-article, family-name, given-name, idiom, imperative, noun-plural, noun-posessive, past-participle, phrasal-prefix, proper-noun, proper-noun-plural, proper-noun-posessive, suffix, verb-intransitive, verb-transitive), minCorpusCount: any # Minimum corpus frequency for terms, maxCorpusCount: any # Maximum corpus frequency for terms, minDictionaryCount: any # Minimum dictionary count, maxDictionaryCount: any # Maximum dictionary count, minLength: any # Minimum word length, maxLength: any # Maximum word length, sortBy: any # Attribute to sort by, sortOrder: any # Sort direction, limit: any # Maximum number of results to return}
@returns(200) No response was specified

@endpoint GET /words.json/reverseDictionary
@desc Reverse dictionary search
@required {query: any # Search term}
@optional {findSenseForWord: any # Restricts words and finds closest sense, includeSourceDictionaries: any # Only include these comma-delimited source dictionaries, excludeSourceDictionaries: any # Exclude these comma-delimited source dictionaries, includePartOfSpeech: any # Only include these comma-delimited parts of speech (allowable values are noun, adjective, verb, adverb, interjection, pronoun, preposition, abbreviation, affix, article, auxiliary-verb, conjunction, definite-article, family-name, given-name, idiom, imperative, noun-plural, noun-posessive, past-participle, phrasal-prefix, proper-noun, proper-noun-plural, proper-noun-posessive, suffix, verb-intransitive, verb-transitive), excludePartOfSpeech: any # Exclude these comma-delimited parts of speech (allowable values are noun, adjective, verb, adverb, interjection, pronoun, preposition, abbreviation, affix, article, auxiliary-verb, conjunction, definite-article, family-name, given-name, idiom, imperative, noun-plural, noun-posessive, past-participle, phrasal-prefix, proper-noun, proper-noun-plural, proper-noun-posessive, suffix, verb-intransitive, verb-transitive), minCorpusCount: any # Minimum corpus frequency for terms, maxCorpusCount: any # Maximum corpus frequency for terms, minLength: any # Minimum word length, maxLength: any # Maximum word length, expandTerms: any # Expand terms, includeTags: any # Return a closed set of XML tags in response, sortBy: any # Attribute to sort by, sortOrder: any # Sort direction, skip: any # Results to skip, limit: any # Maximum number of results to return}
@returns(200) No response was specified

@endpoint GET /words.json/search/{query}
@desc Searches words
@required {query: any # Search query}
@optional {allowRegex: any # Search term is a Regular Expression, caseSensitive: any # Search case sensitive, includePartOfSpeech: any # Only include these comma-delimited parts of speech (allowable values are noun, adjective, verb, adverb, interjection, pronoun, preposition, abbreviation, affix, article, auxiliary-verb, conjunction, definite-article, family-name, given-name, idiom, imperative, noun-plural, noun-posessive, past-participle, phrasal-prefix, proper-noun, proper-noun-plural, proper-noun-posessive, suffix, verb-intransitive, verb-transitive), excludePartOfSpeech: any # Exclude these comma-delimited parts of speech (allowable values are noun, adjective, verb, adverb, interjection, pronoun, preposition, abbreviation, affix, article, auxiliary-verb, conjunction, definite-article, family-name, given-name, idiom, imperative, noun-plural, noun-posessive, past-participle, phrasal-prefix, proper-noun, proper-noun-plural, proper-noun-posessive, suffix, verb-intransitive, verb-transitive), minCorpusCount: any # Minimum corpus frequency for terms, maxCorpusCount: any # Maximum corpus frequency for terms, minDictionaryCount: any # Minimum number of dictionary entries for words returned, maxDictionaryCount: any # Maximum dictionary definition count, minLength: any # Minimum word length, maxLength: any # Maximum word length, skip: any # Results to skip, limit: any # Maximum number of results to return}
@returns(200) No response was specified

@endpoint GET /words.json/wordOfTheDay
@desc Returns a specific WordOfTheDay
@optional {date: any # Fetches by date in yyyy-MM-dd}
@returns(200) No response was specified

@endgroup

@end
