API Documentation

quotes.brendenvogt.com can be used as an API for fetching a random quote, a specific quote, or searching for quotes in a variety of formats.

Calling the API

Authentication

No authentication is required to use the quotes.brendenvogt.com API. Enjoy :)

API response format

All API endpoints follow their respective browser URLs, but we adjust the response formatting to be more suited for an API based on the provided HTTP Accept header.

Accepted Accept headers:

  • text/html - HTML response (default response format)
  • application/json - JSON response
  • text/plain - Plain text response

Note: Requests made via curl which do not set an Accept header will respond with text/plain by default.

Custom user agent

If you intend on using the quotes.brendenvogt.com API we kindly ask that you set a custom User-Agent header for all requests.

Setting a custom User-Agent header for your code will help us be able to better monitor the usage of the API and identify potential bad actors.

A good user agent should include the name of the library or website that is accessing the API along with a URL/e-email where someone can be contacted regarding the library/website.

For example:
curl -H "User-Agent: My Library (https://github.com/username/repo)" https://quotes.brendenvogt.com/

Endpoints

Fetch a random quote

GET https://quotes.brendenvogt.com/apifetch a random quote.

Fetching a random quote as JSON:

$ curl -H "Accept: application/json" https://quotes.brendenvogt.com/api
curl -H "Accept: application/json" https://quotes.brendenvogt.com/api
{
  "id": "q001",
  "quote": "Success is not final, failure is not fatal: It is the courage to continue that counts.",
  "author": "Winston Churchill",
  "status": 200
}

Fetching a random quote as text:

$ curl -H "Accept: text/plain" https://quotes.brendenvogt.com/api
curl -H "Accept: text/plain" https://quotes.brendenvogt.com/api
Success is not final, failure is not fatal: It is the courage to continue that counts.

Fetch a quote

GET https://quotes.brendenvogt.com/api/q/<quote_id>fetch a specific quote.

Fetching a quote as JSON:

$ curl -H "Accept: application/json" https://quotes.brendenvogt.com/api/q/q001
curl -H "Accept: application/json" https://quotes.brendenvogt.com/api/q/q001
{
  "id": "q001",
  "quote": "Success is not final, failure is not fatal: It is the courage to continue that counts.",
  "author": "Winston Churchill",
  "status": 200
}

Fetching a quote as text:

$ curl -H "Accept: text/plain" https://quotes.brendenvogt.com/api/q/q001
curl -H "Accept: text/plain" https://quotes.brendenvogt.com/api/q/q001
Success is not final, failure is not fatal: It is the courage to continue that counts.

Search for quotes

GET https://quotes.brendenvogt.com/api/searchsearch for quotes.

This endpoint accepts the following optional query string parameters:

  • term - search term to use (searches both quote text and author names)
  • page - which page of results to fetch (default: 1)
  • limit - number of results to return per page (default: 20) (max: 30)
Search Behavior:
  • No term: Returns all quotes (paginated)
  • With term: Searches quote text and author names (case-insensitive)
  • Examples: "success", "einstein", "failure", "motivation"

Receive search results back as JSON (with search term):

$ curl -H "Accept: application/json" "https://quotes.brendenvogt.com/api/search?term=motivation"
curl -H "Accept: application/json" "https://quotes.brendenvogt.com/api/search?term=motivation"
{
  "current_page": 1,
  "limit": 20,
  "next_page": 1,
  "previous_page": 1,
  "results": [
    {
      "id": "q015",
      "quote": "Chase the vision, not the money. The money will end up following you.",
      "author": "Tony Hsieh"
    },
    {
      "id": "q010",
      "quote": "Do one thing every day that scares you.",
      "author": "Eleanor Roosevelt"
    },
    {
      "id": "q011",
      "quote": "All progress takes place outside the comfort zone.",
      "author": "Michael John Bobak"
    }
  ],
  "search_term": "motivation",
  "status": 200,
  "total_quotes": 3,
  "total_pages": 1
}

Receive search results back as text (with search term):

$ curl -H "Accept: text/plain" "https://quotes.brendenvogt.com/api/search?term=failure"
curl -H "Accept: text/plain" "https://quotes.brendenvogt.com/api/search?term=failure"
Success is not final, failure is not fatal: It is the courage to continue that counts.
Do not be embarrassed by your failures, learn from them and start again.

Search by keyword in quote text:

$ curl -H "Accept: application/json" "https://quotes.brendenvogt.com/api/search?term=success"
curl -H "Accept: application/json" "https://quotes.brendenvogt.com/api/search?term=success"
{
  "current_page": 1,
  "limit": 20,
  "next_page": 1,
  "previous_page": 1,
  "results": [
    {
      "id": "q001",
      "quote": "Success is not final, failure is not fatal: It is the courage to continue that counts.",
      "author": "Winston Churchill"
    },
    {
      "id": "q018",
      "quote": "Success is how high you bounce when you hit bottom.",
      "author": "George S. Patton"
    }
  ],
  "search_term": "success",
  "status": 200,
  "total_quotes": 2,
  "total_pages": 1
}

Search by author name:

$ curl -H "Accept: application/json" "https://quotes.brendenvogt.com/api/search?term=Einstein"
curl -H "Accept: application/json" "https://quotes.brendenvogt.com/api/search?term=Einstein"
{
  "current_page": 1,
  "limit": 20,
  "next_page": 1,
  "previous_page": 1,
  "results": [
    {
      "id": "q007",
      "quote": "In the middle of every difficulty lies opportunity.",
      "author": "Albert Einstein"
    },
    {
      "id": "q019",
      "quote": "A person who never made a mistake never tried anything new.",
      "author": "Albert Einstein"
    }
  ],
  "search_term": "Einstein",
  "status": 200,
  "total_quotes": 2,
  "total_pages": 1
}

Search with pagination:

$ curl -H "Accept: application/json" "https://quotes.brendenvogt.com/api/search?term=life&page=2&limit=5"
curl -H "Accept: application/json" "https://quotes.brendenvogt.com/api/search?term=life&page=2&limit=5"

Note: This searches for quotes containing "life" and returns page 2 with 5 results per page.

Usage Examples

JavaScript/Fetch

fetch('https://quotes.brendenvogt.com/api', {
  headers: {
    'Accept': 'application/json',
    'User-Agent': 'MyApp/1.0'
  }
})
.then(response => response.json())
.then(data => console.log(data))

Python/Requests

import requests

response = requests.get(
    'https://quotes.brendenvogt.com/api',
    headers={
        'Accept': 'application/json',
        'User-Agent': 'MyApp/1.0'
    }
)
print(response.json())

Node.js/Axios

const axios = require('axios');

axios.get('https://quotes.brendenvogt.com/api', {
  headers: {
    'Accept': 'application/json',
    'User-Agent': 'MyApp/1.0'
  }
})
.then(response => console.log(response.data))

PHP/cURL

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 
  'https://quotes.brendenvogt.com/api');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
  'Accept: application/json',
  'User-Agent: MyApp/1.0'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;

Rate Limits & Fair Use

Currently, there are no strict rate limits on the API. However, we ask that you use the API responsibly:

  • • Don't make excessive requests (more than 100 requests per minute)
  • • Always set a proper User-Agent header
  • • Cache responses when possible to reduce load
  • • Be respectful of the service and other users

Support & Contact

If you have questions, suggestions, or run into issues with the API, feel free to reach out: