Prefer to chat? Query the API with natural language using our AI Skill →

Give your AI tool live Cito endpoint context before you write integration code.

Open AI Skill

Public docs assistant

Tell Cito API what you are building.

Get endpoint recommendations, exact requests, code snippets, and a free-key CTA without digging through every page.

Docs/Utility APIs/X / Twitter Transcript
Back to TikTok Transcript

X / Twitter Transcript API

Extract transcripts from any public X (Twitter) video post

Endpoint

POSThttps://api.citoapi.com/api/v1/transcript/twitter

Extract a full text transcript from any public X (Twitter) video post. Powered by Whisper AI — supports 50+ languages with auto-detection.

Authentication

Pass your API key in the x-api-key header on every request. Learn more →

Request Body

{
  "url": "https://x.com/username/status/1234567890123456789",
  "format": "text",
  "language": "en"
}
FieldTypeRequiredDescription
urlstringrequiredPublic X/Twitter status URL with a video
formatstringoptionaltext (default), verbose, srt, vtt
languagestringoptionalISO 639-1 code (e.g. en, es, ko). Omit to auto-detect.

Format Options

formatReturns
textPlain transcript string (default)
verboseTranscript + timestamps per segment
srtReady-to-use .srt subtitle file string
vttReady-to-use .vtt subtitle file string

Example Request

curl -X POST https://api.citoapi.com/api/v1/transcript/twitter \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "url": "https://x.com/username/status/1234567890123456789",
  "format": "text"
}'

Responses

format: "text" (default)

{
  "success": true,
  "data": {
    "text": "Oh hey, stay back stay back. Coming to your family you better believe it.",
    "language": "en",
    "duration": 37.46,
    "url": "https://x.com/username/status/1234567890123456789",
    "format": "text"
  }
}

format: "verbose" — includes per-segment timestamps

{
  "success": true,
  "data": {
    "text": "Oh hey, stay back stay back. Coming to your family you better believe it.",
    "language": "en",
    "duration": 37.46,
    "segments": [
      { "start": 0.0, "end": 2.4, "text": "Oh hey, stay back stay back." },
      { "start": 2.4, "end": 5.1, "text": "Coming to your family you better believe it." }
    ],
    "url": "https://x.com/username/status/1234567890123456789",
    "format": "verbose"
  }
}

srt and vtt formats return the same shape with the text field containing the ready-to-use subtitle file string.

Code Examples

JavaScript

const response = await fetch('https://api.citoapi.com/api/v1/transcript/twitter', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    url: 'https://x.com/username/status/1234567890123456789',
    format: 'text'
  })
});

const { data } = await response.json();
console.log(data.text);

Python

import requests

response = requests.post(
    'https://api.citoapi.com/api/v1/transcript/twitter',
    headers={'x-api-key': 'YOUR_API_KEY'},
    json={
        'url': 'https://x.com/username/status/1234567890123456789',
        'format': 'text'
    }
)

print(response.json()['data']['text'])

cURL

curl -X POST https://api.citoapi.com/api/v1/transcript/twitter \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"url": "https://x.com/username/status/1234567890123456789", "format": "text"}'

Error Responses

StatusMeaning
400Invalid URL, no video in post, or unsupported language code
401Missing or invalid API key