API Documentation

Learn how to integrate Transcriptly's API into your application and generate transcripts programmatically.

Getting Started
Transcriptly provides a RESTful API that allows you to generate transcripts from YouTube videos programmatically.

Base URL

All API requests should be made to:

https://transcriptly.org/api/v1
API Key Authentication
All API requests require authentication using an API key. You can create and manage your API keys in the API Keys section of your dashboard.

API Key Header

Include your API key in the request header:

X-API-Key: your_api_key_here

Getting Your API Key

  1. Sign in to your Transcriptly account
  2. Navigate to the API Keys page in your dashboard
  3. Click "Create API Key" to generate a new key
  4. Copy your API key and store it securely

Note: You can create multiple API keys for different applications or environments. Each key can be individually revoked if needed.

Generate Transcript
Generate a transcript from a YouTube video URL.
POST
/transcript

Request Body

{
  "url": "string (required) - YouTube video URL",
  "language": "string (optional) - Language code, defaults to 'en'"
}

Request Parameters

ParameterTypeRequiredDescription
urlstringYesThe YouTube video URL. Must be a valid YouTube video URL in one of these formats:
  • https://youtube.com/watch?v=VIDEO_ID
  • https://www.youtube.com/watch?v=VIDEO_ID
languagestringNoThe language code for the transcript. If not specified, defaults to "en" (English).

Common language codes: en (English), es (Spanish), fr (French), de (German), ja (Japanese), zh (Chinese)

Example Request in Postman

Headers

Postman Headers Example

Request Body

Postman Request Body Example

These examples show how to configure the request in Postman, including the required API key header and request body parameters.

Response

{
  "code": 200,
  "message": "success",
  "data": {
    "videoId": "string",
    "languageName": "string",
    "languageCode": "string",
    "transcripts": {
      "languageName": "string",
      "languageCode": "string",
      "segments": [
        {
          "id": number,
          "text": "string",
          "startMs": number,
          "endMs": number,
          "startTimeText": "string"
        }
      ]
    },
    "videoDetails": {
      "title": "string",
      "description": "string",
      "author": "string",
      "authorUrl": "string",
      "thumbnailUrl": "string",
      "lengthSeconds": number
    },
    "availableLanguages": [
      {
        "name": "string",
        "code": "string",
        "isGenerated": boolean
      }
    ]
  }
}

Response Fields

FieldTypeDescription
codenumberHTTP status code (200 for success)
messagestringStatus message ("success" for successful requests)
data.videoIdstringYouTube video ID
data.languageNamestringFull name of the transcript language (e.g., "English")
data.languageCodestringISO language code (e.g., "en")
data.transcriptsobjectObject containing transcript data
data.transcripts.languageNamestringFull name of the transcript language (e.g., "English")
data.transcripts.languageCodestringISO language code (e.g., "en")
data.transcripts.segments[].idnumberUnique identifier for the transcript segment
data.transcripts.segments[].textstringTranscript text content
data.transcripts.segments[].startMsnumberStart time in milliseconds
data.transcripts.segments[].endMsnumberEnd time in milliseconds
data.transcripts.segments[].startTimeTextstringFormatted start time (e.g., "00:01:23")
data.videoDetails.titlestringVideo title
data.videoDetails.descriptionstringVideo description
data.videoDetails.authorstringChannel name
data.videoDetails.authorUrlstringChannel URL
data.videoDetails.thumbnailUrlstringVideo thumbnail image URL
data.videoDetails.lengthSecondsnumberVideo duration in seconds
data.availableLanguages[].namestringFull name of available language
data.availableLanguages[].codestringISO language code
data.availableLanguages[].isGeneratedbooleanWhether the language is generated by AI

Rate Limits

Requests are limited based on your subscription plan. Rate limit information is included in the response headers:

  • X-RateLimit-Limit: Maximum requests per hour
  • X-RateLimit-Reset: Time when the rate limit resets

Credits

Each successful transcript generation consumes 10 credits. The number of credits consumed is returned in the X-Credits-Consumed header.

Error Codes
Possible error responses from the API.
400
Bad Request - Invalid parameters
401
Unauthorized - Invalid or missing API key
403
Forbidden - Insufficient credits
404
Not Found - Video or transcript not found
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error
4001
Invalid URL - Invalid YouTube URL format
4002
No Transcript - No transcript available for this video
4003
Insufficient Credits - Not enough credits to generate transcript
4004
Invalid Parameters - Invalid request parameters
5001
API Error - External service error