# 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="videos:read" />

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

  <div id="returns" className="mt-8">
    Response (HTTP 200) [#response-http-200]

    ```jsonc
    {
      "channel_id": string,          // Canonical 24-character channel ID (UC...)
      "title": string,               // Channel display name
      "handle": string,              // Public handle, including @
      "description": string,         // Channel about text
      "subscriber_count": number,    // Approximate subscriber count
      "subscriber_count_text": string, // Formatted subscriber display string (e.g. "318M subscribers")
      "custom_url": string,          // Canonical channel URL (e.g. "https://www.youtube.com/@MrBeast")
      "country": string,             // ISO country code of the channel (when exposed)
      "video_count": number,         // Public upload count
      "verified": boolean,           // Whether channel has verified badge
      "thumbnails": [                // Avatar image variants
        {
          "url": string,
          "width": number,
          "height": number
        }
      ],
      "banners": [                   // Channel banner image variants
        {
          "url": string,
          "width": number,
          "height": number
        }
      ],
      "links": string[],             // External links from the channel page
      "available_tabs": string[]     // Available tabs (videos, shorts, streams, playlists)
    }
    ```
  </div>

  <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>
  </MethodSamples>
</MethodPage>
