Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sumansourabh14/recite
API about quote from books
https://github.com/sumansourabh14/recite
api books express nodejs quotes rest-api
Last synced: 2 months ago
JSON representation
API about quote from books
- Host: GitHub
- URL: https://github.com/sumansourabh14/recite
- Owner: Sumansourabh14
- Created: 2023-06-29T14:55:03.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-01T11:11:02.000Z (3 months ago)
- Last Synced: 2024-11-01T12:18:51.845Z (3 months ago)
- Topics: api, books, express, nodejs, quotes, rest-api
- Language: JavaScript
- Homepage: https://recite.onrender.com
- Size: 1.21 MB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Recite cover with a black gradient background and two quote icons](./images/recite-v1.png)
# Recite
Recite is a FREE and open source API that contains amazing quotes from books (fiction/non-fiction).
## Why I created this API?
I wanted to use quotes from books in my Next.js project just like how Goodreads has so many quotes. But I couldn't find a good API for this. There are various APIs that give famous quotes said by authors or important people but that wasn't satisfying my use case. Hence, I created an API of my own.
## API Root URL
```
https://recite.onrender.com/api/v1
```## Rate Limit
There is a rate limit of 250 requests per minute. If you exceed the rate limit, the API will respond with a
429
error.## API Response Example
```JavaScript
{
"_id": "65cd071ec2f3eed99da6a22c",
"quote": "She burned too bright for this world.",
"book": "Wuthering Heights",
"author": "Emily Bronte",
"length": 37,
"words": 7,
"createdAt": "2024-02-14T18:31:58.112Z",
"updatedAt": "2024-02-14T18:31:58.112Z",
"__v": 0
}
```## API Reference
- [Recite](#recite)
- [Why I created this API?](#why-i-created-this-api)
- [API Root URL](#api-root-url)
- [Rate Limit](#rate-limit)
- [API Response Example](#api-response-example)
- [API Reference](#api-reference)
- [Get random quote](#get-random-quote)
- [Response](#response)
- [Get all quotes](#get-all-quotes)
- [Response](#response-1)
- [Search quotes](#search-quotes)
- [Response](#response-2)
- [Contribution](#contribution)## Get random quote
```
GET /random
```Returns a single random quote.
[Try in your browser](https://recite.onrender.com/api/v1/random)### Response
```JavaScript
{
_id: string,
// the actual quote from the book
quote: string,
// name of the book
book: string,
// name of the author
author: string,
// length of the quote
length: number,
// total words in the quote
words: number,
// date and time of first published
createdAt: string,
// date and time of update (if any)
updatedAt: string
}
```## Get all quotes
```
GET /quotes
```Returns all the quotes.
[Try in your browser](https://recite.onrender.com/api/v1/quotes)### Response
```JavaScript
{
success: true
// total number of quotes
total: number,
// The array of quotes
quotes: [
{
_id: string,
// the actual quote from the book
quote: string,
// name of the book
book: string,
// name of the author
author: string,
// length of the quote
length: number,
// total words in the quote
words: number,
// date and time of first published
createdAt: string,
// date and time of update (if any)
updatedAt: string
}
]
}
```## Search quotes
```
GET /quotes/search?query=
```Returns all the relevant quotes that match the search query.
[Try in your browser](https://recite.onrender.com/api/v1/quotes/search?query=life)### Response
```JavaScript
{
success: true
// total number of quotes
total: number,
// The array of quotes
quotes: [
{
_id: string,
// the actual quote from the book
quote: string,
// name of the book
book: string,
// name of the author
author: string,
// length of the quote
length: number,
// total words in the quote
words: number,
// date and time of first published
createdAt: string,
// date and time of update (if any)
updatedAt: string
}
]
}
```More info: [Medium article](https://medium.com/@sumsourabh14/introducing-recite-a-free-api-for-book-quotes-138dca77f7da)
[def]: #recite
## Contribution
- Feel free to post any quote by creating an issue for it.
- Want to improve this REST API? Create an issue and contribute!