Public API
One endpoint today: random quotes for margins, 404 pages, and experiments. Responses include optional links back to notes when the line is from this site.
Quotes
Full reference (GitHub)Endpoint
GET /api/quotes
Returns one random quote. The pool mixes classical Stoic lines, a few other philosophers and writers,
and short pull quotes from essays published here. Each response includes a kind field (stoic, philosophical, or site) and sourceUrl when the line links to a post (/p/β¦/).
Optional query
?kind=stoic or philosophical or site Limits the draw to that bucket. If something is mis-typed, you still get a random quote from the full list (no hard error).
Sample JSON
{
"quote": {
"id": 31,
"kind": "site",
"sourceUrl": "/p/intelligence-burns/",
"postId": "intelligence-burns",
"text": "People say they love intelligent peopleβ¦",
"author": "Antonio Rodriguez Martinez",
"work": "Intelligence Burns",
"book": null,
"themes": ["intelligence", "relationships"],
"category": "author_voice",
"difficulty": "beginner",
"length": "short",
"popularity": "high",
"context": "β¦",
"modernRelevance": "β¦"
},
"metadata": {
"totalQuotes": 42,
"version": "2.0",
"lastUpdated": "2026-05-08",
"description": "Random quote: β¦",
"countsByKind": {
"stoic": 30,
"philosophical": 6,
"site": 6
}
}
} Try it
Choose a button to fetch a quote.
Code snippets
fetch
const res = await fetch('/api/quotes');
const { quote, metadata } = await res.json();
// quote.kind β 'stoic' | 'philosophical' | 'site'
// quote.sourceUrl β '/p/slug/' or null Filtered
const res = await fetch(
'/api/quotes?kind=site'
);