Docs menu

Crawlora Docs

Build a YouTube Transcript Analysis Workflow

Fetch transcript or caption data, store segments, summarize videos, and index source-linked content.

Overview

Fetch transcript or caption data, store segments, summarize videos, and index source-linked content.

What you will build

  • Submit video IDs
  • Fetch transcript or captions
  • Store transcript segments or text
  • Summarize with an LLM or index
  • Extract topics
  • Link back to source video

APIs used

Only endpoints that exist in the generated endpoint metadata are linked here. Missing optional endpoints are intentionally omitted.

GETYouTubeapiKey3 credits/request

Retrieve transcript for a YouTube video

/youtube/transcript/{id}

Returns transcript segments for a YouTube video using YouTube's native player captions. Set `format=text`, `format=srt`, or `format=vtt` to receive plain-text output instead of the standard response envelope.

GETYouTubeapiKey3 credits/request

Retrieve video metadata & captions

/youtube/video/{id}

Returns title, description, stats, and captions for a YouTube video ID.

Data model

FieldNotes
video_idWorkflow field; map to exact endpoint response fields from endpoint docs.
titleWorkflow field; map to exact endpoint response fields from endpoint docs.
channelWorkflow field; map to exact endpoint response fields from endpoint docs.
languageWorkflow field; map to exact endpoint response fields from endpoint docs.
segment_textWorkflow field; map to exact endpoint response fields from endpoint docs.
start_timeWorkflow field; map to exact endpoint response fields from endpoint docs.
durationWorkflow field; map to exact endpoint response fields from endpoint docs.
source_urlWorkflow field; map to exact endpoint response fields from endpoint docs.
checked_atWorkflow field; map to exact endpoint response fields from endpoint docs.

Step-by-step workflow

  1. 1.Submit video IDs
  2. 2.Fetch transcript or captions
  3. 3.Store transcript segments or text
  4. 4.Summarize with an LLM or index
  5. 5.Extract topics
  6. 6.Link back to source video

Example request

This example uses the real Retrieve transcript for a YouTube video endpoint. Exact request fields come from the endpoint metadata.

Recipe request

Use environment variables for secrets and keep Crawlora API keys server-side.

curl -X GET "https://api.crawlora.net/api/v1/youtube/transcript/dQw4w9WgXcQ?lang=en&format=json&timestamps=true" \
  -H "x-api-key: $CRAWLORA_API_KEY"

Example response

Use endpoint detail pages for exact response schemas. This recipe does not invent response fields.

Generated example response

{
  "code": 200,
  "msg": "OK",
  "data": {
    "video_id": "dQw4w9WgXcQ",
    "language": "English",
    "language_code": "en",
    "segments": [
      {
        "text": "Never gonna give you up",
        "start": 12.34,
        "duration": 2.11
      }
    ],
    "text": "Never gonna give you up"
  }
}

Storage/output suggestion

Keep raw transcript segments and a derived summary table so downstream analysis can be regenerated.

Error handling

  • Validate required inputs before calling Crawlora
  • Retry 429 and temporary 5xx responses with capped backoff
  • Log endpoint, input, timestamp, and request ID when present
  • Treat empty results as a state your application can handle
  • Open /docs/errors for production retry guidance

Rate-limit and credit planning

Estimate usage by multiplying requests by endpoint credit cost. The table below only shows real credit costs available from the billing constants.

EndpointCredit costDocs
Retrieve transcript for a YouTube video3 credits/request/docs/YouTube/youtube-transcript
Retrieve video metadata & captions3 credits/request/docs/YouTube/youtube-video

Production checklist

  • Keep API keys server-side
  • Use request timeouts
  • Back off on rate limits
  • Store raw responses or source IDs for auditability
  • Monitor credits and failures
  • Avoid unnecessary refreshes
  • Review responsible-use requirements

Responsible public web data workflows

Crawlora is designed for responsible structured public web data workflows. Customers are responsible for using Crawlora in compliance with applicable laws, third-party rights, target-platform rules, and Crawlora terms.

Read Crawlora terms

Related APIs and pages

Build this workflow with real endpoint docs

Use this recipe for workflow shape, then rely on endpoint reference pages for exact paths, request schemas, response schemas, and credit costs.