YouTube APIs
Search YouTube videos, extract video metadata and captions, and scrape channel data.
All YouTube endpoints require a valid YouTube URL matching https://www.youtube.com/.... The cache parameter (default true) returns cached results for recently fetched URLs.
YouTube Video Search
Search YouTube for videos matching a keyword query.
Endpoint: POST /youtube_search
Credits: 1 per call | Quota: 25,000/month
Request
curl -X POST https://v3-api.texau.com/api/v1/youtube_search \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "growth hacking SaaS",
"max_results": 20
}'
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | Yes | — | Search query (1–500 chars) |
max_results | integer | No | 20 | Number of results to return (1–50) |
cache | boolean | No | true | Return cached result if available |
Response
{
"query": "growth hacking SaaS",
"results": [
{
"video_id": "dQw4w9WgXcQ",
"title": "Growth Hacking for SaaS Companies",
"description": "In this video we cover...",
"channel": {
"id": "UCxxxxxxxxxxxxxx",
"name": "SaaS Growth Lab",
"url": "https://www.youtube.com/c/saasgrowthlab"
},
"published_at": "2024-08-15",
"duration": "PT18M32S",
"views": 45200,
"likes": 1230,
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
],
"total_results": 20
}
Video Details
Fetch full metadata for a YouTube video, and optionally its captions/transcript.
Endpoint: POST /youtube_video
Credits: 1 per call | Quota: 25,000/month
Request
curl -X POST https://v3-api.texau.com/api/v1/youtube_video \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"include_captions": true
}'
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | — | YouTube video URL (max 2048 chars) |
include_captions | boolean | No | false | Include auto-generated captions/transcript |
cache | boolean | No | true | Return cached result if available |
Response
{
"video_id": "dQw4w9WgXcQ",
"title": "Growth Hacking for SaaS Companies",
"description": "In this video we cover the top growth hacking strategies...",
"channel": {
"id": "UCxxxxxxxxxxxxxx",
"name": "SaaS Growth Lab",
"url": "https://www.youtube.com/c/saasgrowthlab",
"subscribers": 85000
},
"published_at": "2024-08-15T14:30:00Z",
"duration": "PT18M32S",
"duration_seconds": 1112,
"views": 45200,
"likes": 1230,
"comments_count": 87,
"tags": ["growth hacking", "saas", "marketing"],
"category": "Science & Technology",
"language": "en",
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"captions": [
{
"start": 0.0,
"duration": 4.5,
"text": "Welcome to this video on growth hacking..."
},
{
"start": 4.5,
"duration": 3.2,
"text": "Today we're going to cover five strategies..."
}
]
}
Captions are only included when include_captions: true. Not all videos have captions available.
Channel Details
Fetch metadata and statistics for a YouTube channel.
Endpoint: POST /youtube_channel
Credits: 1 per call | Quota: 25,000/month
Request
curl -X POST https://v3-api.texau.com/api/v1/youtube_channel \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.youtube.com/c/saasgrowthlab"}'
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | — | YouTube channel URL (max 2048 chars). Supports /c/name, /@handle, and /channel/UCxxx formats. |
cache | boolean | No | true | Return cached result if available |
Response
{
"channel_id": "UCxxxxxxxxxxxxxx",
"name": "SaaS Growth Lab",
"handle": "@saasgrowthlab",
"description": "Weekly videos on SaaS growth, marketing, and product...",
"country": "US",
"language": "en",
"subscribers": 85000,
"total_views": 4200000,
"video_count": 312,
"joined_at": "2019-04-12",
"thumbnail": "https://yt3.ggpht.com/.../photo.jpg",
"banner": "https://yt3.ggpht.com/.../banner.jpg",
"url": "https://www.youtube.com/c/saasgrowthlab",
"links": [
"https://saasgrowthlab.com",
"https://twitter.com/saasgrowthlab"
]
}
Channel Videos
Fetch the video listing for a YouTube channel.
Endpoint: POST /youtube_channel_videos
Credits: 2 per call | Quota: 25,000/month
Request
curl -X POST https://v3-api.texau.com/api/v1/youtube_channel_videos \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/c/saasgrowthlab",
"max_videos": 50
}'
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | — | YouTube channel URL (max 2048 chars) |
max_videos | integer | No | 50 | Maximum videos to return (1–500) |
cache | boolean | No | true | Return cached result if available |
Response
{
"channel_id": "UCxxxxxxxxxxxxxx",
"channel_name": "SaaS Growth Lab",
"videos": [
{
"video_id": "dQw4w9WgXcQ",
"title": "Growth Hacking for SaaS Companies",
"published_at": "2024-08-15",
"duration": "PT18M32S",
"views": 45200,
"likes": 1230,
"thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
}
],
"total_retrieved": 50
}
Last updated 2 weeks ago
Built with Documentation.AI