---
title: "Run SQL query"
method: POST
path: "/api/v1/projects/{projectUuid}/sqlQuery"
tags: ["Exploring", "Projects"]
deprecated: true
---

# Run SQL query

`POST /api/v1/projects/{projectUuid}/sqlQuery`

> **Deprecated.**

Deprecated — use the v2 Execute SQL query endpoint instead.

This endpoint was deprecated on 17 February 2025 and is past its sunset date (17 May 2025) — it may be removed at any time. Migrate to the v2 async query flow: Execute SQL query, then Get results.

## Path parameters

- `projectUuid` string, required

## Request body

- object — The query to run
  - `sql` string, required

## Response `200`

Success

- object
  - `results` ApiSqlQueryResults, required
    - `rows` RecordStringUnknown[], required
    - `fields` RecordStringTypeDimensionType, required — Construct a type with a set of properties K of type T
  - `status` 'ok', required

## Other responses

- `default` — Error

---

[API](https://skmtc.net/lightdash/apis/lightdash-api.md) · [All operations](https://skmtc.net/lightdash/apis/lightdash-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lightdash/lightdash-api/revisions/40c933755c9a/schema)
