# Twitter (X) Screenshot Generator (`nimbryxo-studio/twitter-x-screenshot-generator`) Actor

Capture clean screenshots of public X posts and profiles without login. Choose post cards, profile headers or full profile pages, dark/light theme, PNG/JPEG/WEBP output, 2x/3x pixel density and optional profile or post details.

- **URL**: https://apify.com/nimbryxo-studio/twitter-x-screenshot-generator.md
- **Developed by:** [Nimbryxo-studio](https://apify.com/nimbryxo-studio) (community)
- **Categories:** Social media, Automation, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## Twitter (X) Screenshot Generator

Capture clean screenshots of public X posts and profiles — **no login, no cookies, no API key**. Paste post links to get pixel-perfect post cards, or profile links to get the profile header or the full profile page. Choose dark, light or system theme, PNG/JPEG/WEBP output, and 1x–3x pixel density.

### What this actor does

- **Three capture modes:** `postCard` (one post), `profileHeader` (header + first posts) and `fullProfilePage` (the scrollable profile page)
- **Clean captures:** headers, sidebars, login prompts and community notes are hidden automatically; reply posts can be hidden too
- **Image control:** PNG, JPEG or WEBP, quality setting for JPEG/WEBP, and 1x/2x/3x pixel density
- **Custom viewport:** width and height from 320×240 up to 3840×2160
- **Optional details:** post ID, URL, author handle, text snippet, and profile or author follower counts when X shows them
- **Empty fields are omitted**

### Output per screenshot

Each row has a `type`: `screenshot` for a capture or `status` for a run message. If no post or profile link was provided at all, a single `status` row with `status: "noInput"` and a `message` field is emitted instead of the fields below.

| Field | Description |
|---|---|
| `targetUrl` | The post or profile URL that was captured |
| `targetType` | `post` or `profile` |
| `captureMode` | `postCard`, `profileHeader` or `fullProfilePage` |
| `status` | `success` or a friendly error description |
| `width`, `height` | Dimensions of the captured image in pixels |
| `format` | Saved image format (`png`, `jpeg` or `webp`) |
| `fileSizeBytes` | Size of the saved image |
| `filename` | File name in the key-value store |
| `downloadUrl` | Public signed link to download the image (omitted when signing fails) |
| `quality` | JPEG/WEBP quality setting used |
| `deviceScaleFactor` | Pixel density used for the capture (1, 2 or 3) |
| `capturedAt`, `collectedAt` | ISO timestamps of the capture |
| `profileUrl` | The profile URL, on profile captures |

With **Include post/profile details** on, post rows also carry `tweetId`, `tweetUrl`, `authorUsername`, `textSnippet`, `authorFollowers`, `authorFollowing` and `authorPostCount`; profile rows carry `username`, `name`, `followers`, `following` and `postCount`. Counts are only added when X shows them.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `postUrls` | array | – | Post links, bare post IDs, profile links or bare usernames |
| `tweetUrls` | array | – | Alias of post links |
| `profileUrls` | array | – | Profiles to capture (header or full page, depending on capture mode) |
| `captureMode` | string | `postCard` | `postCard`, `profileHeader` or `fullProfilePage`. In `postCard` mode, post links produce post cards; in `profileHeader` or `fullProfilePage` mode, post links capture the post's author profile instead |
| `theme` | string | `dark` | `dark`, `light` or `system` |
| `fullPage` | boolean | `false` | Capture the whole scrollable page instead of just the card or header |
| `hideReplies` | boolean | `true` | Hide reply posts so captures stay focused |
| `includeMetadata` | boolean | `false` | Add post/profile details and counts to each row |
| `format` | string | `png` | `png` (lossless), `jpeg` or `webp` |
| `quality` | integer | `90` | Quality for JPEG/WEBP (1–100); ignored for PNG |
| `deviceScaleFactor` | string | `1x` | `1x`, `2x` or `3x` pixel density |
| `viewportWidth` | integer | `1440` | Browser width used for the capture (320–3840) |
| `viewportHeight` | integer | `900` | Browser height used for the capture (240–2160) |
| `proxyConfiguration` | object | – | Optional, for large or repeated runs |

At least one post link or profile link is required. Any input works in any list — links, IDs and usernames are routed automatically.

#### Example: post card

```json
{
  "postUrls": ["https://x.com/NASA/status/2107095768821576019"],
  "theme": "dark",
  "hideReplies": true,
  "includeMetadata": true
}
```

#### Example: profile header

```json
{
  "profileUrls": ["https://x.com/apify"],
  "captureMode": "profileHeader",
  "theme": "light",
  "viewportWidth": 1280,
  "viewportHeight": 800
}
```

#### Example: full profile page

```json
{
  "profileUrls": ["apify"],
  "captureMode": "fullProfilePage",
  "fullPage": true
}
```

#### Example: high-density JPEG

```json
{
  "postUrls": ["2107095768821576019"],
  "format": "jpeg",
  "quality": 85,
  "deviceScaleFactor": "2x"
}
```

#### Example record

```json
{
  "type": "screenshot",
  "targetUrl": "https://x.com/NASA/status/2107095768821576019",
  "targetType": "post",
  "captureMode": "postCard",
  "status": "success",
  "width": 1440,
  "height": 810,
  "format": "png",
  "fileSizeBytes": 412345,
  "filename": "screenshot_2107095768821576019.png",
  "downloadUrl": "https://api.apify.com/v2/key-value-stores/{STORE_ID}/records/screenshot_2107095768821576019.png?signature=...",
  "deviceScaleFactor": 1,
  "capturedAt": "2026-10-06T10:30:00+00:00",
  "tweetId": "2107095768821576019",
  "tweetUrl": "https://x.com/NASA/status/2107095768821576019",
  "authorUsername": "NASA",
  "textSnippet": "It's World Space Week! ..."
}
```

### Use cases

- **Social media reporting** — embed clean post captures in decks, newsletters and blogs
- **Brand monitoring** — archive screenshots of public posts as evidence
- **Community management** — capture profile pages for creator or partner reviews
- **Research** — build image datasets of public posts with consistent framing and theme
- **Content creation** — generate post images for roundups without manual screenshotting
- **Legal and compliance** — timestamped captures of public posts with source URLs

### FAQ

**Can I screenshot private accounts or posts?** No. Only public posts and profiles are accessible.

**What resolution are the screenshots?** The viewport defaults to 1440×900 and is configurable from 320×240 up to 3840×2160. With `2x` or `3x` pixel density the saved image is two or three times larger on each side. The actual dimensions are always reported in `width` and `height`.

**What is the difference between the three capture modes?** `postCard` captures a single post as a clean card; `profileHeader` captures the profile header plus the first posts; `fullProfilePage` captures the whole scrollable profile page. A post link captures a post card only in `postCard` mode — if `profileHeader` or `fullProfilePage` is selected, a post link captures that post's author profile instead.

**Does it support threads?** Each post link is captured individually. Paste each post in the thread as a separate link.

**What happens if a post contains a video?** The actor waits for the video to load and pauses it on a still frame before capturing, so the capture is clean.

**What gets hidden in a capture?** The left navigation, headers, sidebars, login prompts, sticky banners and community notes are hidden automatically. Reply posts are hidden when **Hide replies** is on.

**Which image format should I use?** PNG for lossless quality, JPEG for smaller files, WEBP for the smallest files. JPEG and WEBP use the quality setting.

**What if a link is invalid or the post was deleted?** The row gets a `status` explaining the problem instead of a screenshot. The run never crashes.

**How long do download links last?** They follow your Apify key-value store retention (typically 7 days on the free tier). Copy the images to your own storage for permanent archival.

**Is this affiliated with X?** No. This is a third-party actor that captures publicly visible pages.

### Limits

- Public content only — private or protected accounts cannot be captured.
- One capture per link; profile pages capture the first posts loaded at the chosen viewport.
- Metadata counts are added only when X displays them.
- Capture failures (for example a deleted post) produce a `status` row, so a run is never silently empty.

# Actor input Schema

## `postUrls` (type: `array`):

Posts to capture as clean post cards. Paste x.com or twitter.com links, bare numeric post IDs, profile links or bare usernames. Any input works in every list.

## `tweetUrls` (type: `array`):

Alias of X post links. Accepts tweet links, bare tweet IDs, profile links and bare usernames.

## `profileUrls` (type: `array`):

Optional. Profiles to capture (header and first posts). Paste profile links, bare usernames, post links or post IDs and the actor routes them to the right capture. Use capture mode to choose header-only or the full page.

## `captureMode` (type: `string`):

What to capture. Post links always produce a single post card; this mode applies to profile links.

## `theme` (type: `string`):

Color theme for the screenshot.

## `fullPage` (type: `boolean`):

When on, the whole page is captured instead of just the post card or the visible profile header.

## `hideReplies` (type: `boolean`):

Hide reply posts so screenshots stay focused on original posts.

## `includeMetadata` (type: `boolean`):

Add details to each row: post id, post URL, author handle, text snippet and the author's follower, following and post counts for posts; username, display name, follower, following and post counts for profiles. Counts are only added when X shows them.

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

File format of the saved screenshot. JPEG and WEBP support the quality setting; PNG is lossless.

## `quality` (type: `integer`):

Quality for JPEG and WEBP output (1-100). Ignored for PNG.

## `deviceScaleFactor` (type: `string`):

Render the page at a higher pixel density for sharper screenshots. 2x doubles and 3x triples the pixel dimensions.

## `viewportWidth` (type: `integer`):

Browser width used for the capture. Higher values fit more of the page.

## `viewportHeight` (type: `integer`):

Browser height used for the capture.

## `proxyConfiguration` (type: `object`):

Optional. Use a proxy if you plan large runs or see frequent rate limits.

## Actor input object example

```json
{
  "postUrls": [
    "https://x.com/NASA/status/2107095768821576019",
    "2107095768821576019",
    "@apify"
  ],
  "profileUrls": [
    "https://x.com/apify",
    "apify"
  ],
  "captureMode": "postCard",
  "theme": "dark",
  "fullPage": false,
  "hideReplies": true,
  "includeMetadata": false,
  "format": "png",
  "quality": 90,
  "deviceScaleFactor": "1x",
  "viewportWidth": 1440,
  "viewportHeight": 900
}
```

# Actor output Schema

## `screenshots` (type: `string`):

Dataset with one row per captured post or profile

## `screenshotFiles` (type: `string`):

Key-value store containing the screenshot image files

# 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 = {
    "postUrls": [
        "https://x.com/NASA/status/2107095768821576019"
    ],
    "captureMode": "postCard",
    "theme": "dark",
    "fullPage": false,
    "hideReplies": true,
    "includeMetadata": false,
    "format": "png",
    "quality": 90,
    "deviceScaleFactor": "1x"
};

// Run the Actor and wait for it to finish
const run = await client.actor("nimbryxo-studio/twitter-x-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 = {
    "postUrls": ["https://x.com/NASA/status/2107095768821576019"],
    "captureMode": "postCard",
    "theme": "dark",
    "fullPage": False,
    "hideReplies": True,
    "includeMetadata": False,
    "format": "png",
    "quality": 90,
    "deviceScaleFactor": "1x",
}

# Run the Actor and wait for it to finish
run = client.actor("nimbryxo-studio/twitter-x-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 '{
  "postUrls": [
    "https://x.com/NASA/status/2107095768821576019"
  ],
  "captureMode": "postCard",
  "theme": "dark",
  "fullPage": false,
  "hideReplies": true,
  "includeMetadata": false,
  "format": "png",
  "quality": 90,
  "deviceScaleFactor": "1x"
}' |
apify call nimbryxo-studio/twitter-x-screenshot-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/twitter-x-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/kcIeUfwCB7DUd1c2b/builds/MyDjoodZqiGQGH2Jm/openapi.json
