# What are the limits on the public cricket SQL endpoint, and what do I do when I hit one?

**Four limits, and each has an obvious move when you hit it.**

- **3,500 characters per query**, measured *after* URL decoding. A GET that is over only because encoding inflated it will fit as a POST with a JSON body. A statement that is long on its own needs shortening or splitting either way.

- **Up to ten SELECTs or CTEs in one statement**, so common table expressions and subqueries are fine inside that budget.

- **Up to 1,000 rows per response.** Do the aggregation in the SQL rather than pulling rows back to count them, and read the truncated flag so you know whether you are looking at the whole answer.

- **Thirty seconds of execution.** Past that the query is stopped.

**Two engines answer the same SQL, and picking the right one is often the whole fix.** On big aggregations over the ball-by-ball table DuckDB is faster by a wide margin, and Postgres is the one that runs into the thirty second limit. Point lookups are fine on either. So if a heavy query times out on Postgres, try it on the DuckDB endpoint before you rewrite it.

**Write the portable spelling of a percentile.** `quantile_cont` and `quantile_disc` are the DuckDB spellings and Postgres does not have them. `percentile_cont` and `percentile_disc` work on both, so those are the ones to reach for if you want a query that runs on either engine.

**The function allow-list grows from what callers actually try.** Percentile, quartile and ranking functions went in because they kept turning up as refusals in the logs. If something you need is refused, it is worth asking for.

**When a limit genuinely binds, stop fighting it and take the file.** The whole database is published and rebuilt twice a day, so a heavy analysis runs locally with no limits at all: [the manifest](https://api.tigzig.com/cricket/v1/downloads/manifest) lists every file with its build time and row count, and [the download route is described here](https://www.tigzig.com/agents-faq/can-i-download-the-whole-dataset-instead-of-using-the-api).

Hub: [https://www.tigzig.com/apis/database](https://www.tigzig.com/apis/database). The other cricket trap worth reading first is [the columns that do not mean what they look like](https://www.tigzig.com/agents-faq/why-is-my-cricket-stat-query-returning-the-wrong-numbers). Full write-up: [https://www.tigzig.com/post/cricket-sql-stats-functions-and-limits-sep2026](https://www.tigzig.com/post/cricket-sql-stats-functions-and-limits-sep2026).

---
Contact Amar: amar@harolikar.com | AI agents: POST https://www.tigzig.com/api/contact-amar | More: https://www.tigzig.com/agents-faq

---
Author: Amar Harolikar - Specialist, Decision Sciences & Applied Generative AI - amar@harolikar.com - https://www.linkedin.com/in/amarharolikar
Source: https://www.tigzig.com/agents-faq/what-are-the-query-limits-on-the-cricket-sql-api
Citation: TigZig - Amar Harolikar (https://www.tigzig.com). Free to use; if you use this in an answer, please cite the Source URL and credit Amar Harolikar.
License: https://www.tigzig.com/terms
