# The Query Run object

### The Query Run object

```json
{
  "id": "qrun_61VWgyeHDiAaUnBDO16Nsp4WJSSQIjR7nKfqrPPQWIxk",
  "object": "v2.data.query_run",
  "created": "2026-10-05T21:02:00.919623613Z",
  "dataset": "analytical",
  "format": "csv",
  "livemode": true,
  "query": {
    "sql": "SELECT * FROM balance_transactions LIMIT 10"
  },
  "refreshed_at": "2026-10-05T19:00:00.000Z",
  "result": {
    "col_count": "15",
    "file": {
      "columns": [
        {
          "name": "id",
          "type": "varchar"
        },
        {
          "name": "amount",
          "type": "bigint"
        },
        {
          "name": "available_on",
          "type": "timestamp"
        },
        {
          "name": "created",
          "type": "timestamp"
        },
        {
          "name": "currency",
          "type": "varchar"
        },
        {
          "name": "description",
          "type": "varchar"
        },
        {
          "name": "fee",
          "type": "bigint"
        },
        {
          "name": "net",
          "type": "bigint"
        },
        {
          "name": "status",
          "type": "varchar"
        },
        {
          "name": "type",
          "type": "varchar"
        },
        {
          "name": "source_id",
          "type": "varchar"
        },
        {
          "name": "balance_type",
          "type": "varchar"
        },
        {
          "name": "exchange_rate",
          "type": "double"
        },
        {
          "name": "automatic_transfer_id",
          "type": "varchar"
        },
        {
          "name": "reporting_category",
          "type": "varchar"
        }
      ],
      "content_type": "csv",
      "download_url": {
        "expires_at": "2026-10-05T21:11:48.520919806Z",
        "url": "https://stripeusercontent.com/files/us-west-2/..."
      },
      "size": "2244"
    },
    "row_count": "10"
  },
  "result_options": {
    "compression": "none"
  },
  "status": "succeeded",
  "status_details": null
}
```

## Attributes

- `id` (string)
  The unique identifier of the `QueryRun`.

- `object` (string, value is "v2.data.query_run")
  String representing the object’s type. Objects of the same type share the same value of the object field.

- `created` (timestamp)
  Time at which the `QueryRun` was created.

- `dataset` (enum)
  The dataset that was queried.
Possible enum values:
  - `analytical`
    Stripe’s analytical data warehouse.

- `format` (enum)
  The file format of the result. Only applicable when the result is a file.
Possible enum values:
  - `csv`
    CSV format.

- `livemode` (boolean)
  Whether the `QueryRun` was executed in live mode.

- [`query`](https://docs.stripe.com/api/v2/data/query-runs/object.md?query=query) (object)
  The query that was submitted for execution.

- `refreshed_at` (timestamp, nullable)
  Time at which the data used by this query was last refreshed.

- [`result`](https://docs.stripe.com/api/v2/data/query-runs/object.md?query=result) (object, nullable)
  The result of the `QueryRun`, populated when it has completed.

- [`result_options`](https://docs.stripe.com/api/v2/data/query-runs/object.md?query=result_options) (object, nullable)
  Settings applied to the generated result file.

- `status` (enum)
  The current status of the `QueryRun`.
Possible enum values:
  - `canceled`
    The run was canceled.

  - `failed`
    The run has failed.

  - `running`
    The run is currently in progress.

  - `succeeded`
    The run has completed successfully.

- [`status_details`](https://docs.stripe.com/api/v2/data/query-runs/object.md?query=status_details) (object, nullable)
  Additional details about the current state of the `QueryRun`.
