QuoteLore API

Public, unauthenticated JSON API for the Cascade quote dataset.

Host: https://api.casw.app

Base path: /quotelore

CORS: open (Access-Control-Allow-Origin: *)

Methods: GET, HEAD, OPTIONS

Raw markdown: /docs/quotelore.md

Related: Edge API — the original five dynamic routes at /edge.

Quotes4048
Authors1039
Tagsfilm, indian-thinkers, leaders, literature, philosophy, science, sports

Endpoints

MethodPathWhat it returns
GET/quoteloreCatalog, counts, endpoint list
GET/quotelore/quoteOne quote by id
GET/quotelore/quotesPaginated quotes
GET/quotelore/searchSearch quotes
GET/quotelore/randomRandom quote(s)
GET/quotelore/todayQuote of the day (IST)
GET/quotelore/authorAuthor + all of their quotes
GET/quotelore/authorsPaginated authors
GET/quotelore/authors/searchSearch authors
GET/quotelore/tagOne tag + its quotes
GET/quotelore/tagsAll tags

Production examples use https://api.casw.app. The same paths work on this host.


Shared query parameters

These filters work on /quotelore/quotes, /quotelore/search, and /quotelore/random.

ParamRequiredDescription
tagnoOne of: film, indian-thinkers, leaders, literature, philosophy, science, sports
authornoAuthor slug, e.g. socrates
minlennoMinimum quote character length. Default 0
maxlennoMaximum quote character length. Default unlimited
photono1 or true — only authors with a portrait photo
gradenoA or B
filmno1 only film dialogue, 0 exclude film dialogue
kindnoperson or character
pagenoPage number. Default 1. Max 1000
limitnoPage size. Default 20. Max 50

GET /quotelore/quote

One quote by numeric id.

ParamRequiredDescription
idyesQuote id, 1–4048
GET https://api.casw.app/quotelore/quote?id=1

Sample response:

{
  "id": 1,
  "text": "The unexamined life is not worth living.",
  "length": 40,
  "author": {
    "name": "Socrates",
    "slug": "socrates",
    "role": "Greek philosopher",
    "years": "c. 470–399 BC",
    "bio": "Wrote nothing himself. We know him through his students, mainly Plato.",
    "kind": "person",
    "wikidata_id": "Q913",
    "image": {
      "256": "https://api.casw.app/quotelore/img/authors/256/socrates.jpg",
      "512": "https://api.casw.app/quotelore/img/authors/512/socrates.jpg"
    },
    "image_type": "photo",
    "license": "Public domain",
    "url": "https://api.casw.app/quotelore/author?slug=socrates"
  },
  "source": "Plato, Apology 38a",
  "year": "c. 399 BC",
  "context": "Said at his own trial, when he chose death over giving up philosophy.",
  "tags": ["philosophy"],
  "grade": "A",
  "film_dialogue": false,
  "url": "https://api.casw.app/quotelore/quote?id=1"
}

Errors: 400 missing id, 404 unknown id.


GET /quotelore/quotes

Paginated list. Combine any shared filters.

GET https://api.casw.app/quotelore/quotes?tag=philosophy&page=1&limit=20
GET https://api.casw.app/quotelore/quotes?author=socrates
GET https://api.casw.app/quotelore/quotes?photo=1&grade=A&minlen=25&maxlen=200
GET https://api.casw.app/quotelore/quotes?film=1&kind=character

Sample response:

{
  "total": 618,
  "page": 1,
  "limit": 20,
  "results": [
    {
      "id": 1,
      "text": "The unexamined life is not worth living.",
      "author": { "name": "Socrates", "slug": "socrates" },
      "tags": ["philosophy"]
    }
  ]
}

GET /quotelore/search

Full-text search over quote text, author name/slug, source, and role. q must be at least 2 characters. Shared filters still apply.

ParamRequiredDescription
qyesSearch string, min 2 characters
pagenoDefault 1
limitnoDefault 20, max 50
GET https://api.casw.app/quotelore/search?q=unexamined%20life
GET https://api.casw.app/quotelore/search?q=gandhi&tag=leaders
GET https://api.casw.app/quotelore/search?q=science&photo=1&page=2

Sample response:

{
  "query": "unexamined life",
  "total": 1,
  "page": 1,
  "limit": 20,
  "results": [
    {
      "id": 1,
      "text": "The unexamined life is not worth living.",
      "author": {
        "name": "Socrates",
        "slug": "socrates"
      }
    }
  ]
}

Errors: 400 if q is shorter than 2 characters.

{ "error": "q_too_short", "hint": "?q= needs at least 2 characters" }

GET /quotelore/random

Random quote from the filtered pool.

ParamRequiredDescription
countnoHow many quotes, 1–20. Default 1 (bare quote object). count>1 wraps { count, quotes }
GET https://api.casw.app/quotelore/random
GET https://api.casw.app/quotelore/random?tag=science&photo=1
GET https://api.casw.app/quotelore/random?count=3&tag=sports
GET https://api.casw.app/quotelore/random?author=sagan&maxlen=120

Sample (count omitted): same shape as /quotelore/quote.

Sample (count=3):

{
  "count": 3,
  "quotes": [
    { "id": 201, "text": "...", "tags": ["sports"] },
    { "id": 844, "text": "...", "tags": ["sports"] },
    { "id": 1102, "text": "...", "tags": ["sports"] }
  ]
}

Errors: 404 { "error": "no_match" } when filters match nothing.


GET /quotelore/today

Deterministic quote of the day. Same quote for everyone until midnight Asia/Kolkata. No query params.

GET https://api.casw.app/quotelore/today

Sample response:

{
  "date": "2026-11-28",
  "timezone": "Asia/Kolkata",
  "quote": {
    "id": 1240,
    "text": "...",
    "author": { "name": "...", "slug": "..." }
  }
}

GET /quotelore/author

Author profile plus every quote by that author. Quotes in this payload omit the nested author object.

ParamRequiredDescription
slugyesAuthor slug, e.g. socrates, marie-curie
GET https://api.casw.app/quotelore/author?slug=socrates
GET https://api.casw.app/quotelore/author?slug=marie-curie

Sample response:

{
  "name": "Socrates",
  "slug": "socrates",
  "role": "Greek philosopher",
  "years": "c. 470–399 BC",
  "kind": "person",
  "image_type": "photo",
  "quote_count": 1,
  "count": 1,
  "url": "https://api.casw.app/quotelore/author?slug=socrates",
  "quotes": [
    {
      "id": 1,
      "text": "The unexamined life is not worth living.",
      "source": "Plato, Apology 38a",
      "tags": ["philosophy"]
    }
  ]
}

Errors: 400 missing slug, 404 unknown slug.


GET /quotelore/authors

Paginated authors.

ParamRequiredDescription
pagenoDefault 1
limitnoDefault 20, max 50
kindnoperson or character
photono1 to keep portrait photos
GET https://api.casw.app/quotelore/authors
GET https://api.casw.app/quotelore/authors?kind=person&photo=1
GET https://api.casw.app/quotelore/authors?kind=character&page=2

Sample response:

{
  "total": 839,
  "page": 1,
  "limit": 20,
  "results": [
    {
      "name": "A. C. Bhaktivedanta Swami Prabhupada",
      "slug": "a-c-bhaktivedanta-swami-prabhupada",
      "kind": "person",
      "quote_count": 3,
      "image_type": "photo"
    }
  ]
}

GET /quotelore/authors/search

Search authors by name, slug, role, or bio.

ParamRequiredDescription
qyesSearch string, min 2 characters
pagenoDefault 1
limitnoDefault 20, max 50
kindnoperson or character
photono1 to keep portrait photos
GET https://api.casw.app/quotelore/authors/search?q=curie
GET https://api.casw.app/quotelore/authors/search?q=gandhi
GET https://api.casw.app/quotelore/authors/search?q=bourne&kind=character

Sample response:

{
  "query": "curie",
  "total": 1,
  "page": 1,
  "limit": 20,
  "results": [
    {
      "name": "Marie Curie",
      "slug": "marie-curie",
      "role": "Physicist and chemist",
      "quote_count": 4
    }
  ]
}

GET /quotelore/tag

One tag plus paginated quotes for that tag.

ParamRequiredDescription
nameyesTag slug. Alias: tag
pagenoDefault 1
limitnoDefault 20, max 50
GET https://api.casw.app/quotelore/tag?name=philosophy
GET https://api.casw.app/quotelore/tag?name=sports&page=1&limit=10
GET https://api.casw.app/quotelore/tag?tag=film

Sample response:

{
  "tag": "philosophy",
  "label": "Philosophy",
  "count": 618,
  "url": "https://api.casw.app/quotelore/tag?name=philosophy",
  "total": 618,
  "page": 1,
  "limit": 20,
  "results": []
}

GET /quotelore/tags

All tags. No query params.

GET https://api.casw.app/quotelore/tags

Sample response:

{
  "count": 7,
  "tags": [
    { "tag": "film", "label": "Film", "count": 483 },
    { "tag": "indian-thinkers", "label": "Indian thinkers", "count": 569 },
    { "tag": "leaders", "label": "Leaders", "count": 652 },
    { "tag": "literature", "label": "Literature", "count": 917 },
    { "tag": "philosophy", "label": "Philosophy", "count": 618 },
    { "tag": "science", "label": "Science", "count": 525 },
    { "tag": "sports", "label": "Sports", "count": 284 }
  ]
}

Images

Portraits are static files, not JSON routes.

https://api.casw.app/quotelore/img/authors/256/{slug}.jpg
https://api.casw.app/quotelore/img/authors/512/{slug}.jpg

image_type is photo (real portrait) or initials (generated tile).


Errors

StatusBodyWhen
400{ "error": "missing_id" }/quote without id
400{ "error": "missing_slug" }/author without slug
400{ "error": "missing_name" }/tag without name
400{ "error": "q_too_short" }search q shorter than 2 chars
404{ "error": "not_found" }unknown id, slug, or tag
404{ "error": "no_match" }/random filters matched nothing
405{ "error": "method_not_allowed" }non-GET (except OPTIONS)

Attribution

Quote text and citations: Wikiquote contributors, CC BY-SA 4.0. Author facts: Wikidata (CC0). Portraits: Wikimedia Commons, licensed per file (author.license). Film dialogue remains copyright of the studios; short credited lines only.