> ## Documentation Index
> Fetch the complete documentation index at: https://docs.transcriptmagic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> From key to transcript in under five minutes.

Three steps: generate a key in the dashboard, POST a video URL, parse the JSON. No SDK, no auth dance, no webhook plumbing.

<Steps>
  <Step title="Create an API key">
    Generate one in your [dashboard](https://transcriptmagic.com/dashboard/api-keys/). Free credits are included — no card to start.
  </Step>

  <Step title="POST a video URL">
    Send any supported URL in the `url` field. Auth via the `Authorization: Bearer` header.

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.transcriptmagic.com/api/youtube/transcript \
        -H "Authorization: Bearer YOUR_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{"url":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          "https://api.transcriptmagic.com/api/youtube/transcript",
          headers={"Authorization": "Bearer YOUR_API_KEY"},
          json={"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"},
      )

      data = response.json()
      # YouTube returns transcript as an array of timed segments
      for seg in data["transcript"]:
          print(seg["startTimeText"], seg["text"])
      ```

      ```javascript JavaScript theme={null}
      const response = await fetch("https://api.transcriptmagic.com/api/youtube/transcript", {
        method: "POST",
        headers: {
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json",
        },
        body: JSON.stringify({ url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }),
      });

      const data = await response.json();
      // YouTube returns transcript as an array of timed segments
      for (const seg of data.transcript) {
        console.log(seg.startTimeText, seg.text);
      }
      ```

      ```go Go theme={null}
      package main

      import (
          "bytes"
          "encoding/json"
          "fmt"
          "net/http"
      )

      func main() {
          body, _ := json.Marshal(map[string]string{
              "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
          })

          req, _ := http.NewRequest("POST",
              "https://api.transcriptmagic.com/api/youtube/transcript",
              bytes.NewBuffer(body))
          req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
          req.Header.Set("Content-Type", "application/json")

          resp, _ := http.DefaultClient.Do(req)
          defer resp.Body.Close()

          var data struct {
              Transcript []struct {
                  Text          string `json:"text"`
                  StartMs       string `json:"startMs"`
                  EndMs         string `json:"endMs"`
                  StartTimeText string `json:"startTimeText"`
              } `json:"transcript"`
              TranscriptOnlyText string `json:"transcript_only_text"`
          }
          json.NewDecoder(resp.Body).Decode(&data)
          fmt.Println(data.TranscriptOnlyText)
      }
      ```

      ```php PHP theme={null}
      <?php
      $ch = curl_init('https://api.transcriptmagic.com/api/youtube/transcript');

      curl_setopt($ch, CURLOPT_POST, true);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HTTPHEADER, [
          'Authorization: Bearer YOUR_API_KEY',
          'Content-Type: application/json',
      ]);
      curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
          'url' => 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
      ]));

      $response = curl_exec($ch);
      curl_close($ch);

      $data = json_decode($response, true);
      // YouTube returns transcript as an array of timed segments
      foreach ($data['transcript'] as $seg) {
          echo $seg['startTimeText'] . ' ' . $seg['text'] . "\n";
      }
      ```
    </CodeGroup>
  </Step>

  <Step title="Parse the JSON">
    The exact shape varies by platform. YouTube returns timed segments; TikTok and Facebook return the joined text plus optional video URLs; Instagram, LinkedIn, Rumble, and X return plain text. Sample YouTube response:

    ```json theme={null}
    {
      "success": true,
      "type": "video",
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "transcript": [
        { "text": "We're no strangers to love", "startMs": "18800", "endMs": "25960", "startTimeText": "0:18" },
        { "text": "You know the rules and so do I", "startMs": "21800", "endMs": "29119", "startTimeText": "0:21" }
      ],
      "transcript_only_text": "We're no strangers to love. You know the rules and so do I...",
      "language": "English",
      "videoId": "dQw4w9WgXcQ",
      "captionTracks": [/* available caption tracks */],
      "credits": 42
    }
    ```

    Full per-platform shapes live in the [response schema](/api-reference/response-schema).
  </Step>
</Steps>

## Swap platforms

Auth, path style, and the `url` body field never change — but the **response shape differs per platform** because each upstream source provides different metadata. YouTube gives you per-line timing; TikTok and Facebook give you joined text plus optional video URLs; Instagram gives you a `transcripts` array of plain-text lines; LinkedIn, Rumble, and X give you a plain `transcript` string. Plan for that when writing a unified client.

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Bearer tokens, key rotation, revocation.
  </Card>

  <Card title="Response schema" icon="brackets-curly" href="/api-reference/response-schema">
    Every field, every platform.
  </Card>

  <Card title="Rate limits" icon="gauge" href="/concepts/rate-limits">
    120/min per key. Headers on 429 responses.
  </Card>

  <Card title="Errors" icon="circle-exclamation" href="/concepts/errors">
    Status codes, messages, retry guidance.
  </Card>
</CardGroup>
