---
title: "Read a completed query job's results by byte offset"
method: GET
path: "/api/v1/query/results"
tags: ["Query"]
---

# Read a completed query job's results by byte offset

`GET /api/v1/query/results`

## Request

- Base URL: `https://omniapp.co` (the document declares no server; this is the origin it was published from)
- URL: `https://omniapp.co/api/v1/query/results`
- Auth: HTTP bearer

Reads a completed job's stored result by byte offset, so a large result can be fetched in pieces and a dropped connection resumed. Typical flow: query/run and query/wait with `completionOnly: true` until the job is COMPLETE, then call this repeatedly, starting at offset 0 and passing each response's `stream_stats.next_offset` until it is null. Each `result` is base64 of a raw byte slice of the Arrow IPC stream; decode and append the slices, then parse the joined bytes. The response has the same text/ndjson framing as query/wait. Results stay readable for about an hour after the job completes; after that, and for a job that has not completed, the job line reports an error status.

## Query parameters

- `jobId` string, uuid, required: ID of a completed query job, from the query/run or query/wait response.
- `maxBytes` integer: Most raw result bytes to return. Omit to read to the end of the result.
- `offset` integer: Raw result byte to start from: 0, or the previous response's `stream_stats.next_offset`.
- `timeoutMs` integer: Stop streaming after roughly this many milliseconds; `stream_stats.next_offset` says where to resume. At least one chunk is always returned.

## Response `200`

One job line carrying the requested slice in `result` and the byte window in `stream_stats`, then a footer, as a text/ndjson stream.

## Other responses

- `400`: Invalid or missing jobId, offset, maxBytes, or timeoutMs
- `401`: Authentication required
- `500`: Error reading query results

## Changes

- **2026-10-07** `1928c8cc5ec5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omniapp/apis/omni-api/changes/api/v1/query/results/get.md)

---

[API](https://skmtc.dev/omniapp/apis/omni-api.md) - [All operations](https://skmtc.dev/omniapp/apis/omni-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omniapp/apis/omni-api/revisions/76b40ebc2292?raw)
