twittershots
Generate high-quality screenshots of Twitter/X posts using the TwitterShots API. Use when the user wants to: capture a tweet as an image, screenshot a tweet, generate tweet image, convert tweet to PNG/SVG/HTML, create tweet screenshot for social media (Instagram, TikTok), or mentions "TwitterShots", "tweet screenshot", "capture tweet", "tweet image". Triggers on tweet URLs (twitter.com/*/status/* or x.com/*/status/*) or tweet IDs. Default to format=png and theme=light without asking follow-up questions; if the user explicitly provides format and/or theme, use the user-provided values.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/0xinhua/twittershotsTwitterShots Skill
Generate high-quality screenshots of Twitter/X posts via REST API.
Prerequisites
- API key from TwitterShots Account Settings
- Store the key securely (environment variable
TWITTERSHOTS_API_KEYrecommended)
Extract Tweet ID
Parse tweet ID from various URL formats:
https://twitter.com/username/status/1617979122625712128
https://x.com/username/status/1617979122625712128
https://twitter.com/username/status/1617979122625712128?s=20
Extract pattern: /status/(\d+) → Tweet ID is the numeric part after /status/
API Request
Endpoint: GET https://api.twittershots.com/api/v1/screenshot/:statusId
Required Header:
X-API-KEY: YOUR_API_KEY
Accept: image/svg+xml, image/png, text/html
Common Parameters
| Parameter | Default | Options | Description |
|---|---|---|---|
| format | png | svg, png, html | Output format (Note: API default is svg, skill defaults to png) |
| theme | light | light, dark | Color theme |
| aspectRatio | auto | auto, 1:1, 4:5, 5:4, 16:9, 9:16 | Screenshot ratio |
| returnType | buffer | buffer, url | Return image directly or URL |
| showStats | true | true, false | Show reply/retweet/like counts |
| showViews | true | true, false | Show view count |
| showTimestamp | true | true, false | Show timestamp |
| showMedia | true | true, false | Show images/videos |
| showFullText | true | true, false | Show full tweet or collapsed with "Show more" |
| mediaLayout | grid | grid, vertical | Media display layout |
| timeZoneOffset | UTC+0 | UTC±N, UTC±N:M | Fixed UTC offset for timestamp formatting |
| logo | x | x, bluebird, none | Logo style |
| width | 410 | 300-1000 | Content width in pixels |
| height | auto | auto, numeric | Content height in pixels |
| containerBackground | theme default | hex, rgba, linear-gradient | Background color |
| backgroundImage | none | HTTPS URL | Background image URL |
| borderRadius | 16 | numeric | Border radius in pixels |
| containerPadding | 16 | numeric | Padding in pixels |
Usage Examples
Basic Screenshot (SVG)
curl -X GET "https://api.twittershots.com/api/v1/screenshot/1617979122625712128?format=svg&theme=light" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: image/svg+xml" \
-o tweet.svg
Dark Theme PNG
curl -X GET "https://api.twittershots.com/api/v1/screenshot/1617979122625712128?format=png&theme=dark" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: image/png" \
-o tweet.png
Instagram Ready (4:5 ratio)
curl -X GET "https://api.twittershots.com/api/v1/screenshot/1617979122625712128?format=png&aspectRatio=4:5&theme=light" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Accept: image/png" \
-o tweet-instagram.png
Get URL Instead of Buffer
curl -X GET "https://api.twittershots.com/api/v1/screenshot/1617979122625712128?returnType=url&format=svg" \
-H "X-API-KEY: YOUR_API_KEY"
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-0xinhua-twittershots": {
"enabled": true,
"auto_update": true
}
}
}