Quotex

API

a quiet little JSON API

Every endpoint returns JSON. No API key and no auth are needed for reads — just request a URL. The machine-readable spec lives at /openapi.yaml ↗.

No account needed. There's no sign-up. Favorites and ratings are saved against your browser's session cookie, so from the API you must persist cookies between calls (curl -c jar -b jar …) for them to stick. Tip: click any code block to copy it.

Reading quotes

GET/api/quotes

List quotes with search, filtering, sorting, and pagination.

q
search text, author, and category (case-insensitive)
author
exact author filter
category
exact category filter
sort
author · category · text · random
page
page number (default 1)
per_page
items per page (default 50, max 100)
curl "http://quotes.btay.io/api/quotes?q=discipline&sort=author&per_page=2"
{
  "items": [
    { "id": 1, "text": "Keep the main thing the main thing.",
      "author": "DJ Shipley", "category": "General", "source": null,
      "tags": [ { "id": 2, "name": "discipline" } ] }
  ],
  "page": 1, "per_page": 2, "total": 232,
  "has_prev": false, "has_next": true
}
GET/api/quotes/<id>

A single quote by id.

curl "http://quotes.btay.io/api/quotes/1"
{ "id": 1, "text": "Keep the main thing the main thing.",
  "author": "DJ Shipley", "category": "General", "source": null }
GET/api/random

A random quote. Optional author / category filters.

curl "http://quotes.btay.io/api/random?author=Charlie%20Munger"
GET/api/quote-of-the-day

A deterministic quote that changes once per day.

curl "http://quotes.btay.io/api/quote-of-the-day"

Browsing

GET/api/authors

All authors with quote counts.

curl "http://quotes.btay.io/api/authors"
{ "values": [ "A.A. Milne", "Charlie Munger", … ],
  "counts": { "Charlie Munger": 71, "Tecumseh": 1, … } }
GET/api/categories

All categories with quote counts (same shape as authors).

curl "http://quotes.btay.io/api/categories"
GET/api/tags

All tags with usage counts.

curl "http://quotes.btay.io/api/tags"
{ "tags": [ { "id": 2, "name": "discipline", "count": 3 }, … ] }

Ratings & signals

GET/api/quotes/<id>/rating

Average rating and your own rating for a quote.

curl "http://quotes.btay.io/api/quotes/1/rating"
{ "average_rating": 5.0, "user_rating": null }
GET/api/quotes/<id>/stats

View / copy / share / favorite counts for a quote.

curl "http://quotes.btay.io/api/quotes/1/stats"
GET/api/quotes/top-rated GET/api/analytics/trending GET/api/analytics/popular

Leaderboards. Each returns { "count": n, "quotes": [ … ] }.

Your session

These read or change data tied to your browser session — persist cookies with -c jar -b jar.

GET/api/favorites

Quotes you've favorited in this session.

curl -c jar -b jar "http://quotes.btay.io/api/favorites"
{ "count": 0, "favorites": [] }
POSTDELETE/api/quotes/<id>/favorite

Add (POST) or remove (DELETE) a quote from your favorites.

curl -c jar -b jar -X POST "http://quotes.btay.io/api/quotes/1/favorite"
POST/api/quotes/<id>/rate

Rate a quote 1–5. Body: { "rating": 1–5 }.

curl -c jar -b jar -X POST "http://quotes.btay.io/api/quotes/1/rate" \
  -H "Content-Type: application/json" -d '{"rating": 5}'
POST/api/quotes/<id>/track

Record an interaction. Body: { "type": "copy" | "share" | "view" }.

curl -X POST "http://quotes.btay.io/api/quotes/1/track" \
  -H "Content-Type: application/json" -d '{"type": "copy"}'
GET POST /api/collections

List or create session collections; manage members at /api/collections/<id>/quotes/<quoteId> (POST/DELETE).

Utility

GET/healthz

Health check with the total quote count.

curl "http://quotes.btay.io/healthz"   # {"ok": true, "count": 232}
GET/openapi.yaml

The full OpenAPI specification.