https://indian-quotes-api.vercel.app/api
id
: Unique identifier (number)created_at
: Creation timestamp (ISO 8601)quote
: The actual quote text (string)tags
: Array of related tags (string[])author_id
: Reference to author (number)author
: Nested author objectid
: Unique identifier (number)img
: Profile image URL (string)url
: Author's website/profile (string)name
: Full name (string)slug
: URL-friendly name (string)company_id
: Reference to company (number)company
: Nested company objectid
: Unique identifier (number)url
: Company website (string)name
: Company name (string)slug
: URL-friendly name (string)created_at
: Creation timestamp (ISO 8601)All API endpoints are rate-limited to 100 requests per minute per IP address. Rate limit information is included in the response headers:
X-RateLimit-Limit
: Requests allowed per windowX-RateLimit-Remaining
: Requests remaining in windowX-RateLimit-Reset
: Time when the rate limit resets/quotes
Get a paginated list of quotes with optional filters.
page
: Page number (default: 1)limit
: Items per page (default: 10, max: 100)author
: Filter by author namecompany
: Filter by company nametags
: Filter by tag// Example: Get quotes from Ratan Tata const response = await fetch('https://indian-quotes-api.vercel.app/api/quotes?author=Ratan%20Tata'); const data = await response.json(); console.log(data); /* Output: { "data": [{ "id": 1, "created_at": "2024-11-03T18:17:23.851778+00:00", "quote": "If there is doubt, there is no doubt.", "tags": [ "mindset" ], "author_id": 1, "author": { "id": 1, "img": "https://media.licdn.com/dms/image/v2/C4D03AQGutmmcvCLUvw/profile-displayphoto-shrink_400_400/profile-displayphoto-shrink_400_400/0/1632475772897?e=1736380800&v=beta&t=fZ1joSw_nh5Q5t80xTWxw8dT8zMTANYSGG4FP1uLOuI", "url": "https://www.linkedin.com/in/sachinbansal/", "name": "Sachin Bansal", "company": { "id": 1, "url": "https://www.flipkart.com/", "name": "Flipkart", "created_at": "2024-11-03T18:19:00.732254+00:00" }, "company_id": 1, "created_at": "2024-11-03T17:37:46.864463+00:00" } }], "pagination": { "page": 1, "pageSize": 10, "totalPages": 5, "totalItems": 42 } } */
/quotes/{id}
Get a specific quote by ID.
// Example: Get quote with ID 1 const response = await fetch('https://indian-quotes-api.vercel.app/api/quotes/1'); const data = await response.json(); console.log(data); /* Output: { "id": 1, "created_at": "2024-11-03T18:17:23.851778+00:00", "quote": "If there is doubt, there is no doubt.", "tags": [ "mindset" ], "author_id": 1, "author": { "id": 1, "img": "https://media.licdn.com/dms/image/v2/C4D03AQGutmmcvCLUvw/profile-displayphoto-shrink_400_400/profile-displayphoto-shrink_400_400/0/1632475772897?e=1736380800&v=beta&t=fZ1joSw_nh5Q5t80xTWxw8dT8zMTANYSGG4FP1uLOuI", "url": "https://www.linkedin.com/in/sachinbansal/", "name": "Sachin Bansal", "company": { "id": 1, "url": "https://www.flipkart.com/", "name": "Flipkart", "created_at": "2024-11-03T18:19:00.732254+00:00" }, "company_id": 1, "created_at": "2024-11-03T17:37:46.864463+00:00" } } */
/quotes/random
Get a random quote.
// Example: Get a random quote const response = await fetch('https://indian-quotes-api.vercel.app/api/quotes/random'); const data = await response.json(); console.log(data); /* Output: { "id": 1, "created_at": "2024-11-03T18:17:23.851778+00:00", "quote": "If there is doubt, there is no doubt.", "tags": [ "mindset" ], "author_id": 1, "author": { "id": 1, "img": "https://media.licdn.com/dms/image/v2/C4D03AQGutmmcvCLUvw/profile-displayphoto-shrink_400_400/profile-displayphoto-shrink_400_400/0/1632475772897?e=1736380800&v=beta&t=fZ1joSw_nh5Q5t80xTWxw8dT8zMTANYSGG4FP1uLOuI", "url": "https://www.linkedin.com/in/sachinbansal/", "name": "Sachin Bansal", "company": { "id": 1, "url": "https://www.flipkart.com/", "name": "Flipkart", "created_at": "2024-11-03T18:19:00.732254+00:00" }, "company_id": 1, "created_at": "2024-11-03T17:37:46.864463+00:00" } } */
The API uses conventional HTTP response codes to indicate the success or failure of requests:
200
: Success400
: Bad Request - Invalid parameters404
: Not Found - Resource doesn't exist429
: Too Many Requests - Rate limit exceeded500
: Internal Server Error