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/screenshot

Returns a image/png binary on success. All parameters are passed as query strings.

Required Parameters

ParameterTypeDescription
postUrl*stringThe full URL of the social media post to capture. The platform is auto-detected from the URL.
apiKey*stringYour PostCapture API key (sk_…). See Authentication.

Platform Detection

The platform is inferred automatically from the postUrl domain:

DomainPlatform
x.com, twitter.comtwitter
youtube.com, youtu.beyoutube
tiktok.comtiktok
bsky.appbluesky

Global Settings

These parameters apply to all platforms and control the overall appearance.

ParameterTypeDescription
themestringCard theme. "light" or "dark".
widthnumberOutput image width in pixels.
paddingnumberPadding around the card in pixels.
textSizestringText size preset. One of "sm", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl".
scaleFactornumberOutput resolution multiplier (1–4). Use 2 for retina-quality images.
backgroundColorstringSolid background color (hex). Used when backgroundImage is not set.
backgroundImagestringCSS gradient string for the background.
showWatermarkbooleanShow the PostCapture watermark. Paid plans can set this to false.
showShadowbooleanRender a drop shadow behind the card.

X (Twitter) Parameters

Additional parameters when capturing X / Twitter posts.

ParameterTypeDescription
showThreadbooleanLoad and display the full thread.
showReplybooleanShow the reply button area.
showViewCountbooleanDisplay the view count.
showFollowerCountbooleanShow the author’s follower count.
showLikeCountbooleanDisplay the like count.
showRepostCountbooleanDisplay the repost count.
showBookmarkCountbooleanDisplay the bookmark count.
showDatebooleanShow the post date.
showMediabooleanInclude images/videos in the capture.
showLinkCardsbooleanRender URL preview cards.
showReplyTobooleanShow the "Replying to" label.
showFullQuotebooleanExpand quoted tweets inline.
showQuoteMediabooleanShow media in quoted tweets.
showCommunitybooleanShow community badge if applicable.

Bluesky Parameters

ParameterTypeDescription
showReplybooleanShow the reply area.
showLikeCountbooleanDisplay the like count.
showRepostCountbooleanDisplay the repost count.
showDatebooleanShow the post date.
showFollowerCountbooleanShow follower count.
showMediabooleanInclude images in the capture.
showLinkCardsbooleanRender URL preview cards.
showQuoteMediabooleanShow media in quotes.

YouTube Parameters

ParameterTypeDescription
youtubeFormatstringLayout: "landscape" or "portrait".
showPostedSincebooleanShow relative post time.
showFollowerCountbooleanShow subscriber count.
showLikeCountbooleanDisplay the like count.
showViewCountbooleanDisplay the view count.

TikTok Parameters

ParameterTypeDescription
tiktokFormatstringLayout: "landscape" or "portrait".
showTikTokMusicbooleanShow the sound/music info.
showTikTokDescriptionbooleanShow the video description.
showFollowerCountbooleanShow follower count.
showLikeCountbooleanDisplay the like count.

Response

Success (200)

Returns the screenshot as a PNG binary with these headers:

Content-Typeimage/png
Cache-Controlpublic, 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": 42000
5}
500Server Error
1{
2 "error": "Screenshot generation failed: timeout"
3}