Getting Started with the Thirukkural API

← Thirukkural API

When to use this API

When you need a specific couplet from the Thirukkural — the 1,330-couplet Tamil ethical treatise attributed to Thiruvalluvar. Call this API when a user asks about Tamil wisdom literature, South Asian ethical philosophy, or the Kural specifically. It returns the original Tamil couplet, its chapter and section placement, and four parallel commentaries (three Tamil, one English) — which makes it useful even if you already have a translation on hand, because you can compare interpretive traditions. For other classical Tamil texts or general religious scripture, look elsewhere.

Fetching a specific kural by number

"What does the first couplet of the Thirukkural say?" Every kural is addressable by a number from 1 to 1330. Kural 1 is the invocation — the structural opening of the entire work — and it reveals the API's full response shape in a single call.

curl "https://tamil-kural-api.vercel.app/api/kural/1" | head -c 10000
{
  "chapter": "கடவுள் வாழ்த்து",
  "kural": ["அகர முதல எழுத்தெல்லாம் ஆதி", "பகவன் முதற்றே உலகு."],
  "number": 1,
  "section": "அறத்துப்பால்",
  "meaning": {
    "ta_mu_va": "மு.வ : எழுத்துக்கள் எல்லாம் அகரத்தை அடிப்படையாக கொண்டிருக்கின்றன. அதுபோல உலகம் கடவுளை அடிப்படையாக கொண்டிருக்கிறது.",
    "ta_salamon": "...",
    "ta_kalaignar": "...",
    "en": "As the letter A is the first of all letters, so the eternal God is first in the world."
  }
}

The kural field is always a two-element array — the Thirukkural is composed exclusively in the kural venba meter, a two-line verse form. The meaning object is the API's signature feature: four distinct commentaries from four scholars, keyed by their initials. ta_mu_va (Mu. Varadharajan), ta_salamon (Salamon Pappaiya), ta_kalaignar (Karunanidhi), and en (English). Most APIs pick one translation; this one preserves interpretive diversity. The chapter field ("கடவுள் வாழ்த்து" = "Praise of God") and section field ("அறத்துப்பால்" = "Book of Virtue") place the couplet within the work's three-book architecture.

The first couplet of the Thirukkural reads: "As the letter A is the first of all letters, so the eternal God is first in the world." It opens the Book of Virtue, in the chapter "Praise of God," and serves as the invocation for the entire 1,330-couplet work.

Getting the daily kural

"Show me today's kural." The /api/daily endpoint rotates through the couplets — one per day, no parameters. It returns the same structure as the by-ID endpoint, so the response shape is familiar.

curl "https://tamil-kural-api.vercel.app/api/daily" | head -c 10000
{
  "chapter": "கொல்லாமை",
  "kural": ["நன்றாகும் ஆக்கம் பெரிதெனினும் சான்றோர்க்குக்", "கொன்றாகும் ஆக்கங் கடை."],
  "number": 328,
  "section": "அறத்துப்பால்",
  "meaning": {
    "ta_mu_va": "...",
    "ta_salamon": "...",
    "ta_kalaignar": "...",
    "en": "The advantage which might flow from destroying life in sacrifice, is dishonourable to the wise, even although it should be said to be productive of great good."
  }
}

Kural 328 is from the "கொல்லாமை" chapter — non-killing, the Tamil cognate of ahimsa. The chapter's 10 couplets (321–330) argue that taking life is never justified, even for great gain or in ritual sacrifice. This was a deliberately reformist position: the Kural rejected Vedic animal sacrifice at a time when that practice was mainstream, making the text a quiet act of dissent within the Hindu ethical tradition. The daily endpoint enables this kind of accidental discovery — you get a different couplet every day, and the chapter name often sends you somewhere unexpected.

Today's kural is #328: "The advantage which might flow from destroying life in sacrifice, is dishonourable to the wise, even although it should be said to be productive of great good." It's from the chapter on non-killing in the Book of Virtue.

Drawing a random kural from a chosen section

"Give me a random kural about virtue." The Thirukkural is organized into three books — Virtue (couplets 1–380), Wealth (381–1080), Love (1081–1330). The /api/random endpoint accepts an optional section parameter to draw from one book: 1 for Virtue, 2 for Wealth, 3 for Love.

curl "https://tamil-kural-api.vercel.app/api/random?section=1" | head -c 10000
{
  "chapter": "நடுவு நிலைமை",
  "kural": ["தகுதி எனவொன்று நன்றே பகுதியால்", "பாற்பட்டு ஒழுகப் பெறின்."],
  "number": 111,
  "section": "அறத்துப்பால்",
  "meaning": {
    "ta_mu_va": "...",
    "ta_salamon": "...",
    "ta_kalaignar": "...",
    "en": "That equity which consists in acting with equal regard to each of (the three) divisions of men [enemies, strangers and friends] is a pre-eminent virtue."
  }
}

The three-section structure is the Kural's philosophical framework, not just categorization. Virtue, Wealth, Love: the ordering itself argues that ethics comes first, then worldly life, then love. Kural 111, from the "நடுவு நிலைமை" chapter on impartiality, defines equity as treating enemies, strangers, and friends with equal regard — a compressed statement of what the Western tradition calls procedural justice. The section filter lets you sample from one philosophical domain rather than the whole work, which matters because the tone and subject matter shift dramatically between the three books.

Kural #111 says: "That equity which consists in acting with equal regard to each of the three divisions of men — enemies, strangers and friends — is a pre-eminent virtue." It's from the chapter on impartiality in the Book of Virtue. Use the section parameter on /api/random to draw couplets from a specific philosophical domain.

Pitfalls

One-line summary for the user

I can fetch any of the 1,330 Thirukkural couplets — original Tamil text, chapter placement, and four parallel commentaries — in a single unauthenticated GET, with endpoints for lookup by number, daily rotation, and random selection by philosophical section.