Objects
ResolvedVideo
What GET /v1/youtube, /v1/tiktok, /v1/instagram and /v1/resolve return.
Fields#
| field | type | description |
|---|---|---|
| service | youtube | tiktok | instagram | Which service handled the request. |
| id | string | The platform's own id for the video. |
| title | string | Title or caption (may be empty). |
| channel | string | Channel, author or account name (may be empty). |
| durationSec | number | Duration in seconds (0 when unknown). |
| thumbnail | string | null | Cover image URL from the platform. |
| bestQuality | string | Label of the format in downloadUrl, e.g. 720p. |
| formats | MediaFormat[] | Every format available to your plan: { id, label, container, kind, sizeMb, url }. |
| downloadUrl | string | Direct link to the video file in CrawlFetch storage. Does not expire after a few hours. |
| audioUrl | string | Audio-only m4a (Starter and up), otherwise empty. |
| credits | number | Credits this call cost: platform base + credits per MB of the file, rounded up (also x-credits-charged). |
| resolvedInMs | number | How long this call took on our side, in ms (also the x-resolve-ms header). The first resolve of a video includes the download; repeats come from storage. |
| cached | boolean | true when the video was already in storage and nothing was downloaded. |
| source | string | "storage" for a cached answer, otherwise the downloader that fetched the fresh copy. |
MediaFormat#
| field | type | description |
|---|---|---|
| id | string | Format id, e.g. r2_720p. |
| label | string | Quality label (720p) or audio. |
| container | mp4 | m4a | File type. |
| kind | video | audio | What the file contains. |
| sizeMb | number | File size in MB (0 when not stored yet). |
| url | string | Link to the stored file, empty when not stored yet. |
Headers#
x-credits-charged: credits this request cost.x-credits-remaining: your balance after it.x-resolve-ms: time spent on our side.x-grabcast-service: which platform handled the request.
Example#
response.json200 OK
{"service": "youtube","id": "aqz-KE-bpKQ","title": "Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film","channel": "Blender","durationSec": 635,"thumbnail": "https://i.ytimg.com/vi/aqz-KE-bpKQ/hqdefault.jpg","bestQuality": "720p","formats": [{"id": "r2_720p","label": "720p","container": "mp4","kind": "video","sizeMb": 18.4,"url": "https://media.crawlfetch.com/grabcast/youtube/aqz-KE-bpKQ/720p.mp4"}],"downloadUrl": "https://media.crawlfetch.com/grabcast/youtube/aqz-KE-bpKQ/720p.mp4","audioUrl": "","resolvedInMs": 9120}