Quotable API
api.quotable.io · Developer Tools
Random inspirational and historical quotes. 5,000+ quotes with author, tags, and attribution. No API key required.
Authentication
No authentication requiredFree to use with no key needed.
Sample Requests
GET
Get random quote
Get a random quote.
https://api.quotable.io/random
Hover any highlighted part to learn what it does
curl -X GET "https://api.quotable.io/random"
import requests
response = requests.get(
"https://api.quotable.io/random",
)
print(response.json())const url = 'https://api.quotable.io/random'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.quotable.io/random"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.quotable.io/random")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.quotable.io/random";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET
Filter by tag
Get a random technology quote of at least 50 characters.
https://api.quotable.io/random?tags=technology&minLength=50
Hover any highlighted part to learn what it does
curl -X GET "https://api.quotable.io/random?tags=technology&minLength=50"
import requests
params = {
"tags": "technology",
"minLength": "50"
}
response = requests.get(
"https://api.quotable.io/random",
params=params,
)
print(response.json())const url = new URL('https://api.quotable.io/random');
url.searchParams.set('tags', 'technology');
url.searchParams.set('minLength', '50');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.quotable.io/random")
q := baseURL.Query()
q.Set("tags", "technology")
q.Set("minLength", "50")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.quotable.io/random")
uri.query = URI.encode_www_form({
"tags" => "technology",
"minLength" => "50"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.quotable.io/random?" . http_build_query([
"tags" => "technology",
"minLength" => "50"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- No API key needed
- GET https://api.quotable.io/random
- Filter by tag: ?tags=wisdom,inspirational
- Search quotes: GET /search/quotes?query=success
- List authors: GET /authors?sortBy=quoteCount&order=desc