YouTube Channel API Documentation

The YouTube Channel API, accessible via the /api/v1/search?engine=youtube_channel endpoint, provides detailed information about YouTube channels. This API allows you to retrieve various data about a channel, including its statistics, video list, and more.

Key features of the YouTube Channel API include:

  • Channel statistics such as subscriber count, video count, and view count.
  • List of videos uploaded by the channel.
  • Channel metadata including title, description, keywords, and custom branding assets.
  • Access to channel's shorts and owned channels.

API Parameters

Search Query

  • Name
    channel_id
    Required
    Required
    Description

    Identifies the YouTube channel to query. Accepts a channel ID or an '@' handle from YouTube URLs. For channel IDs, use the format: https://www.youtube.com/channel/CHANNEL_ID. For '@' handles, use: https://www.youtube.com/@HANDLE. Examples: UCXZCJLdBC09xxGZ6gcdrc6A for channel IDs; @BostonDynamics for '@' handles.

Localization

  • Name
    gl
    Required
    Optional
    Description

    The default parameter us defines the country of the search. Check the full list of supported YouTube gl countries.

  • Name
    hl
    Required
    Optional
    Description

    The default parameter en defines the interface language of the search. Check the full list of supported YouTube hl languages.

Engine

  • Name
    engine
    Required
    Required
    Description

    Parameter defines the engine that will be used to retrieve real-time data. To retrieve YouTube video details, it must be set to youtube_channel.

API key

  • Name
    api_key
    Required
    Required
    Description

    The api_key authenticates your requests. Use it as a query parameter (https://www.searchapi.io/api/v1/search?api_key=YOUR_API_KEY) or in the Authorization header (Bearer YOUR_API_KEY).

API Examples

About

About
GET
https://www.searchapi.io/api/v1/search?channel_id=%40TaylorSwift&engine=youtube_channel
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "youtube_channel",
  "channel_id": "@TaylorSwift"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "about": {
    "description": "All’s fair in love and poetry... New album THE TORTURED POETS DEPARTMENT. Out April 19 🤍",
    "subscribers": 57300000,
    "videos": 226,
    "views": 34038258988,
    "joined_date": "2006-09-20",
    "joined_date_text": "Joined Sep 20, 2006",
    "links": [
      {
        "title": "The Tortured Poets Department",
        "link": "https://taylor.lnk.to/thetorturedpoetsdepartment"
      },
      {
        "title": "taylorswift.com",
        "link": "https://www.taylorswift.com"
      },
      {
        "title": "Instagram",
        "link": "https://instagram.com/taylorswift"
      },
      ...
    ]
  }
}

Channel

Channel
GET
https://www.searchapi.io/api/v1/search?channel_id=%40NHL&engine=youtube_channel
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "youtube_channel",
  "channel_id": "@NHL"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "channel": {
    "handle": "@NHL",
    "id": "UCqFMzb-4AUf6WAIbl132QKA",
    "title": "NHL",
    "subscribers": 2120000,
    "videos": 34000,
    "description": "The official YouTube channel for the National Hockey League.",
    "keywords": "\"National Hockey League\" NHL hockey highlight fight goal save hit blooper classic game action team player skill ice skating weird historic \"stanley cup\" \"stanley cup playoffs\" \"stanley cup final\" \"nhl playoffs 2023\" \"nhl playoffs\" \"nhl 2023\" \"stanley cup playoffs\"",
    "tags": [
      "National Hockey League",
      "NHL",
      ....
    ],
    "available_countries": [
      "CL",
      ...
    ],
    "facebook_profile_id": "nhl",
    "badges": ["NHL", "Verified"],
    "first_link": "https://www.nhl.com/",
    "is_verified": true,
    "is_family_safe": true,
    "banner": "https://yt3.googleusercontent.com/j0NUtcyFhIJdEORn1_bpLqKCu9cwzkPTLwlaXZwcA5BV4QFD8JkBKfy2jWY2lo1ol2ucHQQEdg=w2560-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj",
    "avatar": "https://yt3.googleusercontent.com/ytc/AIdro_lmoSnNwqVQXXQmdpb29k1jUpvCEdI1T6qR0w8EOJ2-o7GW=s900-c-k-c0x00ffffff-no-rj"
  }
}

Videos

Videos
GET
https://www.searchapi.io/api/v1/search?channel_id=%40WatchMojo&engine=youtube_channel
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "youtube_channel",
  "channel_id": "@WatchMojo"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "videos_section": [
    {
      "section_title": "New Uploads",
      "videos": [
        {
          "position": 1,
          "id": "mKdjycj-7eE",
          "title": "Stop This Train, Win a Lamborghini",
          "link": "https://www.youtube.com/watch?v=mKdjycj-7eE",
          "views": 98373524,
          "length": "18:53",
          "published_time": "10 days ago",
          "badges": ["Verified", "CC"],
          "thumbnail": "https://i.ytimg.com/vi/mKdjycj-7eE/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLBYY-JOFLo-qjCGYiIJWbMjuEiBBg"
        },
        ...
      ]
    },
    {
      "section_title": "Popular videos",
      "videos": [
        {
          "position": 1,
          "id": "0e3GPea1Tyg",
          "title": "$456,000 Squid Game In Real Life!",
          "link": "https://www.youtube.com/watch?v=0e3GPea1Tyg",
          "views": 591809623,
          "length": "25:42",
          "published_time": "2 years ago",
          "badges": ["Verified", "CC"],
          "thumbnail": "https://i.ytimg.com/vi/0e3GPea1Tyg/hqdefault.jpg?sqp=-oaymwEcCNACELwBSFXyq4qpAw4IARUAAIhCGAFwAcABBg==&rs=AOn4CLD97HrPD21P7TSwUSpdGr2vz7i7cg"
        },
        ...
      ]
    }
  ]
}

Shorts

Shorts
GET
https://www.searchapi.io/api/v1/search?channel_id=UCKuHFYu3smtrl2AwwMOXOlg&engine=youtube_channel
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "youtube_channel",
  "channel_id": "UCKuHFYu3smtrl2AwwMOXOlg"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "shorts_section": [
    {
      "section_title": "Shorts",
      "shorts": [
        {
          "position": 1,
          "id": "k1VsCucPt_8",
          "title": "We back in this thang!! Bad Boys: Ride or Die out June 7th! Y’all aren’t ready for this one 🤜🏾🤛🏾",
          "link": "https://www.youtube.com/watch?v=k1VsCucPt_8",
          "views": 34000,
          "thumbnail": "https://i.ytimg.com/vi/k1VsCucPt_8/oardefault.jpg?sqp=-oaymwEkCJUDENAFSFqQAgHyq4qpAxMIARUAAAAAJQAAyEI9AICiQ3gB&rs=AOn4CLDuR26srX9hmVbV1TaRgFHtl_5m0A"
        },
        {
          "position": 2,
          "id": "6OYkyJtAPWA",
          "title": "Should I bring back the Fresh Prince signature? #classof88",
          "link": "https://www.youtube.com/watch?v=6OYkyJtAPWA",
          "views": 129000,
          "thumbnail": "https://i.ytimg.com/vi/6OYkyJtAPWA/oardefault.jpg?sqp=-oaymwEkCJUDENAFSFqQAgHyq4qpAxMIARUAAAAAJQAAyEI9AICiQ3gB&rs=AOn4CLC8tsRbbAWDJozn0Z3pX8KLxIGNxQ"
        },
        ...
      ]
    }
  ]
}

Other Channels

Other Channels
GET
https://www.searchapi.io/api/v1/search?channel_id=%40WatchMojo&engine=youtube_channel
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "youtube_channel",
  "channel_id": "@WatchMojo"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "other_channels": [
    {
      "position": 1,
      "handle": "@WatchMojoShorts",
      "id": "UC7A7loOIJHwdq9-Kkw3s17A",
      "title": "WatchMojoShorts",
      "link": "https://www.youtube.com/channel/UC7A7loOIJHwdq9-Kkw3s17A",
      "video_count": 647,
      "subscribers": 87500
    },
    {
      "position": 2,
      "handle": "@MsMojo",
      "id": "UC3rLoj87ctEHCcS7BuvIzkQ",
      "title": "MsMojo",
      "link": "https://www.youtube.com/channel/UC3rLoj87ctEHCcS7BuvIzkQ",
      "video_count": 7555,
      "subscribers": 5230000
    },
    ...
  ]
}
Featured Channel
GET
https://www.searchapi.io/api/v1/search?channel_id=%40NHL&engine=youtube_channel
Request
import requests

url = "https://www.searchapi.io/api/v1/search"
params = {
  "engine": "youtube_channel",
  "channel_id": "@NHL"
}

response = requests.get(url, params = params)
print(response.text)
Response
{
  "featured_channel": {
    "handle": "@nhleurope",
    "id": "UCK3CHl-6e3hq4gQaz_TOyoQ",
    "title": "NHL Europe",
    "link": "https://www.youtube.com/channel/UCK3CHl-6e3hq4gQaz_TOyoQ",
    "description": "The official YouTube channel for the NHL in Europe. NHL:n virallinen YouTube-kanava Euroopassa. National Hockey Leagues officiella Youtube-kanal för NHL i Europa. Der offizielle YouTube-Kanal für die NHL in Europa. Oficiální platforma kanálu YouTube NHL v Evropě. Oficiálna platforma kanála YouTube NHL v Európe",
    "subscribers": 3780
  }
}