# Famous Quotes API (TTech API)

More than 100,000 quotes and proverbs from writers, thinkers, leaders and scientists, in English and Bangla: a random quote by category or author, the quote of the day, and search. Every quote comes with its author, work, year, source link and licence.

Page: https://ttechapi.com/famous-quotes-api

## What it is for

- Apps and websites: A quote of the day widget or a random quote on every page load.
- Apps and bots: Daily quotes for apps, widgets and Discord or Telegram bots.
- Content and education: Search quotes by word, author or topic for articles and lessons.
- Datasets and AI: Quotes with clean metadata for prompts and training sets.

## Key facts

- 100,000+ quotes: Shakespeare, Mark Twain, Lincoln, Oscar Wilde, Tagore and thousands more, plus proverbs.
- 47 categories: Love, life, success, wisdom, friendship, happiness, courage, hope and more.
- English and Bangla: More than 9,400 Bangla quotes: Tagore, Vivekananda, Begum Rokeya, Bengali proverbs.
- Source and licence: Every quote has its author, work, year, a source link and its licence.
- AI quotes marked: About 9,600 AI-written quotes carry type ai; exclude_ai=true leaves them out.
- Answers in milliseconds: Every answer comes from memory, with no rate-limited upstream.

## REST API

Base URL `https://api.ttechapi.com/v1/quotes`. Send the header `x-api-key: YOUR_API_KEY` with every call. Get the key in the TTech API dashboard.

Endpoints (credits per call):

- `GET /random` (1 credit): One random quote; filters category, author, lang, exclude_ai
- `GET /today` (1 credit): The quote of the day (UTC), the same for everyone
- `GET /search` (required: query; 1 credit): Up to 10 quotes holding every word, with total matches
- `GET /categories` (1 credit): Every category and how many quotes it has

Parameters:

- `category` (string): One name from /categories, e.g. love, life, success, wisdom, friendship
- `author` (string): Part of a name, at least 2 characters: twain, tagore
- `lang` (string): en (default) or bn (Bangla)
- `exclude_ai` (true): Leave out the AI-written quotes
- `query` (string): On /search: words to find; whole words or word starts

Example:

```bash
curl "https://api.ttechapi.com/v1/quotes/random" \
  -H "x-api-key: YOUR_API_KEY"
```

Output: GET /random answers one quote in data:

- `quote, author`: The quote and who said it
- `work, year`: The book, play or speech and its year, or null
- `type`: quote, proverb or ai
- `source, sourceUrl, license`: Where it comes from and its licence
- `categories`: Its categories

```json
{
  "statusCode": 200,
  "data": {
    "id": "en006421",
    "quote": "Poetry is the record of the best and happiest moments of the happiest and best minds.",
    "author": "Percy Bysshe Shelley",
    "work": "A Defence of Poetry (1821)",
    "year": 1821,
    "language": "en",
    "type": "quote",
    "source": "Wikiquote",
    "sourceUrl": "https://en.wikiquote.org/wiki/Percy_Bysshe_Shelley",
    "license": "CC BY-SA 4.0",
    "categories": [
      "art",
      "mind"
    ]
  }
}
```

Errors come in the body with HTTP 200, e.g. {"statusCode": 400, "error": "BAD_REQUEST", "message": "Unknown category: luv"}.

## Pricing

- From 1 credit per call.
- 300 free credits once, valid for 1 month, no credit card.
- Plans from $14.99/month: https://ttechapi.com/pricing

## Use as an MCP server

- TTech MCP server: `https://mcp.ttechapi.com/mcp` (sign in with your TTech API account).
- Tools for this API: `quotes_search`, `quotes_random`.
- Setup for each AI client: https://ttechapi.com/ai-agents

## Limits

- Every call costs 1 credit, whatever its parameters.
- Search returns up to 10 quotes per call; total gives the number of all matches.
- Quotes from Wikiquote and Wikisource are CC BY-SA 4.0: credit "Wikiquote contributors" when you republish them.
- The quote of the day is never AI-written.

## Notes for the assistant

- Never put a real key in code you show; read it from an environment variable.
- Errors come with HTTP 200 and the status in the body; only a wrong key (401) and server errors (5xx) use the HTTP status. Errors from our side are not billed.
- Answers from the API have the headers `x-credits-used` and `x-credits-remaining`. A call the gateway refuses (wrong key, no credits left, too many requests) returns `statusCode`, `error`, `message` and `requestId` in the body and is not charged.
- Quotes from Wikiquote and Wikisource (CC BY-SA 4.0) and Project Gutenberg; AI-written quotes are marked.
- Support: support@ttechapi.com, Telegram @ttech_support_official.
