Screenshot API
Capture any social media post as a high-quality PNG image. The platform is auto-detected from the URL you provide.
Endpoint
GET
/api/screenshotReturns a image/png binary on success. All parameters are passed as query strings.
Required Parameters
| Parameter | Type | Description |
|---|---|---|
| postUrl* | string | The full URL of the social media post to capture. The platform is auto-detected from the URL. |
| apiKey* | string | Your PostCapture API key (sk_…). See Authentication. |
Platform Detection
The platform is inferred automatically from the postUrl domain:
| Domain | Platform |
|---|---|
| x.com, twitter.com | |
| youtube.com, youtu.be | youtube |
| tiktok.com | tiktok |
| bsky.app | bluesky |
Global Settings
These parameters apply to all platforms and control the overall appearance.
| Parameter | Type | Description |
|---|---|---|
| theme | string | Card theme. "light" or "dark". |
| width | number | Output image width in pixels. |
| padding | number | Padding around the card in pixels. |
| textSize | string | Text size preset. One of "sm", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl". |
| scaleFactor | number | Output resolution multiplier (1–4). Use 2 for retina-quality images. |
| backgroundColor | string | Solid background color (hex). Used when backgroundImage is not set. |
| backgroundImage | string | CSS gradient string for the background. |
| showWatermark | boolean | Show the PostCapture watermark. Paid plans can set this to false. |
| showShadow | boolean | Render a drop shadow behind the card. |
X (Twitter) Parameters
Additional parameters when capturing X / Twitter posts.
| Parameter | Type | Description |
|---|---|---|
| showThread | boolean | Load and display the full thread. |
| showReply | boolean | Show the reply button area. |
| showViewCount | boolean | Display the view count. |
| showFollowerCount | boolean | Show the author’s follower count. |
| showLikeCount | boolean | Display the like count. |
| showRepostCount | boolean | Display the repost count. |
| showBookmarkCount | boolean | Display the bookmark count. |
| showDate | boolean | Show the post date. |
| showMedia | boolean | Include images/videos in the capture. |
| showLinkCards | boolean | Render URL preview cards. |
| showReplyTo | boolean | Show the "Replying to" label. |
| showFullQuote | boolean | Expand quoted tweets inline. |
| showQuoteMedia | boolean | Show media in quoted tweets. |
| showCommunity | boolean | Show community badge if applicable. |
Bluesky Parameters
| Parameter | Type | Description |
|---|---|---|
| showReply | boolean | Show the reply area. |
| showLikeCount | boolean | Display the like count. |
| showRepostCount | boolean | Display the repost count. |
| showDate | boolean | Show the post date. |
| showFollowerCount | boolean | Show follower count. |
| showMedia | boolean | Include images in the capture. |
| showLinkCards | boolean | Render URL preview cards. |
| showQuoteMedia | boolean | Show media in quotes. |
YouTube Parameters
| Parameter | Type | Description |
|---|---|---|
| youtubeFormat | string | Layout: "landscape" or "portrait". |
| showPostedSince | boolean | Show relative post time. |
| showFollowerCount | boolean | Show subscriber count. |
| showLikeCount | boolean | Display the like count. |
| showViewCount | boolean | Display the view count. |
TikTok Parameters
| Parameter | Type | Description |
|---|---|---|
| tiktokFormat | string | Layout: "landscape" or "portrait". |
| showTikTokMusic | boolean | Show the sound/music info. |
| showTikTokDescription | boolean | Show the video description. |
| showFollowerCount | boolean | Show follower count. |
| showLikeCount | boolean | Display the like count. |
Response
Success (200)
Returns the screenshot as a PNG binary with these headers:
| Content-Type | image/png |
| Cache-Control | public, max-age=60 |
Error Responses
All errors return JSON with an error field:
400Bad Request
1{2 "error": "Missing required parameter: postUrl"3}
401Unauthorized
1{2 "error": "Invalid API key",3 "details": "KEY_NOT_FOUND"4}
429Rate Limit Exceeded
1{2 "error": "Rate limit exceeded",3 "message": "Too many requests. Limit is 10 per minute. Try again in 42s.",4 "retryAfterMs": 420005}
500Server Error
1{2 "error": "Screenshot generation failed: timeout"3}
Next:Rate Limits →