π‘Random Quotes
Get Random Quotes from Quotable is a free, open source quotations API.
Quotable - https://github.com/lukePeavey/quotable
Quotable is a free, open source quotations API. It was originally built as part of a FreeCodeCamp project. If you are interested in contributing, please check out the Contributors Guide.
Rate Limit
There is a rate limit of 180 requests per minute, per IP address. If you exceed the rate limit, the API will respond with a 429
error.
API Servers
Postman
You can try out the API on our public Postman workspace.
API Reference
Get random quote
Get Random Quotes
List Quotes
Get Quote By ID
List Authors
Search Quotes (beta)
Search Authors (beta)
Get Author By Slug
List Tags
Examples
Get random quote
Returns a single random quote from the database
βοΈ This method is deprecated in favor of Get Random Quotes
Query parameters
Response
Get Random Quotes
Get one or more random quotes from the database. This method supports several filters that can be used to get random quotes with specific properties (ie tags, quote length, etc.)
By default, this methods returns a single random quote. You can specify the number of random quotes to return via the limit
parameter.
β οΈ This method is equivalent to the
/random
endpoint. The only difference is the response format: Instead of retuning a singleQuote
object, this method returns anArray
ofQuote
objects.
Response
Examples
Get random quote try in browser
Get 5 random quotes try in browser
Random Quote with tags "technology" AND
"famous-quotes" try in browser
Random Quote with tags "History" OR
"Civil Rights" try in browser
Random Quote with a maximum length of 50 characters try in browser
Random Quote with a length between 100 and 140 characters try in browser
List Quotes
Get all quotes matching a given query. By default, this will return a paginated list of all quotes, sorted by _id
. Quotes can also be filter by author, tag, and length.
Query parameters
Response
Examples
Get the first page of quotes, with 20 results per page try in browser
Get the second page of quotes, with 20 results per page try in browser
Get all quotes with the tags love
OR
happiness
try in browser
Get all quotes with the tags technology
AND
famous-quotes
try in browser
Get all quotes by author, using the author's slug
. try in browser
Get Quote By ID
Get a quote by its ID
Response
List Authors
Get all authors matching the given query. This endpoint can be used to list authors, with several options for sorting and filter. It can also be used to get author details for one or more specific authors, using the author slug or ids.
Query parameters
Response
Examples
Get all authors, sorted alphabetically by name try in browser
Get all authors, sorted by number of quotes in descending order try in browser
Get a single author by slug. try in browser
Get multiple authors by slug. In this case, you provide a pipe-separated list of slugs try in browser
Search Quotes (beta)
This endpoint allows you to search for quotes by keywords, content, and/or author name. Unlike the List Quotes endpoint, this method is powered by Atlas Search and is designed to power a search bar UI.
Search results are sorted by score
The query can be wrapped in quotes to search for an exact phrase. In this case, results will only include quotes that match the query exactly.
Supports fuzzy search (optional). This allows for minor typos and misspelling in the search query. For more info on how this works, refer to the Atlas docs
Query Params
Response
Examples
Search for "every good technology is basically magic" (try in browser)
Results:
"Any sufficiently advanced technology is equivalent to magic."
Search for the phrase "divided house"
Results
"A house divided against itself cannot stand."
Search for quotes with the keywords "life" or "happiness" (try in browser)
Search for quotes by an author named "kennedy" (try in browser)
Search Authors (beta)
This endpoint allows you search for authors by name. It is designed to power a search bar for authors that displays autocomplete suggests as the user types.
Powered by Atlas Search.
Real autocomplete
Results are sorted by score
Parses the query into "terms". Things like initials, prefixes, suffixes, and stopwords are not considered search terms. They will still impact the score of a result, but are not required to match.
Query Parameters
Response
Examples
Search for author named "Einstein" (try in browser)
Results:
Albert Einstein
Autocomplete search for "Einstein" (try in browser)
Results:
Albert Einstein
Search for "John Adams" (try in browser)
Results
John Adams
John Quincy Adams
Search for "John Quincy Adams" (try in browser)
Results:
John Quincy Adams)
John Adams
Get Author By Slug
Get a single Author
by slug
. This method can be used to get author details such as bio, website link, and profile image.
If you want to get all quotes by a specific author, use the /quotes endpoint and filter by author author name/slug.
If you want to get multiple authors by slug in a single request, use the /authors endpoint and filter by slug
.
Response
List Tags
Get a list of all tags
Query parameters
Response
Last updated