https://github.com/sh20raj/opendictionaryapi
A free, open-source API for accessing word definitions, synonyms, antonyms, and more. Perfect for developers and language enthusiasts.
https://github.com/sh20raj/opendictionaryapi
dictionary dictionary-api
Last synced: 5 months ago
JSON representation
A free, open-source API for accessing word definitions, synonyms, antonyms, and more. Perfect for developers and language enthusiasts.
- Host: GitHub
- URL: https://github.com/sh20raj/opendictionaryapi
- Owner: SH20RAJ
- License: mit
- Created: 2024-12-20T14:41:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-26T05:47:58.000Z (over 1 year ago)
- Last Synced: 2025-01-25T05:05:04.665Z (about 1 year ago)
- Topics: dictionary, dictionary-api
- Language: Python
- Homepage: https://sh20raj.github.io/OpenDictionaryAPI/
- Size: 1.75 MB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenDictionaryAPI 🌟📚
[](https://opensource.org/licenses/MIT)
[](#contributing)
[](https://github.com/SH20RAJ/OpenDictionaryAPI/issues)
[](https://github.com/SH20RAJ/OpenDictionaryAPI/fork)
[](https://github.com/SH20RAJ/OpenDictionaryAPI/stargazers)
[](https://www.npmjs.com/package/opendictionaryapi)
[](https://visitorbadge.io/status?path=https%3A%2F%2Fgithub.com%2FSH20RAJ%2FOpenDictionaryAPI)
**OpenDictionaryAPI** is a free and open-source API that provides access to word definitions, synonyms, antonyms, pronunciations, and more. 🧑💻 Perfect for developers and language enthusiasts who want to integrate dictionary data into their applications. 🚀
---
## Features 🌟
- 📖 **Word Definitions**: Accurate and detailed meanings for words.
- 🔄 **Synonyms and Antonyms**: Explore related words and opposites.
- 🎧 **Pronunciations**: Access audio pronunciations to improve your skills.
- 🌍 **Multiple Languages**: Look up words in different languages.
- ⚡ **Fast & Reliable**: Built to deliver fast and consistent responses.
---
## Installation & Usage (NPM) 🚀
Install the package from [npm](https://www.npmjs.com/package/opendictionaryapi):
```bash
npm i opendictionaryapi
```
### Example Usage:
```javascript
const OpenDictionaryAPI = require("opendictionaryapi");
OpenDictionaryAPI.search('hi', 'en')
.then(results => {
console.log(results);
})
.catch(error => {
console.log(error);
});
```
### Results Example:
```json
[
{
"word": "hello",
"phonetics": [
{
"audio": "https://api.dictionaryapi.dev/media/pronunciations/en/hello-au.mp3",
"sourceUrl": "https://commons.wikimedia.org/w/index.php?curid=75797336",
"license": {
"name": "BY-SA 4.0",
"url": "https://creativecommons.org/licenses/by-sa/4.0"
}
}
],
"meanings": [
{
"partOfSpeech": "noun",
"definitions": [
{
"definition": "\"Hello!\" or an equivalent greeting."
}
]
}
],
"sourceUrls": [
"https://en.wiktionary.org/wiki/hello"
]
}
]
```
### Error Example:
```json
{
"title": "No Definitions Found",
"message": "Sorry pal, we couldn't find definitions for the word you were looking for.",
"resolution": "You can try the search again at a later time or head to the web instead."
}
```
---
## Direct API Usage 🔗
You can also directly fetch word data via the URL:
```plaintext
https://www.jsdelivr.com/package/gh/SH20RAJ/OpenDictionaryAPI/data/english/{word}.json
```
### Example:
Fetch data for the word "hello":
```plaintext
https://cdn.jsdelivr.net/gh/SH20RAJ/OpenDictionaryAPI/data/english/hello.json
```
---
## Installation & Development 🛠️
1. Clone the repository:
```bash
git clone https://github.com/SH20RAJ/OpenDictionaryAPI.git
```
2. Install dependencies:
```bash
npm install
```
3. Run the server:
```bash
npm start
```
---
## Contributing 🤝
We welcome contributions from the community! 🛠️ To get started:
1. Fork the repository.
2. Create a new branch: `git checkout -b feature-name`.
3. Commit your changes: `git commit -m "Added new feature"`.
4. Push to your branch: `git push origin feature-name`.
5. Submit a pull request. 🎉
---
## License 📝
This project is licensed under the [MIT License](LICENSE).
---
## Contact ✉️
For questions or support, please reach out via [Issues](https://github.com/SH20RAJ/OpenDictionaryAPI/issues).
---
⭐ **If you find this project helpful, give it a star!** ⭐