logo
API GuidesYouTube

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.


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
  }'
FieldTypeRequiredDefaultDescription
querystringYesSearch query (1–500 chars)
max_resultsintegerNo20Number of results to return (1–50)
cachebooleanNotrueReturn 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
  }'
FieldTypeRequiredDefaultDescription
urlstringYesYouTube video URL (max 2048 chars)
include_captionsbooleanNofalseInclude auto-generated captions/transcript
cachebooleanNotrueReturn 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"}'
FieldTypeRequiredDefaultDescription
urlstringYesYouTube channel URL (max 2048 chars). Supports /c/name, /@handle, and /channel/UCxxx formats.
cachebooleanNotrueReturn 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
  }'
FieldTypeRequiredDefaultDescription
urlstringYesYouTube channel URL (max 2048 chars)
max_videosintegerNo50Maximum videos to return (1–500)
cachebooleanNotrueReturn 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
}