Thirukkural API

⭐ Beginner's Pick Books / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

Thirukkural API delivers all 1,330 couplets of the ancient Tamil classic Thirukkural with explanations in both Tamil and English. Free, open, and CORS-enabled.

💡

Beginner Tip

Fetch any single kural by number with https://api-thirukkural.web.app/api?num=1. Numbers run from 1 to 1,330 and the response includes the Tamil verse, transliteration, and English explanation.

Available Data

country name and code
population
capital city
region and subregion
flag image URL

Example Response

JSON Response
{
  "name": "Japan",
  "capital": "Tokyo",
  "population": 125800000,
  "region": "Asia",
  "languages": [
    "Japanese"
  ],
  "flag": "https://flagcdn.com/jp.svg",
  "currencies": [
    {
      "code": "JPY",
      "name": "Japanese yen"
    }
  ]
}

Field Reference

number Kural number (1–1330).
Line1 First line of the Thirukkural couplet in Tamil script.
Line2 Second line of the Thirukkural couplet in Tamil script.
translation English translation of the kural.
explanation Detailed English explanation of the kural's meaning.

Implementation Example

const url = "https://api-thirukkural.web.app/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Empty or error response for kural number Number out of range (must be 1–1330)
Clamp your input to 1–1330 before making the request. Passing 0 or numbers above 1330 returns no data.
Tamil script garbled in terminal Terminal or text renderer does not support UTF-8 Tamil characters
Use a UTF-8 capable terminal or render the text in a browser/HTML page with charset="utf-8" in the meta tag.
Slow first load The API is hosted on Firebase free tier which cold-starts
Make a warm-up request on app start and cache results locally; subsequent requests are fast.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 38ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Books
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →