Serve a live leaderboard from a Google Sheet
A leaderboard is just rows sorted by score, and a spreadsheet handles that natively. PasteSheet publishes your Google Sheet as a live, cached JSON API, so your game or app reads the standings with a descending sort and pulls the top N with pagination — no database to run and no backend to build for a scoreboard.
Last updated
Key facts
- A Google Sheet is capped at 10 million cells (or 18,278 columns), which is the real ceiling on using one as a database. source
- The board holds up to 500 players on Free and 5,000 on Starter ($9/mo); Pro ($19/mo) lifts the row cap for a full ladder.
- A new high score lands as fast as your cache TTL: a fixed 5 minutes on Free, or a custom 30 seconds to 1 hour on paid plans.
- Nobody can spoof a score through the API: the endpoint is read-only by design, with no write path. You record scores by writing to the sheet yourself.
Why a Sheet makes a fine leaderboard
A ranking is a table sorted by one number: player, score, maybe a level or a region. A spreadsheet is already that, and you can eyeball it, sort it, and fix a bad entry by hand. For a jam game, a community contest, or an internal scoreboard, standing up a database and an API for that is more work than the feature deserves.
PasteSheet serves the sheet as clean, typed JSON over a fast, cached endpoint, with sorting and pagination built into the URL. Your front end asks for the scores sorted high-to-low and renders the top ten — the same read-only pattern behind a live dashboard.
What the API gives you
One tab of scores, and the query parameters do the ranking:
-
Descending sort —
sort=-scoreputs the highest score first. -
Top N —
per_page=10returns just the leaders;pagewalks the rest. -
Scoped boards — filter with
?region=euor?season=3for per-slice rankings. -
Aggregates on Pro —
group_bywithavgorcountfor per-team or per-level stats.
Fetch the top scores as JSON
Sort descending and page for the top N. No query language, just URL parameters:
curl "https://pastesheet.com/your-endpoint/Scores?sort=-score&per_page=10"
{
"data": [
{
"rank": 1,
"player": "nova",
"score": 48210,
"level": 27,
"region": "eu"
}
]
}Read-only, so nobody can spoof a score
Because the endpoint is read-only by design, it is safe to expose publicly or hand to a teammate: consumers can read and query the data but can never change the sheet. And there is no Google Cloud project, OAuth screen, or service account to set up — you paste a share URL and get a live API.
What it costs
Starter
For indie makers shipping a real app.
- Endpoints
- 10
- Requests / mo
- 50,000
- Row cap
- 5,000
- Custom cache TTL
- Aggregation & rollups
- Private endpoints & keys
Start on Starter ($9/mo) for a custom cache TTL, so a fresh high score shows up in seconds. Free is fine for a slow-moving board on a 5-minute cache; Pro adds aggregation (avg, count, group_by) for per-team and per-level stats.
Frequently asked questions
How do I get just the top ten?
Sort descending and cap the page size: sort=-score with per_page=10. The API returns the ten highest rows; increase per_page or step through pages to show more of the board.
How fresh are the scores?
As fresh as your cache TTL. The Free plan refreshes every 5 minutes; paid plans let you set a TTL as low as 30 seconds, so a new high score reaches the board almost immediately.
Can players write scores through the API?
No. PasteSheet is read-only by design — there is no write path. The endpoint only serves the standings, so nobody can spoof a score through it. You record scores by writing to the sheet yourself.
Can I have separate boards per region or season?
Yes. Keep a region or season column and filter with ?region=eu or ?season=3. One sheet can back many scoped leaderboards, each just a different query against the same rows.
Sources
Related use cases
Feed a Live Dashboard From Google Sheets
Power a live dashboard from a Google Sheet: PasteSheet serves rows and count/sum/avg rollups as cached JSON your charts read — no backend, no database.
A No-Code Backend From a Google Sheet
Skip the server. PasteSheet turns a Google Sheet into a live, read-only JSON API your web or mobile app reads from — no database, no backend, no Google setup.
A Reporting API Backed by Google Sheets
Expose a Google Sheet of report data as a JSON API for BI tools, scripts, and embeds — with count/sum/avg summaries and no backend to build.
Use a Google Sheet as a Next.js Data Source
Fetch a Google Sheet as typed JSON in Next.js or React — from a Server Component, getStaticProps, or ISR. Cached, read-only, set up by pasting a share URL.
Turn your sheet into an API in minutes
Paste a Google Sheet URL and get a live REST API and MCP server — no backend, no code, free to start.