Getting started
Green Patakha is a website where you burst Indian Diwali crackers with real recorded sound. Open /play, pick a cracker, tap the street. There is no account.
Keyboard
1 to 9, 0, -, =, Q, W, E | Pick one of the 15 crackers |
P | Cycle lights and sound power: 1×, 2×, 4× |
Space | Light the picked cracker at a random spot |
M | Mute or unmute |
↑ ↓ | Volume up or down by 5 |
A | Auto mela on or off |
F | Full screen |
Add ?auto to the URL (/play?auto) to start Auto mela on load, for a TV.
Authentication
None. Every endpoint is public. Reads are cached for a few seconds. Writes to the counter are rate-limited to 30 a minute per address and must come from this site when sent by a browser.
API reference
Base URL: https://diwali.click/api/v1. JSON in, JSON out. Machine-readable spec: openapi.json.
GET /crackers
The 15 crackers with id, names (English and Hindi), kind, loudness, burn time and image.
curl https://diwali.click/api/v1/crackers
{
"crackers": [
{ "id": "anar", "name": "Anar", "hindi": "अनार", "english": "Flower pot",
"kind": "ground", "loudness": "Medium", "seconds": 8,
"about": "A clay cone that throws a fountain…", "image": "/crackers/anar.svg" }
]
}
GET /stats
How many crackers everyone has burst, in total and per cracker.
curl https://diwali.click/api/v1/stats
{ "total": 1520, "by_cracker": { "anar": 210, "rocket": 380, … }, "updated_at": "2026-11-08T14:31:09.120Z" }
POST /fires
Add to the counter. The play page batches its taps and sends them every few seconds. Returns the new stats.
curl -X POST https://diwali.click/api/v1/fires \
-H 'content-type: application/json' \
-d '{"counts": {"anar": 2, "rocket": 1}}'
Limits: ids from /crackers, each count 1 to 60, at most 240 per request, body under 4 KB.
Errors
Every error has the same shape, with a stable code:
{ "error": { "code": "unknown_cracker", "message": "Unknown cracker \"diya\". See GET /api/v1/crackers." } }
| code | HTTP | Meaning |
|---|---|---|
invalid_body | 400 | The body is not JSON, or it has no counts object. |
unknown_cracker | 400 | A key in counts is not a cracker id from GET /api/v1/crackers. |
invalid_count | 400 | A count is not a whole number from 1 to 60. |
too_many | 400 | More than 240 crackers in one request. |
payload_too_large | 413 | Body over 4 KB. |
forbidden_origin | 403 | A browser on another website tried to write the counter. |
rate_limited | 429 | Over 30 writes a minute from one address. Wait for Retry-After seconds. |
not_found | 404 | No such route. |
method_not_allowed | 405 | Wrong HTTP method for this route. |
internal | 500 | Something broke on our side. It is logged; try again. |