# Tweet Screenshot Generator - X Posts to PNG, $5/1k, No Key (`martin10291/tweet-screenshot-generator`) Actor

Turn public X/Twitter post links into clean PNG or JPEG images: light, dim or dark theme, retina scale, transparent or gradient background, photos, quoted posts. Returns the post data too. No login, no API key, no proxy. $5 per 1000 screenshots.

- **URL**: https://apify.com/martin10291/tweet-screenshot-generator.md
- **Developed by:** [Martin Petrov](https://apify.com/martin10291) (community)
- **Categories:** Social media, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Tweet Screenshot Generator - X Posts to PNG, $5/1k

**Problem:** you need clean images of X/Twitter posts for a newsletter, a slide deck, a video, a social repost or an evidence archive. Manual screenshots are slow, crop badly and show the UI around the post. Screenshot APIs for X charge about $13 per 1000 and give one theme per call.

Paste post links, get **sharp PNG or JPEG cards** in light, dim or dark theme, plus the **post data as JSON** (text, author, likes, replies, date, photo and video links). **No login, no X API key, no proxy**: posts come from X's public embed endpoint, the same one the official embedded-post widget uses.

**$5 per 1000 posts** (all themes of a post in one result), about 0.5 s per image. The default run (2 posts) finishes in under 30 seconds.

### What you get

- **3 themes** (light, dim, dark): pick several and every post gets one image per theme in the same row.
- **Retina scale** 1x-3x, **card width** 320-1200 px, **text size** 13-32 px (big text for Reels/Shorts/TikTok).
- **Backgrounds**: transparent PNG, white, black, gray, 4 gradients (blue, sunset, mint, purple) or any hex colour, with padding.
- **Photos** (up to 4, X-style grid), **video posters** with a play icon, **quoted posts**, "Replying to" line, verified badges (blue, gold, gray).
- Toggle **likes/replies**, **date** (any time zone), **X logo**, border and rounded corners.
- **Post data** with every image: text with links expanded, author name/handle/avatar, likes, replies, created date, media URLs (best MP4 for videos), quoted post link.
- **Only-new mode** with `monitorId`: feed it the output of a tweet scraper on a schedule and only new posts are captured.
- **Chain after any X/Twitter scraper**: give its `datasetId` (or add this actor in that scraper's Integrations tab) and the post links are read automatically.
- Deleted, protected or wrong links are reported in `RUN_SUMMARY`, never faked.

### Input

| Field | Type | Description |
|---|---|---|
| `tweets` | array | Post links (x.com, twitter.com, mobile, fxtwitter, vxtwitter) or bare IDs. |
| `themes` | array | `light`, `dim`, `dark`. Default `["light"]`. |
| `width` | integer | Card width in px, 320-1200. Default `550`. |
| `scale` | integer | 1, 2 or 3. Default `2` (retina). |
| `background` | string | `none` (transparent), `white`, `black`, `gray`, `blue`, `sunset`, `mint`, `purple` or `#hex`. |
| `padding` | integer | Space around the card, 0-200 px. |
| `format` | string | `png` or `jpeg`. |
| `fontSize` | integer | Post text size, 13-32 px. Default `17`. |
| `showMetrics`, `showDate`, `showMedia`, `showQuoted`, `showReplyTo`, `showLogo`, `border`, `rounded` | boolean | Card parts on/off. |
| `timezone` | string | IANA time zone for the date, e.g. `America/New_York`. Default `UTC`. |
| `dataOnly` | boolean | Only post data, no images. |
| `maxItems` | integer | Most posts per run (and the most you pay for). Default `100`. |
| `onlyNew` / `monitorId` | boolean / string | Skip posts captured before by this monitor. |
| `datasetId` / `datasetField` | string | Read post links from another actor's dataset. |

#### Example: Instagram-ready cards with a gradient

```json
{
  "tweets": ["https://x.com/jack/status/20"],
  "themes": ["light", "dark"],
  "background": "purple",
  "padding": 60,
  "fontSize": 22,
  "scale": 2
}
```

#### Example: evidence archive, every hour, only new posts from a tweet scraper

```json
{
  "datasetId": "YOUR_TWEET_SCRAPER_DATASET_ID",
  "themes": ["light"],
  "showMetrics": true,
  "timezone": "Europe/London",
  "onlyNew": true,
  "monitorId": "brand-mentions"
}
```

### Output example

Real row from a run on 2026-11-08 (image links shortened):

```json
{
  "tweetId": "20",
  "url": "https://x.com/jack/status/20",
  "text": "just setting up my twttr",
  "lang": "en",
  "createdAt": "2006-03-21T20:50:14.000Z",
  "authorName": "jack",
  "authorHandle": "jack",
  "authorVerified": true,
  "authorAvatar": "https://pbs.twimg.com/profile_images/1661201415899951105/azNjKOSH_400x400.jpg",
  "likes": 325570,
  "replies": 19254,
  "isReply": false,
  "media": [],
  "quotedTweetUrl": null,
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/tweet-20-light.png",
  "imageWidth": 1100,
  "imageHeight": 376,
  "screenshots": {
    "light": {"url": "https://api.apify.com/v2/key-value-stores/<store>/records/tweet-20-light.png", "width": 1100, "height": 376, "bytes": 161121},
    "dark": {"url": "https://api.apify.com/v2/key-value-stores/<store>/records/tweet-20-dark.png", "width": 1100, "height": 376, "bytes": 161095}
  },
  "theme": "light",
  "format": "png",
  "takenAt": "2026-11-08T08:13:20Z",
  "error": null
}
```

Every run also writes `RUN_SUMMARY` to the key-value store: posts requested, saved, unavailable (deleted/protected), failed, skipped as already captured, bad inputs and `lastError`.

### Use it from the API

```bash
curl -X POST "https://api.apify.com/v2/acts/martin10291~tweet-screenshot-generator/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tweets":["https://x.com/jack/status/20"],"themes":["dark"],"background":"blue","padding":40}'
```

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("martin10291/tweet-screenshot-generator").call(run_input={
    "tweets": ["https://x.com/jack/status/20", "1460323737035677698"], "themes": ["light", "dark"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["authorHandle"], item["screenshots"]["dark"]["url"])
```

### Schedule it or chain it

1. Run any X/Twitter scraper (search, profile, list) on a schedule.
2. In that scraper's **Integrations** tab add this actor, or pass its `datasetId`. Set `onlyNew: true` and a `monitorId`.
3. Every run turns the new posts into images. Send them on to Slack, Google Drive, Make, Zapier or n8n with an Apify integration.

### Use from AI agents (MCP)

AI agents can call this actor as a tool through the Apify MCP server (`https://mcp.apify.com`, add `martin10291/tweet-screenshot-generator`). Ask "make a dark screenshot of this post" and the agent gets the image link and the post data.

### FAQ

**Do I need an X account or API key?** No. Posts are read from X's public embed endpoint. Only public posts work.

**What about deleted, protected or age-restricted posts?** They are not available publicly, so they are listed as unavailable in `RUN_SUMMARY` (and as rows with `error` if you turn on `includeFailed`).

**Is it the exact X look?** It is a clean X-style card built from the post data (not a crop of x.com), so there are no login walls, cookie banners or "Sign up" bars. Fonts are system fonts.

**Are the like counts live?** They are the counts at capture time; re-run to refresh.

**How much does it cost?** $5 per 1000 posts, whatever number of themes you pick. A post that is unavailable costs nothing unless you ask for failed rows.

**Can I show videos?** Videos show their poster frame with a play icon; the row also has the best MP4 link.

# Actor input Schema

## `tweets` (type: `array`):

Public post links (x.com, twitter.com, mobile.twitter.com, fxtwitter, vxtwitter) or bare post IDs. One image per post and theme.

## `themes` (type: `array`):

light, dim and/or dark. Pick several to get one image per theme in the same result row (you pay per post, not per image).

## `width` (type: `integer`):

Width of the post card in CSS pixels, 320-1200. X's own embed is 550.

## `scale` (type: `integer`):

1 = normal, 2 = retina (sharp on phones and slides), 3 = extra sharp. The image is width x scale pixels wide.

## `background` (type: `string`):

Around the card: none (transparent PNG), white, black, gray, blue, sunset, mint, purple (gradients) or a hex colour like #ffcc00. Use it with padding.

## `padding` (type: `integer`):

Space between the card and the image edge, 0-200. 40-60 looks good with a gradient background.

## `format` (type: `string`):

png (supports transparency) or jpeg (smaller files).

## `fontSize` (type: `integer`):

Size of the post text, 13-32. Bigger text reads better in videos and slides.

## `showMetrics` (type: `boolean`):

Show the like and reply counts under the post.

## `showDate` (type: `boolean`):

Show the post time and date.

## `timezone` (type: `string`):

IANA time zone for the shown date, e.g. America/New_York or Europe/Berlin. Default UTC.

## `showMedia` (type: `boolean`):

Show attached photos (up to 4) and the video poster with a play icon.

## `showQuoted` (type: `boolean`):

Show a quoted post inside the card.

## `showReplyTo` (type: `boolean`):

For replies, show the 'Replying to @name' line.

## `showLogo` (type: `boolean`):

Show the X logo in the top right corner of the card.

## `border` (type: `boolean`):

Thin border around the card.

## `rounded` (type: `boolean`):

Rounded card corners (16 px).

## `language` (type: `string`):

Language code sent to the X embed endpoint (affects some labels), e.g. en, de, es.

## `dataOnly` (type: `boolean`):

Only return the post data (text, author, likes, replies, media links) without rendering images. Faster.

## `maxItems` (type: `integer`):

Most posts processed in one run (and the most you pay for).

## `onlyNew` (type: `boolean`):

Skip post IDs this monitor already captured in earlier runs. Good for schedules fed by a tweet scraper.

## `monitorId` (type: `string`):

Name of the only-new memory. Use a different ID for each separate feed.

## `includeFailed` (type: `boolean`):

Also save a row (with the error) for deleted, protected or wrong post links. These rows count as results like normal rows; when off, failures are only listed in RUN_SUMMARY.

## `datasetId` (type: `string`):

Optional. Pick a dataset (or paste its ID) from any X/Twitter scraper; post links are read from its url / twitterUrl / tweetUrl fields. When this actor runs as an integration, the triggering run's dataset is used automatically. If set, the links found replace the main list.

## `datasetField` (type: `string`):

Optional. The item field that holds the value, for example website, url or videoUrl (dot paths like author.url work). Empty = detected automatically.

## `datasetMaxItems` (type: `integer`):

Upper limit of unique values taken from the dataset, to keep the cost under control.

## Actor input object example

```json
{
  "tweets": [
    "https://x.com/jack/status/20",
    "https://x.com/XDevelopers/status/1460323737035677698"
  ],
  "themes": [
    "light"
  ],
  "width": 550,
  "scale": 2,
  "background": "none",
  "padding": 0,
  "format": "png",
  "fontSize": 17,
  "showMetrics": true,
  "showDate": true,
  "timezone": "UTC",
  "showMedia": true,
  "showQuoted": true,
  "showReplyTo": true,
  "showLogo": true,
  "border": true,
  "rounded": true,
  "language": "en",
  "dataOnly": false,
  "maxItems": 100,
  "onlyNew": false,
  "monitorId": "default",
  "includeFailed": false,
  "datasetMaxItems": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

One row per post: screenshotUrl (direct PNG/JPEG link), one image per theme, plus post text, author, likes, replies, date and media links.

## `files` (type: `string`):

Key-value store with the images and the RUN_SUMMARY record.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tweets": [
        "https://x.com/jack/status/20",
        "https://x.com/XDevelopers/status/1460323737035677698"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("martin10291/tweet-screenshot-generator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "tweets": [
        "https://x.com/jack/status/20",
        "https://x.com/XDevelopers/status/1460323737035677698",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("martin10291/tweet-screenshot-generator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tweets": [
    "https://x.com/jack/status/20",
    "https://x.com/XDevelopers/status/1460323737035677698"
  ]
}' |
apify call martin10291/tweet-screenshot-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,martin10291/tweet-screenshot-generator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/w8ySBeC2NtHlffWDK/builds/u3ucgKpzSXOvX2COl/openapi.json
