Skip to content

mcnaveen/Random-Words-API

Repository files navigation

Random Words API

All Contributors

build-test

πŸ¦„ Get Random Words (with pronunciation) for Free using this API

🌍 Languages

  • English
  • Dutch
  • Spanish
  • French
  • Chinese
  • Japanese

πŸš€ API

  • English Random Words - https://random-words-api.vercel.app/word

  • Dutch Random Words - https://random-words-api.vercel.app/word/dutch

  • Spanish Random Words - https://random-words-api.vercel.app/word/spanish

  • French Random Words - https://random-words-api.vercel.app/word/french

  • Chinese Random Words - https://random-words-api.vercel.app/word/chinese

  • Japanese Random Words - https://random-words-api.vercel.app/word/japanese

  • Turkish Random Words - https://random-words-api.vercel.app/word/turkish

  • PWA Demo - Check Here

πŸŽ› Route Options (English Only)

  • Base URL: https://random-words-api.vercel.app/word/english
- /noun
- /sentence
- /question
- /adjective
- /idiom
- /verb
- /letter
- /paragraph
- /vocabulary
- /1-word-quotes
- /2-word-quotes
- /3-word-quotes
- /affirmation

🌐 Sample API Response

  • API: https://random-words-api.vercel.app/word/
  • Method: GET
[
  {
    "word": "Exactor",
    "definition": "One who exacts; extortioner; claimer of rights  ",
    "pronunciation": "Eksaktor"
  }
]

🌐 Sample Dutch Response

  • API: https://random-words-api.vercel.app/word/dutch
  • Method: GET
[
  {
    "word": "Perfect",
    "definition": "Perfect",
    "pronunciation": "Perfekt"
  }
]

πŸ’‘ Learn New word

✨ Installation (Development)

# Clone the Repo
git clone https://github.com/mcnaveen/random-words-api random-words-api

# Cd into Directory
cd random-words

# Install Dependencies
npm install

# Start the Development Server
npm run dev

πŸ”€ Deploying to Heroku

OneClick Deploy on Heroku

Deploy

πŸ”€ Deploying to Vercel

OneClick Deploy on Vercel

Deploy with Vercel

OR

- Fork the Repo - Login to Vercel (https://vercel.com/dashboard) - Click Import
Project - Give Forked Repo URL - Go Live

πŸ” Rate Limit

  • To configure the rate limit, edit the utils/index.js file
  • Look for limiter variable
  • max is the maximum number of requests allowed in a given time window
  • windowMs is the time window in milliseconds
  • message is the message to be returned when the rate limit is exceeded

πŸ˜‡ Add New Language

  • Create a new folder in data with the full language name ex: english
  • Add the words in the words.json file
  • It should be an array of objects with id, word, and definition properties
  • The id should be a unique number for each word
  • The word should be the word in the language
  • The definition should be the definition of the word in English
  • The pronunciation should be the pronunciation of the word in the language (Optional)

❓ How to Contribute?

Make your changes and follow the below instructions. We follow conventional commits.

✍️ Commit

  • Stage all changes
git add .
  • Commit the changes
yarn commit
  • Push the changes to GitHub
git push <TO YOUR FORK>

βš› USED BY

Project Name Demo/Preview Source Code Author
Vue Random Words Demo Source @mskian
Speak & Spell Elm Demo Source @gacallea
Random Words CLI Showcase Source @mcnaveen
Random Words CLI (Deno) Showcase Source @mskian

β˜‘ License

  • MIT

⚠ Disclaimer

We don't own any data or word. All belongs to the owner of Website. Use it for educational purpose only.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


MC Naveen

πŸ› πŸ’» πŸ”£ πŸ“– πŸ’‘ πŸ€” 🚧 πŸ‘€

jonah-butler

πŸ’» πŸ“–

Santhosh Veer

πŸ’» πŸ“– πŸ€” 🚧 πŸ› πŸ‘€

This project follows the all-contributors specification. Contributions of any kind welcome!