--- title: "Executing queries using the SqlExecution API" slug: "executing-queries-using-the-sqlexecution-api" updated: 2025-08-15T16:29:49Z published: 2025-08-15T16:29:49Z canonical: "support.lusid.com/executing-queries-using-the-sqlexecution-api" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # Executing queries using the SqlExecution API You can use the `SqlExecution` API to send Luminesce queries: - In the body of a request, using the [PutByQuery](https://www.lusid.com/docs/api/luminesce/endpoints/sql-execution/PutByQueryCsv) endpoints - In the URL of a request, using the [GetByQuery](https://www.lusid.com/docs/api/luminesce/endpoints/sql-execution/GetByQueryCsv) endpoints Each endpoint corresponds to an output format for the returned results, including: - Pipe-delimited - CSV - JSON - An Excel file - A Parquet file - SQLite DB - XML ## Request timeouts `PutByQuery` endpoints have a `timeoutSeconds` parameter (or `timeout` for `GetByQuery` endpoints) that you can use to specify a maximum time limit for the request to return a response. > [!NOTE] > Note > > If you’re unsure whether your query may exceed the maximum limit of 175 seconds, we recommend using the `SqlBackground` API instead. [Read more.](/v1/docs/executing-long-running-queries-using-the-sqlbackground-api) Note the following: - You can pass in a value between `0` and `175`. - If the value is set to `0`, the time limit becomes 120 seconds. - The request will always timeout after 175 seconds.