---
title: "Wait for query results"
method: GET
path: "/v1/query/wait"
tags: ["Queries"]
---

# Wait for query results

`GET /v1/query/wait`

Poll for the results of one or more query jobs. Use this endpoint when a request to the [Run query endpoint](/api/queries/run-query) times out and returns `remaining_job_ids` in the response.

This endpoint will wait for the specified jobs to complete and return their results. If the jobs are still processing when the request times out, the response will include the remaining job IDs to poll again.

## Query parameters

- `job_ids` string[], required

## Response `200`

Successful response containing the query results for completed jobs.

If all jobs have completed, `timed_out` will be `false` and the response will include the full query results.

If some jobs are still processing when this request times out, `timed_out` will be `true` and `remaining_job_ids` will contain the IDs of jobs that are still running. Continue polling with these IDs until all jobs complete.

- object
  - `job_id` string, uuid — The unique identifier for the query job
  - `status` string — Job status (e.g., `COMPLETE`, `PLANNED`)
  - `client_result_id` string, uuid — Client-side result identifier
  - `summary` object — Query execution summary including SQL, stats, and field metadata
  - `cache_metadata` object — Cache information including TTL and data freshness
  - `query` object — The executed query details
  - `result` string — Base64 encoded Apache Arrow table containing query results
  - `stream_stats` object — Server-side streaming metrics
    - `server_stream` integer — Time in milliseconds to stream the result data from the server
  - `remaining_job_ids` string[] — IDs of jobs still processing if this request timed out. Continue polling with these IDs.
  - `timed_out` boolean — Indicates if the request timed out. If `true`, use `remaining_job_ids` to poll again.

## Other responses

- `400` — Bad Request. Possible causes: - Missing or invalid `job_ids` parameter - `job_ids` is not a valid JSON array
- `401` — Missing or invalid authentication
- `404` — Not Found. Possible causes: - One or more job IDs do not exist
- `429` — Too Many Requests - Rate limit exceeded (60 requests/minute)

---

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