YouTube video detail
Retrieve video detail with the YouTube API. Input fields and response shapes depend on the selected implementation. Use it in a video discovery or content monitoring workflow. Choose an implementation and check its published request fields, examples, and usage pricing before integrating.
- Selected price
- $0.00188 / callPublished pricing
- Sellers / APIs
- 2 / 3
- Requests · 30d
- —Loading...
- Success rate · 30d
- —Loading...
YouTube video detail
Prepare your request, then continue with your agent.
Selected price
$0.00188 / call
- Provider
- API
- Pricing
On this page
Playground
Run sends a real API request. Charges follow the published API contract.
Response structure
captionTracksobject[]baseUrlstringisTranslatablebooleankindstringlanguageCodestringnameobjectsimpleTextstring
trackNamestringvssIdstring
channelobjecthandlestringidstringtitlestringurlstring
chaptersunknown[]collaboratorsunknown[]commentCountIntintegercommentCountTextstringcredits_chargedintegercredits_remainingintegerdescriptionnulldescriptionLinksunknown[]durationFormattedstringdurationMsintegergenrestringidstringisPaidPromotionbooleankeywordsunknown[]likeCountIntintegerlikeCountTextstringmost_replayednullpublishDatestringpublishDateTextstringsuccessbooleanthumbnailstringtitlestringtypestringurlstringviewCountIntintegerviewCountTextstringwatchNextVideosobject[]channelobjecthandlestringidstringtitlestringurlstring
idstringlengthInSecondsintegerlengthTextstringpublishDatestringpublishDateTextstringpublishedTimestringpublishedTimeTextstringthumbnailstringtitlestringvideoUrlstringviewCountIntintegerviewCountTextstring
// Inferred from response examples. Fields are optional and other fields may be returned.
export type ApiResponse = {
captionTracks?: Array<{
baseUrl?: string;
isTranslatable?: boolean;
kind?: string;
languageCode?: string;
name?: {
simpleText?: string;
};
trackName?: string;
vssId?: string;
}>;
channel?: {
handle?: string;
id?: string;
title?: string;
url?: string;
};
chapters?: Array<unknown>;
collaborators?: Array<unknown>;
commentCountInt?: number;
commentCountText?: string;
credits_charged?: number;
credits_remaining?: number;
description?: null;
descriptionLinks?: Array<unknown>;
durationFormatted?: string;
durationMs?: number;
genre?: string;
id?: string;
isPaidPromotion?: boolean;
keywords?: Array<unknown>;
likeCountInt?: number;
likeCountText?: string;
most_replayed?: null;
publishDate?: string;
publishDateText?: string;
success?: boolean;
thumbnail?: string;
title?: string;
type?: string;
url?: string;
viewCountInt?: number;
viewCountText?: string;
watchNextVideos?: Array<{
channel?: {
handle?: string;
id?: string;
title?: string;
url?: string;
};
id?: string;
lengthInSeconds?: number;
lengthText?: string;
publishDate?: string;
publishDateText?: string;
publishedTime?: string;
publishedTimeText?: string;
thumbnail?: string;
title?: string;
videoUrl?: string;
viewCountInt?: number;
viewCountText?: string;
}>;
};Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
Current YouTube — Video/Short Details · GET · View API reference | $0.00188 / call | — | —successP50— | |
| Get video information · GET · View API reference | $0.001 / call | —Select to load statistics | —successP50— | |
| Get video information V2 · GET · View API reference | $0.001 / call | —Select to load statistics | —successP50— |
- Unit price
- $0.00188
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 3. Price update time: not supplied.
Total $0.188
API
- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/scrapecreators/v1/youtube/video- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
'https://api.openany.si/v1/agent-apis/scrapecreators/v1/youtube/video?language=en&url=https%3A%2F%2Fyoutu.be%2FgTCi7PaOPLY' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
url | URL query parametersquery | string | Yes | YouTube video or short URL |
language | URL query parametersquery | string | No | Preferred response language (mapped to Accept-Language header; not guaranteed due to YouTube localization behavior). 2 letter language code, ie 'en', 'es', 'fr' etc. |
cache_max_age | URL query parametersquery | string | No | If we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with "cached": true and a "cached_at" timestamp). Otherwise, scrape a live result (1 credit). [See the Caching page for details.](https://docs.scrapecreators.com/caching) enum: "1d", "3d", "7d", "14d", "30d" |
Required markers inside a nested object or variant apply when that object or variant is used.
Sample response
Sample response · Documented HTTP 200 Example from the provider's documentation. Field values in your results will differ.
{
"captionTracks": [
{
"baseUrl": "https://www.youtube.com/api/timedtext?v=Y2Ah_DFr8cw&ei=s5Bqab0gu8yS5w_pvOLIDw&caps=asr&opi=112496729&xoaf=5&xowf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1768616739&sparams=ip,ipbits,expire,v,ei,caps,opi,xoaf&signature=306A57ADE14FECC84B0DB13190761BCCC922AC9B.5C321C4FE7086F7AF851CA8463326E1869EE5255&key=yt8&kind=asr&lang=en",
"isTranslatable": true,
"kind": "asr",
"languageCode": "en",
"name": {
"simpleText": "English (auto-generated)"
},
"trackName": "",
"vssId": "a.en"
}
],
"channel": {
"handle": "afroballer8906",
"id": "UCWH3hing1Qb4LnkRfQdxsxQ",
"title": "Afroballer",
"url": "https://www.youtube.com/@afroballer8906"
},
"chapters": [],
"collaborators": [],
"commentCountInt": 358,
"commentCountText": "358",
"credits_charged": 1,
"credits_remaining": 33851527,
"description": null,
"descriptionLinks": [],
"durationFormatted": "00:05:48",
"durationMs": 348000,
"genre": "People & Blogs",
"id": "Y2Ah_DFr8cw",
"isPaidPromotion": false,
"keywords": [],
"likeCountInt": 4043,
"likeCountText": "4043",
"most_replayed": null,
"publishDate": "2019-02-22T03:19:54-08:00",
"publishDateText": "Feb 22, 2019",
"success": true,
"thumbnail": "https://img.youtube.com/vi/Y2Ah_DFr8cw/maxresdefault.jpg",
"title": "Inside the NBA: Chuck Trolls Jussie Smollett \"Do not commit crimes with checks, use cash!\"",
"type": "video",
"url": "https://www.youtube.com/watch?v=Y2Ah_DFr8cw",
"viewCountInt": 372864,
"viewCountText": "372,864",
"watchNextVideos": [
{
"channel": {
"handle": "SkyHooked",
"id": "UCrX8GD5f_O-Cu5Y2vQuSSvw",
"title": "SkyHooked",
"url": "https://www.youtube.com/@SkyHooked"
},
"id": "lzDTK5kEdkM",
"lengthInSeconds": 1081,
"lengthText": "18:01",
"publishDate": "2025-02-16T19:25:39.493Z",
"publishDateText": "11 months ago",
"publishedTime": "2025-02-16T19:25:39.493Z",
"publishedTimeText": "11 months ago",
"thumbnail": "https://i.ytimg.com/vi/lzDTK5kEdkM/hqdefault.jpg?sqp=-oaymwEmCKgBEF5IWvKriqkDGQgBFQAAiEIYAdgBAeIBCggYEAIYBjgBQAE=&rs=AOn4CLAq_osvQnsGV3A7uz4L1CPTaLqppg",
"title": "Charles Barkley and Shaq FUNNIEST MOMENTS",
"videoUrl": "https://www.youtube.com/watch?v=lzDTK5kEdkM",
"viewCountInt": 1800000,
"viewCountText": "1.8M views"
}
]
}Agent integration
Copy the resource contract without sharing an API key.
View API Markdown
# YouTube video detail
Retrieve video detail with the YouTube API. Input fields and response shapes depend on the selected implementation. Use it in a video discovery or content monitoring workflow. Choose an implementation and check its published request fields, examples, and usage pricing before integrating.
## Available implementations
scrapecreators · YouTube — Video/Short Details: https://openany.si/markets/apis/capabilities/youtube-video-detail?offering=f9729bf3-20de-4c21-97df-688fcc9c4e6b · $0.00188 / call
tikhub · Get video information: https://openany.si/markets/apis/capabilities/youtube-video-detail?offering=507137dd-cc90-454a-8208-869c802cbc91 · $0.001 / call
tikhub · Get video information V2: https://openany.si/markets/apis/capabilities/youtube-video-detail?offering=ebf2d4e7-b2ac-4df9-a951-3c2acd786539 · $0.001 / call
## Selected API contract
Documentation: https://openany.si/apis/f9729bf3-20de-4c21-97df-688fcc9c4e6b
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/scrapecreators/v1/youtube/video
Price: $0.00188 / call
Provider: scrapecreators
Contract revision: 3
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.
Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.
## Prepared request
```bash
curl \
'https://api.openany.si/v1/agent-apis/scrapecreators/v1/youtube/video?language=en&url=https%3A%2F%2Fyoutu.be%2FgTCi7PaOPLY' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'
```
## API contract
```json
{
"resource_type": "api",
"name": "YouTube — Video/Short Details",
"endpoint": "https://api.openany.si/v1/agent-apis/scrapecreators/v1/youtube/video",
"method": "GET",
"content_type": "none",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "YouTube video or short URL",
"location": "query",
"name": "url",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "Preferred response language (mapped to Accept-Language header; not guaranteed due to YouTube localization behavior). 2 letter language code, ie 'en', 'es', 'fr' etc.",
"location": "query",
"name": "language",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "If we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with \"cached\": true and a \"cached_at\" timestamp). Otherwise, scrape a live result (1 credit). [See the Caching page for details.](https://docs.scrapecreators.com/caching)",
"enum_values": [
"1d",
"3d",
"7d",
"14d",
"30d"
],
"location": "query",
"name": "cache_max_age",
"nullable": false,
"required": false,
"type": "string"
}
],
"billing": {
"currency": "USD",
"mode": "fixed",
"priceMicroUsd": "1880",
"rounding": null,
"unit": "call",
"unitQuantity": null
},
"examples": [
{
"http_status": 200,
"name": "Official example",
"request": {
"body": null,
"headers": {},
"path": {},
"query": {
"language": "en",
"url": "https://youtu.be/gTCi7PaOPLY"
}
},
"response_body": {
"captionTracks": [
{
"baseUrl": "https://www.youtube.com/api/timedtext?v=Y2Ah_DFr8cw&ei=s5Bqab0gu8yS5w_pvOLIDw&caps=asr&opi=112496729&xoaf=5&xowf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1768616739&sparams=ip,ipbits,expire,v,ei,caps,opi,xoaf&signature=306A57ADE14FECC84B0DB13190761BCCC922AC9B.5C321C4FE7086F7AF851CA8463326E1869EE5255&key=yt8&kind=asr&lang=en",
"isTranslatable": true,
"kind": "asr",
"languageCode": "en",
"name": {
"simpleText": "English (auto-generated)"
},
"trackName": "",
"vssId": "a.en"
}
],
"channel": {
"handle": "afroballer8906",
"id": "UCWH3hing1Qb4LnkRfQdxsxQ",
"title": "Afroballer",
"url": "https://www.youtube.com/@afroballer8906"
},
"chapters": [],
"collaborators": [],
"commentCountInt": 358,
"commentCountText": "358",
"credits_charged": 1,
"credits_remaining": 33851527,
"description": null,
"descriptionLinks": [],
"durationFormatted": "00:05:48",
"durationMs": 348000,
"genre": "People & Blogs",
"id": "Y2Ah_DFr8cw",
"isPaidPromotion": false,
"keywords": [],
"likeCountInt": 4043,
"likeCountText": "4043",
"most_replayed": null,
"publishDate": "2019-02-22T03:19:54-08:00",
"publishDateText": "Feb 22, 2019",
"success": true,
"thumbnail": "https://img.youtube.com/vi/Y2Ah_DFr8cw/maxresdefault.jpg",
"title": "Inside the NBA: Chuck Trolls Jussie Smollett \"Do not commit crimes with checks, use cash!\"",
"type": "video",
"url": "https://www.youtube.com/watch?v=Y2Ah_DFr8cw",
"viewCountInt": 372864,
"viewCountText": "372,864",
"watchNextVideos": [
{
"channel": {
"handle": "SkyHooked",
"id": "UCrX8GD5f_O-Cu5Y2vQuSSvw",
"title": "SkyHooked",
"url": "https://www.youtube.com/@SkyHooked"
},
"id": "lzDTK5kEdkM",
"lengthInSeconds": 1081,
"lengthText": "18:01",
"publishDate": "2025-02-16T19:25:39.493Z",
"publishDateText": "11 months ago",
"publishedTime": "2025-02-16T19:25:39.493Z",
"publishedTimeText": "11 months ago",
"thumbnail": "https://i.ytimg.com/vi/lzDTK5kEdkM/hqdefault.jpg?sqp=-oaymwEmCKgBEF5IWvKriqkDGQgBFQAAiEIYAdgBAeIBCggYEAIYBjgBQAE=&rs=AOn4CLAq_osvQnsGV3A7uz4L1CPTaLqppg",
"title": "Charles Barkley and Shaq FUNNIEST MOMENTS",
"videoUrl": "https://www.youtube.com/watch?v=lzDTK5kEdkM",
"viewCountInt": 1800000,
"viewCountText": "1.8M views"
}
]
}
}
]
}
```Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Official example
Example from the provider's documentation. Field values in your results will differ.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 3
Review these request fields before running. Keep the published provider and request method unchanged.
url- YouTube video or short URL
language- Preferred response language (mapped to Accept-Language header; not guaranteed due to YouTube localization behavior). 2 letter language code, ie 'en', 'es', 'fr' etc.
cache_max_age- If we have a response in the cache that is this many days old or newer, return the cached response (0 credits, with "cached": true and a "cached_at" timestamp). Otherwise, scrape a live result (1 credit). [See the Caching page for details.](https://docs.scrapecreators.com/caching)
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/scrapecreators/v1/youtube/video?language=en&url=https%3A%2F%2Fyoutu.be%2FgTCi7PaOPLY' \ -X GET \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json'Check the response
Sample response · Documented HTTP 200
Sample response{ "captionTracks": [ { "baseUrl": "https://www.youtube.com/api/timedtext?v=Y2Ah_DFr8cw&ei=s5Bqab0gu8yS5w_pvOLIDw&caps=asr&opi=112496729&xoaf=5&xowf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1768616739&sparams=ip,ipbits,expire,v,ei,caps,opi,xoaf&signature=306A57ADE14FECC84B0DB13190761BCCC922AC9B.5C321C4FE7086F7AF851CA8463326E1869EE5255&key=yt8&kind=asr&lang=en", "isTranslatable": true, "kind": "asr", "languageCode": "en", "name": { "simpleText": "English (auto-generated)" }, "trackName": "", "vssId": "a.en" } ], "channel": { "handle": "afroballer8906", "id": "UCWH3hing1Qb4LnkRfQdxsxQ", "title": "Afroballer", "url": "https://www.youtube.com/@afroballer8906" }, "chapters": [], "collaborators": [], "commentCountInt": 358, "commentCountText": "358", "credits_charged": 1, "credits_remaining": 33851527, "description": null, "descriptionLinks": [], "durationFormatted": "00:05:48", "durationMs": 348000, "genre": "People & Blogs", "id": "Y2Ah_DFr8cw", "isPaidPromotion": false, "keywords": [], "likeCountInt": 4043, "likeCountText": "4043", "most_replayed": null, "publishDate": "2019-02-22T03:19:54-08:00", "publishDateText": "Feb 22, 2019", "success": true, "thumbnail": "https://img.youtube.com/vi/Y2Ah_DFr8cw/maxresdefault.jpg", "title": "Inside the NBA: Chuck Trolls Jussie Smollett \"Do not commit crimes with checks, use cash!\"", "type": "video", "url": "https://www.youtube.com/watch?v=Y2Ah_DFr8cw", "viewCountInt": 372864, "viewCountText": "372,864", "watchNextVideos": [ { "channel": { "handle": "SkyHooked", "id": "UCrX8GD5f_O-Cu5Y2vQuSSvw", "title": "SkyHooked", "url": "https://www.youtube.com/@SkyHooked" }, "id": "lzDTK5kEdkM", "lengthInSeconds": 1081, "lengthText": "18:01", "publishDate": "2025-02-16T19:25:39.493Z", "publishDateText": "11 months ago", "publishedTime": "2025-02-16T19:25:39.493Z", "publishedTimeText": "11 months ago", "thumbnail": "https://i.ytimg.com/vi/lzDTK5kEdkM/hqdefault.jpg?sqp=-oaymwEmCKgBEF5IWvKriqkDGQgBFQAAiEIYAdgBAeIBCggYEAIYBjgBQAE=&rs=AOn4CLAq_osvQnsGV3A7uz4L1CPTaLqppg", "title": "Charles Barkley and Shaq FUNNIEST MOMENTS", "videoUrl": "https://www.youtube.com/watch?v=lzDTK5kEdkM", "viewCountInt": 1800000, "viewCountText": "1.8M views" } ] }