Kerala Lottery Results API — Developer Documentation

Public read-only JSON API with CORS and ETag. No auth required. Built for speed and stability.

Base https://indialotteryapi.com/wp-json/klr/v1
CORS *
Cache Cache-Control + ETag

Overview

All responses are JSON. Endpoints are stateless and fast. Use conditional requests to avoid transferring data when unchanged.

Recommended Request Headers

  • Accept: application/json
  • Conditional: If-None-Match: "your-last-etag" → returns 304 if unchanged.

Status Codes

HTTPMeaning
200OK, JSON body
304Not Modified (ETag hit; empty body)
400Bad Request (e.g., missing date)
404No data found
5xxServer error

Data Model

{
  "draw_date": "YYYY-MM-DD",
  "draw_name": "Akshaya",
  "draw_code": "AK-655",
  "first": {
    "ticket": "PT 336829",
    "location": "GURUVAYOOR",
    "agent": "V F RIMSON",
    "agency_no": "R 4866"
  },
  "prizes": {
    "consolation": ["..."],
    "2nd": ["..."], "3rd": ["..."], "4th": ["..."], "5th": ["..."],
    "6th": ["..."], "7th": ["..."], "8th": ["..."], "9th": ["..."],
    "amounts": {"1st":"₹1,00,00,000/-","consolation":"₹5,000/-", "..."},
    "guess": ["optional"]
  }
}

GET /latest

Returns the most recent draw.

Request

GET https://indialotteryapi.com/wp-json/klr/v1/latest
Accept: application/json

Sample Response

{
  "draw_date": "2024-05-18",
  "draw_name": "Akshaya",
  "draw_code": "AK-655",
  "first": {"ticket":"PT 336829","location":"GURUVAYOOR","agent":"V F RIMSON","agency_no":"R 4866"},
  "prizes": { ... see Data Model ... }
}

Response Headers

  • Cache-Control: public, max-age=60
  • ETag: "xxxxx"

Conditional Request

GET https://indialotteryapi.com/wp-json/klr/v1/latest
If-None-Match: "your-last-etag"

Returns 304 Not Modified if unchanged.

GET /by-date

Returns a draw by date.

Query Parameters

ParamTypeRequiredDescription
datestring (YYYY-MM-DD)YesDraw date

Request

GET https://indialotteryapi.com/wp-json/klr/v1/by-date?date=2024-05-18
Accept: application/json

Errors

400 Bad Request  {"code":"rest_missing_callback_param","message":"Missing parameter(s): date"}

GET /history

Paginated history (descending by date).

Query Parameters

ParamType / DefaultDescription
limitint, default 10Page size (1–100 recommended)
offsetint, default 0Offset (pagination)
daysint, default 0If from/to not set, return last N days
fromYYYY-MM-DDStart date (inclusive)
toYYYY-MM-DDEnd date (inclusive)

Request

GET https://indialotteryapi.com/wp-json/klr/v1/history?limit=10&offset=0
Accept: application/json

Sample Response

{
  "total": 1234,
  "limit": 10,
  "offset": 0,
  "items": [
    {
      "draw_date": "2024-05-18",
      "draw_name": "Akshaya",
      "draw_code": "AK-655",
      "first_ticket": "PT 336829",
      "prizes": { ... see Data Model ... }
    }
  ]
}

Performance Tips

  • Use ETag: store the last ETag, send If-None-Match; you’ll get 304 when nothing changed.
  • Honor Cache-Control: respect public, max-age=60 to avoid unnecessary calls.
  • Paginate: prefer limit/offset over fetching large ranges at once.
  • Back off on errors: don’t retry aggressively on 4xx/5xx.

Quick Examples

cURL

curl -s 'https://indialotteryapi.com/wp-json/klr/v1/latest' -H 'Accept: application/json'
curl -s 'https://indialotteryapi.com/wp-json/klr/v1/by-date?date=2024-05-18' -H 'Accept: application/json'
curl -s 'https://indialotteryapi.com/wp-json/klr/v1/history?limit=10&offset=0' -H 'Accept: application/json'

fetch()

fetch('https://indialotteryapi.com/wp-json/klr/v1/latest', { headers: { Accept: 'application/json' } })
  .then(r => r.status === 304 ? null : r.json())
  .then(console.log)
  .catch(console.error);