Oxford Dictionaries API Documentation

Oxford Dictionaries API Documentation

The Oxford Dictionaries API allows easy access to our world-renowned dictionary content. Use the live documentation below to try it out, view real responses, and explore a growing number of code samples to help you get started.

The documentation is already populated with test credentials to allow you to get started straight away, but to get full, unrestricted use of the API you need to sign up for an account. Once you login to your account the base URL for your API requests will be shown here.

Take a look at our FAQ page if you have any questions, or feel free to contact us.

You can explore the API functionality using the REST client Postman. Click below to import a Collection of useful examples to get you started.

Implementation notes

/entries/{source_lang}/{word_id}:

Use this to retrieve definitions, pronunciations

The way in which a word is pronounced.

We generally give pronunciations both as sound files and in a phonetic spelling.

E.g. through “Pronunciation: /θruː/”

, example sentences, grammatical information

A grammatical feature provides extra information about a lexicalCategory (see below). E.g. a grammaticalFeature may say that a noun is plural, or that a verb is intransitive.

and word origins

An account of the origin and historical development of the word.

E.g. ‘grammar’ has the etymology “Late Middle English: from Old French gramaire, via Latin from Greek grammatikē (tekhnē) '(art) of letters', from gramma, grammat- 'letter of the alphabet, thing written'.”

. It only works for dictionary headwords

The headword is the word being defined or translated.

, so you may need to use the Lemmatron

Lemma is a general term for any headword, phrase, or other form that can be looked up.

E.g. ‘act’, ‘acting’, ‘act up’, ‘get one’s act together’ are all lemmas.

first if your input is likely to be an inflected

An inflection is a change in the form of a word to express a grammatical function such as tense, mood, person, number, case, or gender.

Example: ‘foxes’ is an inflected form of ‘fox’.

form (e.g., 'swimming'). This would return the linked headword

The headword is the word being defined or translated.

(e.g., 'swim') which you can then use in the Entries endpoint. Unless specified using a region filter, the default lookup will be the Oxford Dictionary of English (GB).

/entries/{source_lang}/{word_id}/regions={region}:

USe this filter to restrict the lookup to either our Oxford Dictionary of English (GB) or New Oxford American Dictionary (US).

/entries/{source_lang}/{word_id}/{filters}:

Use filters to limit the entry

A complete account of a particular word. This can include a word’s senses, definitions, translations, origin, and any phrases featuring the word.

information that is returned. For example, you may only require definitions and not everything else, or just pronunciations

The way in which a word is pronounced.

We generally give pronunciations both as sound files and in a phonetic spelling.

E.g. through “Pronunciation: /θruː/”

. The full list of filters can be retrieved from the filters Utility endpoint. You can also specify values within the filter using '='. For example 'grammaticalFeatures=singular'. Filters can also be combined using a semicolon.

/search/{source_search_language}/translations={target_search_language}:

Use this to find matches in our translation dictionaries.

/entries/{source_translation_language}/{word_id}/translations={target_translation_language}:

Use this to return translations for a given word. In the event that a word in the dataset does not have a direct translation, the response will be a definition

A complete account of a particular word. This can include a word’s senses, definitions, translations, origin, and any phrases featuring the word.

in the target language.

/wordlist/{source_lang}/{filters_basic}:

Use this to retrieve a list of words

A wordlist is a group of words which share a common feature (e.g. all nouns, all words related to cricket, all words labelled as archaic).

for particular domain

Domain labels give the subject area of a word or sense (e.g. Music, Computing, Politics).

E.g. ‘cardiogram’ has the domain class “Medicine”.

, lexical category

The linguistic category of a word, e.g. the part of speech (‘noun’, ‘verb’, ‘adjective’ etc.), or other category (‘abbreviation’, ‘symbol’ etc.).

, register

Register labels tell us the linguistic level of a word of sense. This includes the formality of a word or sense (e.g. formal, informal), its typical context (e.g. technical, literary), and whether it is taboo in some contexts (e.g. vulgar slang, offensive).

Example: ‘prithee’ has the register “archaic”.

and/or region

Region labels tell us what geographical region a word or sense is used in (e.g. British, North American, Irish, Latin American).

Example: ‘billabong’ has the region “Australian”.

. View the full list of possible filters using the filters Utility endpoint. The response only includes headwords

The headword is the word being defined or translated.

, not all their possible inflections

An inflection is a change in the form of a word to express a grammatical function such as tense, mood, person, number, case, or gender.

Example: ‘foxes’ is an inflected form of ‘fox’.

. If you require a full wordlist

A wordlist is a group of words which share a common feature (e.g. all nouns, all words related to cricket, all words labelled as archaic).

including inflected forms

An inflection is a change in the form of a word to express a grammatical function such as tense, mood, person, number, case, or gender.

Example: ‘foxes’ is an inflected form of ‘fox’.

, contact us and we can help.

/entries/{source_language}/{word_id}/sentences:

Use this to retrieve sentences extracted from corpora which show how a word is used in the language. This is available for English and Spanish. For English, the sentences are linked to the correct sense

A sense is a particular meaning of a word.

Example: the word ‘mouse’ has the following senses:

1) A small rodent that typically has a pointed snout, relatively large ears and eyes, and a long tail.

2) A small handheld device which is moved across a mat or flat surface to move the cursor on a computer screen.

of the word in the dictionary. In Spanish, they are linked at the headword

The headword is the word being defined or translated.

level.

/stats/frequency/word/{source_lang}/:

This endpoint provides the frequency of a given word. When multiple database records match the query parameters, the returned frequency is the sum of the individual frequencies. For example, if the query parameters are lemma=test, the returned frequency will include the verb "test", the noun "test" and the adjective "test" in all forms (Test, tested, testing, etc.)

If you are interested in the frequency of the word "test" but want to exclude other forms (e.g., tested) use the option trueCase=test. Normally, the word "test" will be spelt with a capital letter at the beginning of a sentence. The option trueCase will ignore this and it will count "Test" and "test" as the same token. If you are interested in frequencies of "Test" and "test", use the option wordform=test or wordform=Test. Note that trueCase is not just a lower case of the word as some words are genuinely spelt with a capital letter such as the word "press" in Oxford University Press.

Parameters can be provided in PATH, GET or POST (form or json). The parameters in PATH are overriden by parameters in GET, POST and json (in that order). In PATH, individual options are separated by semicolon and values are separated by commas (where multiple values can be used). Examples:
  • PATH: /lemma=test;lexicalCategory=noun
  • GET: /?lemma=test&lexicalCategory=noun
  • POST (json):

    
    {  
      "lemma": "test",
      "lexicalCategory": "noun"
    }
                                    
One of the options wordform/trueCase/lemma/lexicalCategory has to be provided.

/stats/frequency/words/{source_lang}/:

This endpoint provides a list of frequencies for a given word or words. Unlike the /word/ endpoint, the results are split into the smallest units.

To exclude a specific value, prepend it with the minus sign ('-'). For example, to get frequencies of the lemma 'happy' but exclude superlative forms (i.e., happiest) you could use options 'lemma=happy;grammaticalFeatures=-degreeType:superlative'.

Parameters can be provided in PATH, GET or POST (form or json). The parameters in PATH are overridden by parameters in GET, POST and json (in that order). In PATH, individual options are separated by semicolon and values are separated by commas (where multiple values can be used).

The parameters wordform/trueCase/lemma/lexicalCategory also exist in a plural form, taking a lists of items. Examples:
  • PATH: /wordforms=happy,happier,happiest
  • GET: /?wordforms=happy&wordforms=happier&wordforms=happiest
  • POST (json):
    {
      "wordforms": ["happy", "happier", "happiest"]
    }
    
    A mor complex example of retrieving frequencies of multiple lemmas:
    {
        "lemmas": ["happy", "content", "cheerful", "cheery", "merry", "joyful", "ecstatic"],
        "grammaticalFeatures": {
            "adjectiveFunctionType": "predicative"
        },
        "lexicalCategory": "adjective",
        "sort": ["lemma", "-frequency"]
    }
    
    Some queries with "collate" or "sort" can exceed the 30s timeout, in which case the API will return an error message with status code 503. You mitigate this by providing additional restrictions such as "minFrequency" and "maxFrequency".

    You can use the parameters "offset" and "limit" to paginate through large result sets. For convenience, the HTTP header "Link" is set on the response to provide links to "first", "self", "next", "prev" and "last" pages of results (depending on the context). For example, if the result set contains 50 results and the parameter "limit" is set to 25, the Links header will contain an URL for the first 25 results and the next 25 results.

    Some libraries such as python's requests can parse the header automatically and offer a convenient way of iterating through the results. For example: ```python def get_all_results(url): while url:
      r = requests.get(url)
      r.raise_for_status()
      for item in r.json()['results']:
        yield item
      url = r.links.get('next', {}).get('url')
    

/stats/frequency/ngrams/{source_lang}/{corpus}/{ngram-size}/:

This endpoint returns frequencies of ngrams of size 1-4. That is the number of times a word (ngram size = 1) or words (ngram size > 1) appear in the corpus. Ngrams are case sensitive ("I AM" and "I am" will have different frequency) and frequencies are calculated per word (true case) so "the book" and "the books" are two different ngrams. The results can be filtered based on query parameters.

Parameters can be provided in PATH, GET or POST (form or json). The parameters in PATH are overridden by parameters in GET, POST and json (in that order). In PATH, individual options are separated by semicolon and values are separated by commas (where multiple values can be used).

Example for bigrams (ngram of size 2):
  • PATH: /tokens=a word,another word
  • GET: /?tokens=a word&tokens=another word
  • POST (json):

      {
          "tokens": ["a word", "another word"]
      }
    
Either "tokens" or "contains" has to be provided.

Some queries with "contains" or "sort" can exceed the 30s timeout, in which case the API will return an error message with status code 503. You mitigate this by providing additional restrictions such as "minFrequency" and "maxFrequency".

You can use the parameters "offset" and "limit" to paginate through large result sets. For convenience, the HTTP header "Link" is set on the response to provide links to "first", "self", "next", "prev" and "last" pages of results (depending on the context). For example, if the result set contains 50 results and the parameter "limit" is set to 25, the Links header will contain an URL for the first 25 results and the next 25 results.

Some libraries such as python's requests can parse the header automatically and offer a convenient way of iterating through the results. For example: python def get_all_results(url): while url: r = requests.get(url) r.raise_for_status() for item in r.json()['results']: yield item url = r.links.get('next', {}).get('url')

/languages:

Returns a list of monolingual and bilingual language datasets available in the API

/filters:

Returns a list of all the valid filters to construct API calls.

/filters/{endpoint}:

Returns a list of all the valid filters for a given endpoint to construct API calls.

/domains/{source_language}:

Returns a list of the available domains

Domain labels give the subject area of a word or sense (e.g. Music, Computing, Politics).

E.g. ‘cardiogram’ has the domain class “Medicine”.

for a given monolingual language dataset.

/domains/{source_domains_language}/{target_domains_language}:

Returns a list of the available domains

Domain labels give the subject area of a word or sense (e.g. Music, Computing, Politics).

E.g. ‘cardiogram’ has the domain class “Medicine”.

for a given bilingual language dataset.
Swagger docs