Just receive the word, its definition, and its synonyms
Categories
- 322 All Categories
- 3 Language datasets
- 9 News and updates
- 18 API endpoints
- 15 Review my code
- 6 Tutorials and presentations
- 92 Frequently asked questions
- 5 How to get useful technical help
- 2 Member guidelines
- 12 Suggest an improvement
- 58 Report a bug
- 9 Ask the Community: Other
- 54 Ask the Community: Technical and operational questions
- 61 General
Just receive the word, its definition, and its synonyms
Hi. I'm a beginner coder and I am implementing Oxfords API for my first web app in my CS course! I have to first tier in paid version and am trying to narrow my results so I only procure a word's definition and its synonyms. I'm able to get data but it is way too much.
Answers
Hello @dantecostabile
Here you could use the 'fields' parameter (Documentation page> Utility endpoint) to select definitions and synonyms. But it will also depend on the endpoint your are using.
Entries and Words endpoints return all definitions of an entry, but not the synonyms. To retrieve all the synonyms of a given word in English you will need to use Thesaurus endpoint.
Synonyms and definitions are both grouped by sense and subsenses, so you will need to dive into the different levels (LexicalEntry> Entry> sense> subsense) to get the information.
To get definitions:
https://od-api.oxforddictionaries.com/api/v2/words/en-gb?q=shadow&fields=definitions
To get synonyms:
https://od-api.oxforddictionaries.com/api/v2/thesaurus/en/shadow?fields=synonyms