---
title: "Fetch Video"
method: POST
path: "/library/{libraryId}/videos/fetch"
tags: ["Manage Videos"]
---

# Fetch Video

`POST /library/{libraryId}/videos/fetch`

## Request

- Base URL: `https://video.bunnycdn.com`
- URL: `https://video.bunnycdn.com/library/{libraryId}/videos/fetch`
- Auth: API key in header `AccessKey`
- TypeScript: <https://skmtc.dev/bunny/apis/stream-api/docs/library/:libraryId/videos/fetch/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `libraryId` integer, required

## Query parameters

- `collectionId` string, nullable
- `thumbnailTime` integer, nullable

## Request body

- FetchVideoRequest
  - `url` string, required: The URL from which the video will be fetched from.
  - `headers` object, nullable: The headers that will be sent along with the fetch request.
  - `title` string, nullable: The title that will be set to video. If omitted, the filename from the fetch URL is used instead, falling back to "Fetched Video" if that can't be determined.

## Response `200`

The video was successfully fetched

- StatusModel
  - `success` boolean: Determines if the request was successful
  - `message` string, nullable: Human-readable message describing the result, typically populated with error details when Success is false.
  - `statusCode` integer: The HTTP status code corresponding to the result of the request.

## Other responses

- `400`: URL validation failed or request was invalid
- `401`: The request authentication failed
- `403`: The request authorization failed
- `404`: The requested video was not found
- `422`: Unable to fetch video from origin
- `429`: Too many fetch jobs queued. Please try again later.
- `500`: Internal Server Error

## Changes

- **2026-11-12** `83116184952f`: 6 info
  - added the media type `application/json` for the response with the status `400`
  - added the media type `application/json` for the response with the status `401`
  - added the media type `application/json` for the response with the status `403`
  - added the media type `application/json` for the response with the status `404`
  - …2 more

[Operation history](https://skmtc.dev/bunny/apis/stream-api/changes/library/:libraryId/videos/fetch/post.md)

---

[API](https://skmtc.dev/bunny/apis/stream-api.md) - [All operations](https://skmtc.dev/bunny/apis/stream-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/stream-api/revisions/83116184952f?raw)
