---
title: "The clip's original video file, for a <video> tag"
method: GET
path: "/v1/hooks/{hook_id}/media"
tags: ["hooks"]
---

# The clip's original video file, for a <video> tag

`GET /v1/hooks/{hook_id}/media`

## Request

- Base URL: `https://api.hookdetector.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.hookdetector.com/v1/hooks/{hook_id}/media`
- Auth: none declared

Play a TikTok or Instagram clip in your own player: put this URL (the hook's
media_url) in a <video src>. It answers a 302 to the clip's original file on the
platform's CDN, which plays with seeking; no video byte is stored or proxied. No key needed.
404 media_unavailable for a clip with no file (a YouTube Short, a photo post, a deleted
post) and 503 media_busy when it cannot be looked up now: show the official embed
instead. After a playback error, ask once with ?retry=1 for a fresh address. With
?format=json it answers 200 {url, expires_in} instead of redirecting. Free.

## Path parameters

- `hook_id` string, uuid, required

## Query parameters

- `retry` boolean
- `format` 'redirect' | 'json'

## Response `200`

with ?format=json: the file address as JSON

- MediaOut: GET /v1/hooks/{hook_id}/media?format=json (FAILURE_MODES.md BT-M17).
  - `url` string, required: the clip's original video file on the platform's CDN; it plays in a <video> on any page and answers range requests
  - `expires_in` integer, required: seconds a client may keep the address; ask again after

## Other responses

- `302`: a redirect to the clip's current file on the platform's own video CDN (TikTok or Instagram)
- `404`: not found on this account
- `422`: invalid input
- `429`: rate limited; see Retry-After
- `503`: the language model is unavailable

---

[API](https://skmtc.dev/hookdetector/apis/hook-detector.md) · [All operations](https://skmtc.dev/hookdetector/apis/hook-detector/llms.txt) · [OpenAPI document](https://skmtc.dev/hookdetector/apis/hook-detector/revisions/b136a2804d2b?raw)
