---
title: "Get indexed time ranges for traces or sessions across all trace streams"
method: GET
path: "/api/{org_id}/traces/time_range"
tags: ["Traces"]
---

# Get indexed time ranges for traces or sessions across all trace streams

`GET /api/{org_id}/traces/time_range`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/traces/time_range`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/traces/time_range/get.ts> (a function with typed inputs; its response is checked against the schema)

#{"ratelimit_module":"Traces", "ratelimit_module_operation":"list"}#

## Path parameters

- `org_id` string, required

## Query parameters

- `trace_id` string
- `session_id` string
- `hint_ts` integer
- `start_time` integer
- `end_time` integer
- `streams` string

## Response `200`

Success

- OrgTraceTimeRangeResponse
  - `partial_coverage` boolean, required: True when some trace streams could not be searched (no index, no permission, or indexing disabled), so `not_found` is not org-wide proof.
  - `results` TimeRangeResult[], required
    - `partial` boolean: True when the scan timed out while expanding this found range, so the range is a lower bound of the real one; retry may extend it.
    - `range` TraceTimeRange
      - `end_time` integer, required
      - `start_time` integer, required
    - `session_id` string, nullable
    - `status` 'found' | 'not_found' | 'timeout', required: Per-key lookup verdict. `NotFound` means the searched bounds were fully scanned without a hit; `Timeout` means the scan gave up, so the key may still exist.
    - `stream` string, nullable
    - `trace_id` string, nullable
  - `searched_range` TraceTimeRange
    - `end_time` integer, required
    - `start_time` integer, required

## Other responses

- `400`: Invalid parameters
- `403`: Forbidden
- `500`: Failure

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
