A simple, open-source API for retrieving inspirational quotes in multiple languages and categories. Built with Hono and TypeScript, designed for serverless/edge environments (e.g., Cloudflare Workers).
- Get random quotes in English, Hindi, Kannada, Malayalam, Tamil, and Telugu
- Filter quotes by language and category
- Rate limiting and CORS support
- Easy to contribute new quotes or languages
- Node.js (v18+ recommended)
- npm or yarn
# Clone the repository
$ git clone https://github.com/your-username/quotes-fusion.git
$ cd quotes-fusion
# Install dependencies
$ npm install# Start the development server (using wrangler for Cloudflare Workers)
$ npx wrangler devAll responses follow this structure:
{
"status": true,
"data": <result>,
"error": null
}If an error occurs, status is false, data is null, and error contains a message.
GET /quote
Example Response:
{
"status": true,
"data": {
"quote": "goal fail grow success yourself never journey",
"category": "Spirituality",
"language": "English"
},
"error": null
}GET /languages
Example Response:
{
"status": true,
"data": ["english", "hindi", "kannada", "malayalam", "tamil", "telugu"],
"error": null
}GET /categories/:language
Example: /categories/english
Example Response:
{
"status": true,
"data": ["Spirituality", "Career", "Failure", ...],
"error": null
}GET /quote/:language
Example: /quote/hindi
Example Response:
{
"status": true,
"data": {
"quote": "...",
"category": "...",
"language": "Hindi"
},
"error": null
}GET /quote/:language/:category
Example: /quote/english/Spirituality
Example Response:
{
"status": true,
"data": {
"quote": "...",
"category": "Spirituality",
"language": "English"
},
"error": null
}curl https://your-api-domain/quotecurl https://your-api-domain/languagescurl https://your-api-domain/categories/hindicurl https://your-api-domain/quote/tamilcurl https://your-api-domain/quote/english/CareerContributions are welcome! You can:
- Add new quotes to existing language files in
src/quotes/ - Add a new language by creating a new JSON file in
src/quotes/ - Improve documentation or code
- Fork this repository
- Create a new branch (
git checkout -b feature/your-feature) - Make your changes
- Commit and push (
git commit -am 'Add new feature') - Open a Pull Request
Please ensure your code passes linting and tests before submitting.
This project is open source and available under the MIT License.