# Get channel



<MethodPage method="GET" path="/v1/channels/{id}" credits={1}>
  <MethodSignature name="getChannel" args={[{ name: "id" }, { name: "query", optional: true }, { name: "options", optional: true }]} returns="Channel" />

  Handles such as `@MrBeast` and 24-character channel IDs (`UC...`) are resolved automatically.

  <Security permission="transcripts:read" />

  <SchemaGroup title="Parameters">
    <SchemaField name="id" type="string" location="path">
      Channel handle (for example `@MrBeast`) or canonical channel ID.
    </SchemaField>

    <SchemaField name="required_country" type="string" optional location="query">
      ISO country hint used when region availability matters.
    </SchemaField>
  </SchemaGroup>

  <SchemaGroup title="Returns" id="returns">
    <SchemaField name="channel_id" type="string">
      Canonical 24-character channel ID.
    </SchemaField>

    <SchemaField name="title" type="string">
      Channel display name.
    </SchemaField>

    <SchemaField name="handle" type="string">
      Public handle, including `@`.
    </SchemaField>

    <SchemaField name="description" type="string">
      Channel about text.
    </SchemaField>

    <SchemaField name="subscriber_count" type="number">
      Approximate subscriber count.
    </SchemaField>

    <SchemaField name="video_count" type="number">
      Public upload count.
    </SchemaField>

    <SchemaField name="verified" type="boolean">
      Whether the channel has a verified badge.
    </SchemaField>

    <SchemaField name="thumbnails" type="Thumbnail[]">
      Avatar images.
    </SchemaField>

    <SchemaField name="banners" type="Thumbnail[]">
      Banner images.
    </SchemaField>

    <SchemaField name="links" type="string[]">
      External links from the channel page.
    </SchemaField>

    <SchemaField name="available_tabs" type="string[]">
      Tabs that can be listed, such as `videos`, `shorts`, `streams`, and `playlists`.
    </SchemaField>
  </SchemaGroup>

  <MethodSamples>
    <LanguageSample language="TypeScript">
      ```ts
      const response = await fetch("https://api.ytapi.dev/v1/channels/@MrBeast", {
        headers: {
          Authorization: `Bearer ${process.env.YT_API_KEY}`,
        },
      });

      const channel = await response.json();
      console.log(channel.title, channel.subscriber_count);
      ```
    </LanguageSample>

    <LanguageSample language="Python">
      ```python
      import os
      import requests

      response = requests.get(
          "https://api.ytapi.dev/v1/channels/@MrBeast",
          headers={"Authorization": f"Bearer {os.environ['YT_API_KEY']}"},
      )

      print(response.json())
      ```
    </LanguageSample>

    <LanguageSample language="cURL">
      ```bash
      curl -X GET "https://api.ytapi.dev/v1/channels/@MrBeast" \
        -H "Authorization: Bearer $YT_API_KEY"
      ```
    </LanguageSample>

    <LanguageSample language="Go">
      ```go
      package main

      import (
      	"fmt"
      	"net/http"
      	"os"
      )

      func main() {
      	req, _ := http.NewRequest("GET", "https://api.ytapi.dev/v1/channels/@MrBeast", nil)
      	req.Header.Set("Authorization", "Bearer "+os.Getenv("YT_API_KEY"))

      	resp, err := http.DefaultClient.Do(req)
      	if err != nil {
      		panic(err)
      	}
      	defer resp.Body.Close()
      	fmt.Println(resp.Status)
      }
      ```
    </LanguageSample>

    <ResponseExample status={200}>
      ```json
      {
        "channel_id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
        "title": "MrBeast",
        "handle": "@MrBeast",
        "description": "SUBSCRIBE FOR A COOKIE! New video every single Saturday...",
        "subscriber_count": 517000000,
        "subscriber_count_text": "517M subscribers",
        "video_count": 1000,
        "verified": true,
        "custom_url": "http://www.youtube.com/@MrBeast",
        "country": "US",
        "thumbnails": [
          { "url": "https://yt3.googleusercontent.com/nxYrc_1_=s900", "width": 900, "height": 900 }
        ],
        "links": ["https://www.instagram.com/mrbeast/"],
        "available_tabs": ["videos", "shorts", "streams", "playlists"]
      }
      ```
    </ResponseExample>
  </MethodSamples>
</MethodPage>
