# Get channel latest videos



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

  Fetches the most recently published video as well as the latest uploaded videos for the given channel without needing to paginate through uploads.

  <Security permission="videos:read" />

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

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

    ```jsonc
    {
      "channel_id": string,          // Canonical 24-character channel ID (UC...)
      "channel_title": string,       // Channel display name
      "latest_video": {              // The single most recent or featured video published
        "video_id": string,          // 11-character video ID
        "title": string,             // Video title
        "length_text": string,       // Duration display text (e.g. "25:41")
        "view_count_text": string,   // Formatted view count (e.g. "600M views")
        "published_text": string     // Relative publish time (e.g. "2 days ago")
      },
      "recent_videos": [             // Array of recent video uploads from the channel feed
        {
          "video_id": string,        // 11-character video ID
          "title": string,           // Video title
          "length_text": string,     // Duration display text
          "view_count_text": string, // Formatted view count
          "published_text": string   // Relative publish time
        }
      ]
    }
    ```
  </div>

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

      const data = await response.json();
      console.log("Latest video:", data.latest_video?.title, data.latest_video?.video_id);
      console.log("Recent count:", data.recent_videos?.length);
      ```
    </LanguageSample>

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

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

      data = response.json()
      print("Latest:", data.get("latest_video", {}).get("title"))
      for v in data.get("recent_videos", []):
          print(v["video_id"], v["title"])
      ```
    </LanguageSample>

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

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

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

      func main() {
      	url := "https://api.ytapi.dev/v1/channels/@MrBeast/latest"
      	req, _ := http.NewRequest("GET", url, 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()

      	body, _ := io.ReadAll(resp.Body)
      	fmt.Println(string(body))
      }
      ```
    </LanguageSample>
  </MethodSamples>
</MethodPage>
