quotifyapi
v1.2.0
Published
A beautiful, fast, and reliable quote API with comprehensive documentation
Maintainers
Readme
💬 Quotify API
A beautiful, fast, and reliable quote API that provides inspirational quotes across multiple categories. Built with Express.js and designed for performance, it's perfect for developers building applications that need motivational content.
⚠️ Important Copyright Notice
Quotify API does not own, create, or claim ownership of any quotes provided through this service. All quotes are the intellectual property of their respective authors, creators, and copyright holders. This API serves as a collection and distribution platform only.
Please respect the original authors' rights and ensure proper attribution when using these quotes in your applications.
✨ Features
- 🚀 Fast & Reliable - Built with Express.js and optimized for performance
- 🛡️ Secure - Rate limiting, security headers, and abuse protection
- 📚 Rich Content - Multiple categories: happy, sad, love, motivational, wisdom
- 🌐 Easy Integration - Simple REST API with comprehensive documentation
- 📱 Responsive Design - Beautiful documentation website included
- 🎯 CLI Tool - Command-line interface for quick access
- 📊 Statistics - Detailed quote counts and category information
🚀 Quick Start
Install as NPM Package
npm install quotifyapiUse in Your Code
const { getRandomQuote, getRandomQuoteByType } = require('quotifyapi');
// Get a random quote from any category
const randomQuote = getRandomQuote();
console.log(randomQuote.text); // "Life is what happens when you're busy making other plans."
console.log(randomQuote.author); // "John Lennon"
// Get a motivational quote
const motivationalQuote = getRandomQuoteByType('motivational');
console.log(motivationalQuote.text); // "The only way to do great work is to love what you do."CLI Usage
# Get a random quote
npx quotifyapi random
# Get a specific category
npx quotifyapi type motivational
npx quotifyapi type love
# Show available categories
npx quotifyapi types
# Show statistics
npx quotifyapi stats
# Get help
npx quotifyapi help🌐 API Endpoints
Base URL
https://quotifyapi.vercel.appGet Random Quote
GET /apiResponse:
{
"quote": {
"text": "Life is what happens when you're busy making other plans.",
"author": "John Lennon"
},
"type": "random",
"timestamp": "2025-01-15T10:30:00.000Z"
}Get Quote by Category
GET /api?type=motivationalAvailable Categories:
happy- Uplifting and joyful quotessad- Thoughtful and reflective quoteslove- Romantic and affectionate quotesmotivational- Inspirational and encouraging quoteswisdom- Philosophical and insightful quotes
Get Available Categories
GET /api/typesResponse:
{
"availableTypes": ["happy", "sad", "love", "motivational", "wisdom"],
"total": 5
}Get Statistics
GET /api/statsResponse:
{
"message": "Quote statistics by category",
"counts": {
"happy": 25,
"sad": 20,
"love": 30,
"motivational": 35,
"wisdom": 15,
"total": 125
}
}🛡️ Rate Limits
To ensure fair usage and protect against abuse, the following rate limits are enforced:
- General Requests: 1,000 requests per 15 minutes
- API Endpoints: 500 requests per 15 minutes
- Strict Limit: 50 requests per minute (additional protection)
Rate Limit Headers
The API includes rate limit information in response headers:
RateLimit-Limit- Maximum requests per windowRateLimit-Remaining- Remaining requests in current windowRateLimit-Reset- Time when the rate limit resets
🏗️ Installation & Setup
Option 1: Use as NPM Package (Recommended)
npm install quote-apiOption 2: Self-Hosted
# Clone the repository
git clone https://github.com/tanishq-sa/Quotifyapi
cd quotifyapi
# Install dependencies
npm install
# Start the server
npm start
# For development with auto-reload
npm run devThe API will be available at https://quotifyapi.vercel.app
📚 Documentation Website
A beautiful, interactive documentation website is included and automatically served at the root URL when you run the server. Features include:
- 📖 Comprehensive API documentation
- 🧪 Interactive API tester
- 💻 Code examples in multiple languages
- 📱 Responsive design
- 🎨 Modern dark theme
- ⌨️ Keyboard shortcuts
Visit https://quotifyapi.vercel.app to explore the documentation.
🔧 Configuration
Environment Variables
PORT=3000 # Server port (default: 3000)
NODE_ENV=production # Environment modeCustomization
You can easily add your own quotes by editing the files in the quotes/ directory:
// quotes/custom.js
module.exports = [
{
text: "Your custom quote here",
author: "Your Name"
}
// ... more quotes
];Then update quotes.js to include your new category.
🚀 Deployment
Vercel (Recommended)
The project includes vercel.json for easy deployment to Vercel:
npm install -g vercel
vercelOther Platforms
The API works on any Node.js hosting platform:
- Heroku
- Railway
- DigitalOcean App Platform
- AWS Lambda (with serverless framework)
📦 Package Structure
quotifyapi/
├── server.js # Express server
├── quotes.js # Quote management functions
├── cli.js # Command-line interface
├── quotes/ # Quote data files
│ ├── happy.js
│ ├── sad.js
│ ├── love.js
│ ├── motivational.js
│ └── wisdom.js
├── public/ # Documentation website
│ ├── index.html
│ └── script.js
├── package.json
├── README.md
└── vercel.json🤝 Contributing
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Adding Quotes
To add new quotes:
- Add your quotes to the appropriate category file in
quotes/ - Follow the existing format:
{ text: "Quote text", author: "Author name" } - Submit a pull request
Adding Categories
To add new quote categories:
- Create a new file in
quotes/(e.g.,quotes/philosophy.js) - Update
quotes.jsto include your new category - Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Express.js - Web framework
- Inter Font - Beautiful typography
- Prism.js - Syntax highlighting
- Community - For inspiration and feedback
📞 Support
- 🐛 Issues: GitHub Issues
- 📖 Documentation: API Docs
- 💬 Discussions: GitHub Discussions
🌟 Star History
Made with ❤️ by Tanishq Saini
If this project helps you, please give it a ⭐️!
