X posts and YouTube videos use dedicated extractors that return cleaner markdown layouts and normalized structured JSON. Both support format: "markdown" and format: "json".
curl -sS https://api.crawlapi.dev/v1/scrape \
-H "Authorization: Bearer $CRAWLAPI_API_KEY" \
-H 'content-type: application/json' \
--data '{"url": "https://x.com/example/status/2120816188058112207"}'curl -sS https://api.crawlapi.dev/v1/scrape \
-H "Authorization: Bearer $CRAWLAPI_API_KEY" \
-H 'content-type: application/json' \
--data '{"url": "https://www.youtube.com/watch?v=rfscVS0vtbw"}'X posts
Supported hosts: x.com, www.x.com, mobile.x.com, twitter.com, www.twitter.com, and mobile.twitter.com.
metadata.title: The attached X article title when present; otherwise the author and post excerpt.metadata.final_url: Canonical post URL (https://x.com/<handle>/status/<id>), withtwitter.comnormalized and share parameters stripped.- Threads: Includes consecutive replies by the same author in order.
- Replies: Includes public replies shown to signed-out visitors under
## Repliesand instructured.post.comments, noting who nested replies answer. - Quoted posts and X articles: Quoted posts render as blockquotes; attached X articles append their heading and markdown body.
- Links and media:
t.colinks expand to their destination URLs;data.linksincludes page links plus media URLs from the post and quoted post (structured.post.media). - Restricted posts: Age-restricted posts return X’s notice with
metadata.login_required: true; direct/i/article/<id>URLs return422 LOGIN_REQUIRED.
Markdown shape
# Ana Ruiz (@ana)
2026-11-12 09:49:16 UTC · 77 likes · 2 reposts · 34 replies · 1 quote · 44 bookmarks · 5,335 views
Post text with line breaks kept and links expanded: https://example.com/launch
> Bo Lee (@bo): https://x.com/bo/status/2119867114450268322
>
> Quoted post text.
Reply · 2026-11-12 09:51:20 UTC · https://x.com/ana/status/2120816188058112207
Author's next post in the thread.
## Replies
2 of 34 replies, the ones X shows to a visitor who is not signed in.
Bo Lee (@bo) · 2026-11-12 10:02:11 UTC · 12 likes · https://x.com/bo/status/2120820000000000000
A reply by someone else.
Ana Ruiz (@ana) · replying to @bo · 2026-11-12 10:05:40 UTC · 3 likes · https://x.com/ana/status/2120820900000000000
The author answering it.
Structured JSON shape
With format: "json", data.json.structured has type: "post" and source: "x"; tables, jsonld, and embedded are empty arrays. See Structured JSON for the response envelope.
YouTube videos
Supported URLs: youtube.com/watch?v=..., /shorts/<id>, /live/<id>, /embed/<id>, /v/<id>, channel /live pages, m.youtube.com, and youtu.be/<id>.
metadata.title: Video title.metadata.final_url: Canonical video URL.- Chapters: Extracted whenever chapters are declared in the video metadata.
- Transcript: Included under
## Transcript(andstructured.video.transcriptin JSON) whenever captions are available, preferring manual captions over auto-generated ones. - Live streams and premieres: Live streams show
Live nowwith the broadcast start date; upcoming premieres showUpcomingwith the scheduled date. - Links:
data.linksincludes the channel profile URL and links from the video description. - Unavailable or restricted videos: Missing videos return
404 NOT_FOUND, private videos return422 LOGIN_REQUIRED, and age-checked videos return public metadata withmetadata.login_required: true.
Markdown shape
# Learn Python - Full Course for Beginners [Tutorial]
[freeCodeCamp.org](https://www.youtube.com/@freecodecamp)
2018-07-11 · 4:26:52 · 49,585,831 views
Full video description with line breaks preserved.
## Chapters
- 0:00 Introduction
- 1:45 Installing Python & PyCharm
## Transcript
[0:00] In this course, I'm going to teach you everything you need to know to get started programming in Python.
Structured JSON shape
With format: "json", data.json.structured has type: "video" and source: "youtube"; tables, jsonld, and embedded are empty arrays. See Structured JSON for the response envelope.