# Get basic video info



<MethodPage method="GET" path="/v1/videos/{id}/basic-info" credits={0}>
  <MethodSignature name="getVideoBasicInfo" args={[{ name: "id" }, { name: "query", optional: true }, { name: "options", optional: true }]} returns="VideoBasicInfo" />

  Free lookup. Returns essential video metadata: title, duration, channel attribution, and available caption languages without consuming credits or YouTube Data API quota. Use it as a quick pre-check or validation step before spending credits on transcript extraction or full metadata.

  <Callout type="info" title="Credits">
    Successful `basic-info` responses are completely free (0 credits). Failed lookups are not billed.
  </Callout>

  <Security permission="videos:read" />

  <SchemaGroup title="Path Parameters">
    <SchemaField name="id" type="string" location="path" required>
      11-character YouTube video ID or video URL.
    </SchemaField>
  </SchemaGroup>

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

    ```jsonc
    {
      "video_id": string,          // Echoed YouTube video ID
      "title": string,             // Video title
      "length_seconds": number,    // Duration in seconds
      "channel": {                 // Channel attribution
        "id": string,              // Canonical channel ID
        "title": string,           // Channel display name
        "url": string              // Channel URL
      },
      "available_languages": [     // Caption tracks advertised for the video
        {
          "code": string,          // ISO language code (e.g. "en")
          "name": string,          // Display name (e.g. "English (auto-generated)")
          "kind": string           // "asr" or "manual"
        }
      ]
    }
    ```
  </div>

  <MethodSamples>
    <LanguageSample language="cURL">
      ```bash
      curl -X GET "https://api.ytapi.dev/v1/videos/kCc8FmEb1nY/basic-info" \
        -H "Authorization: Bearer $YT_API_KEY"
      ```
    </LanguageSample>

    <LanguageSample language="TypeScript">
      ```ts
      const id = "kCc8FmEb1nY";
      const response = await fetch(
        `https://api.ytapi.dev/v1/videos/${id}/basic-info`,
        {
          headers: {
            Authorization: `Bearer ${process.env.YT_API_KEY}`,
          },
        },
      );

      const video = await response.json();
      console.log(video.title, video.length_seconds, video.available_languages);
      ```
    </LanguageSample>

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

      response = requests.get(
          "https://api.ytapi.dev/v1/videos/kCc8FmEb1nY/basic-info",
          headers={"Authorization": f"Bearer {os.environ['YT_API_KEY']}"},
      )
      video = response.json()
      print(video["title"], video["length_seconds"])
      ```
    </LanguageSample>

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

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

      func main() {
      	req, _ := http.NewRequest("GET", "https://api.ytapi.dev/v1/videos/kCc8FmEb1nY/basic-info", 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>
