Skip to content

Query Timeouts

To avoid accidentally sending queries that result in large credit charges, the default timeout for SQL requests is 25 seconds. Paid plans allow for longer query timeouts, depending on the tier.

You can set a maximum timeout for your queries by passing an optional options parameter to the request body. Inside this parameter, specify timeout with a positive integer. Your query timeout will be set to the lesser of this specified timeout (if you pass it, otherwise the default is 25 seconds), and the maximum timeout allowed for your account tier.

This is useful for requesting longer timeouts for particularly large queries, or shortening your timeouts for testing queries without consuming too many credits.

For example, in the below example we set the timeout to 2 seconds for a particularly expensive COUNT query, that attempts to count every NFT across the history of Ethereum.


Before proceeding, we need to authenticate ourselves with Transpose. To access any Transpose API, you'll need an API key. All API requests should include your API key in an X-API-KEY header. If you haven't already, you'll need to sign up and create a team (for free!). Once you have a team, you can find a list of your API keys in your team dashboard. When you have your API key, replace <YOUR-API-KEY> in the interactive examples below with your key.

Remember not to share your API key! Your API key is a secret, and should not be stored or exposed in a public manner.

SQL Query
SELECT COUNT(*) from ethereum.nfts; 

curl --request POST \
     --data '{"sql": "SELECT COUNT(*) from ethereum.nfts;", "timeout": 2}' \
     --url '' \
     --header 'Content-Type: application/json' \
     --header 'x-api-key: FxKTp6MHpWQDaos8SRnSetdIZiUYLliS' \

Got questions? Join our Discord

Discord is the primary home of the Transpose developer community. Join us to ask questions, share your work, and get help.