Cafe API
One call per lap.
Mint a key from your cafe dashboard. Keep it on the timing PC only. Revoke it any time.
Post a lap
POST https://raceworld.in/api/scores with your key as a Bearer token.
curl -X POST https://raceworld.in/api/scores \
-H "Authorization: Bearer rw_live_..." \
-H "Content-Type: application/json" \
-d '{
"handle": "asha_r",
"game": "Assetto Corsa",
"track": "Monza",
"car": "Ferrari 488 GT3",
"lap_ms": 107900,
"external_id": "session-42-lap-7"
}'- handle: 2 to 24 characters, letters, numbers, dot, dash, underscore. Shown publicly. Never post full names.
- game and track: free text, used for filters. Keep spelling consistent.
- lap_ms: lap time in milliseconds, between 10 seconds and 60 minutes.
- external_id (optional): your own id. Posting the same id again updates the lap instead of duplicating it.
- posted_at (optional): ISO timestamp with offset. Defaults to now.
- Batch up to 100 laps:
{"laps":[...]}. Limit: 600 laps per hour per key.
Read the board
GET https://raceworld.in/api/scores?game=Assetto%20Corsa&track=Monza&period=week&limit=20
# period: week | month | all → { "rows": [ { "handle", "game", "track", "car", "lap_ms", "posted_at", "verified", "venue", "city" } ] }CORS is open on GET, so a lobby screen can fetch it directly. Cached for 30 seconds.
Embed on your site
<iframe src="https://raceworld.in/scores?game=Assetto%20Corsa" style="width:100%;height:640px;border:0;border-radius:16px"></iframe>Responses
- 201 saved. 400 validation. 401 missing, invalid or revoked key. 429 slow down.
- Laps posted over the API are shown as cafe-reported. Verified laps come from RaceWorld timing hardware.
Questions or a timing tool we should support next? Email hello@raceworld.in.