---
title: "Get next valid frame"
method: GET
path: "/frames/next-valid"
tags: ["Frames"]
---

# Get next valid frame

`GET /frames/next-valid`

Find the next frame that has a valid video file on disk.
This allows the frontend to skip directly to a valid frame instead of
trying each frame one-by-one when frames fail to load.

## Query parameters

- `frame_id` integer
- `direction` string
- `limit` integer

## Response `200`

OK

- NextValidFrameResponse — Response for next valid frame endpoint
  - `frame_id` integer, required
  - `timestamp` string, date-time, required
  - `skipped_count` integer, required

## Changes

> 10 revisions in range; 3 could not be searched.

- **2026-04-09** `0f0f8030c7e2` — 1 info
  - api tag `Frames` added
- **2026-04-08** `1a63468a8d30` — 2 breaking, 4 info
  - for the `query` request parameter `direction`, default value `forward` was removed
  - for the `query` request parameter `limit`, default value `50` was removed
  - api operation id `server_get_next_valid_frame` removed and replaced with `routes_frames_get_next_valid_frame`
  - api tag `Frames` removed
  - …2 more
- **2026-02-16** `e143bf8d73bc` — 1 info
  - endpoint added
- **2026-02-11** `2825740bcf63` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/screenpipe/apis/screenpipe-api/changes/frames/next-valid/get.md)

---

[API](https://skmtc.dev/screenpipe/apis/screenpipe-api.md) · [All operations](https://skmtc.dev/screenpipe/apis/screenpipe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/screenpipe/screenpipe-api/revisions/c48ab58de88e/schema)
