# sift-x-screenshotter (`cosmic_kapi/sift-x-screenshotter`) Actor

Capture clean screenshots of publicly accessible X (Twitter) posts from individual URLs or batches. Get screenshot references, post metadata, and per-post success or failure results for social listening, monitoring, research, and reporting workflows.

- **URL**: https://apify.com/cosmic_kapi/sift-x-screenshotter.md
- **Developed by:** [Pranav Satam](https://apify.com/cosmic_kapi) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $40.00 / 1,000 screenshot createds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### Sift X Screenshotter

Capture clean screenshots of individual public X (formerly Twitter) posts in batches, with downloadable image references, post metadata, and per-URL success or failure reporting.

Built for **social listening, research, evidence collection and reporting workflows**, including integration with the Sift Apple Shortcut.

#### What does it do?

Sift X Screenshotter uses a browser to open each supplied X post URL, locate the requested post and save a PNG screenshot of its rendered post container.

For every submitted URL, the Actor records an output item containing the capture status and relevant metadata.

Features include:

- Capture individual X posts or process multiple URLs in one run.
- Save PNG screenshots to the run's Apify key-value store.
- Return screenshot keys, storage references and download URLs.
- Capture post metadata where available, including username, page title, text preview and media presence.
- Record unsuccessful captures without interrupting the entire batch.
- Save diagnostic information for certain unsuccessful captures.
- Accept newline-separated URLs for easy integration with Apple Shortcuts.

The Actor captures screenshots; it does not search X, classify sentiment or generate social listening reports by itself.

#### How to use

1. Open the Actor's **Input** tab.
2. Enter one complete X post URL per line.
3. Click **Start**.
4. When the run finishes, open the **Output** tab.
5. Review the results and retrieve the saved screenshots from the run's storage.

**Example input:**

`https://x.com/jack/status/20`

For API integrations, the input is a JSON object with the `urlsText` property:

`{"urlsText":"https://x.com/jack/status/20"}`

Multiple URLs can be separated by newline characters. The Actor also supports an older `urls` array input format for compatibility.

#### What do the results contain?

Each submitted URL receives a dataset record with fields such as:

| Field | Description |
|---|---|
| `url` | Original requested post URL |
| `success` | Whether the screenshot was successfully captured |
| `username` | Post username, where available |
| `textPreview` | Extracted text preview, where available |
| `hasMedia` | Whether supported media elements were detected |
| `screenshotKey` | PNG filename in the key-value store |
| `storeId` | Key-value store identifier |
| `screenshotUrl` | API endpoint for retrieving the screenshot |
| `errorMessage` | Failure details, if capture was unsuccessful |
| `capturedAt` | UTC timestamp of the result |

Screenshots are saved in the Actor run's default key-value store. Access to private storage records may require authentication using the appropriate Apify API token.

An `OUTPUT` record also contains the batch results.

#### Pricing

The Actor uses **pay-per-event plus platform usage** pricing.

- **Successful screenshot:** $0.04 per captured screenshot.
- **Actor start:** $0.00005 per run.
- **Platform usage:** Additional variable charges based on computing resources, proxy traffic, storage operations and other applicable Apify usage.

A screenshot event is requested only after the image has been successfully saved. Failed captures do not trigger the successful-screenshot event, but they can still incur platform usage and the Actor-start charge.

Total cost depends on the number of URLs, processing time, network usage and the outcome of individual captures. Review Apify's estimated costs and run limits before processing large batches.

#### Limitations

X is a dynamic website. Screenshot availability depends on the post's accessibility, the website's rendering behaviour, network conditions and changes to X's interface.

Some posts may not be captured because an account is suspended, content is deleted or restricted, a login wall is displayed, or the requested post cannot be located.

The Actor may also encounter temporary network or browser failures.

A successful screenshot does not guarantee that every embedded image, video or reply is available. Screenshots capture the rendered state of the requested post at processing time.

The Actor does not guarantee uninterrupted access to X or successful capture of every submitted URL.

#### Integration with Sift

This Actor powers the screenshot-generation functionality of **Sift**, an Apple Shortcuts-based social listening utility.

Sift can supply X post URLs to the Actor, retrieve the resulting screenshot references and save the images for use in monitoring and reporting workflows.

When using the integration, users should configure their own Apify credentials and keep API tokens private.

#### Data handling and responsible use

Input URLs, output records, screenshots and diagnostics are stored within the relevant Apify run's storage resources, subject to Apify's access controls and retention settings.

Users are responsible for ensuring their collection, use and distribution of screenshots comply with applicable laws, privacy obligations and platform terms.

Sift X Screenshotter is an independent utility and is not affiliated with X or Twitter.

#### Troubleshooting

**A post could not be captured:** Check the original URL, post availability and any error or diagnostic fields in the output.

**A screenshot URL does not open:** Confirm that the relevant key-value store still exists and that the API request has the necessary authentication.

**Some posts succeeded while others failed:** This is expected when URLs have different availability or rendering conditions. Review the `success` field for each record.

**The run is slower than expected:** X rendering, proxy latency and post availability can affect processing time.

For reproducible issues, use the Actor's **Issues** tab and include a non-sensitive example URL and relevant error message. Never share API tokens or other credentials in issue reports.

# Actor input Schema

## `urlsText` (type: `string`):

Enter one full X post URL per line.

## Actor input object example

```json
{
  "urlsText": "https://x.com/jack/status/20"
}
```

# Actor output Schema

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

No description

# 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 = {
    "urlsText": "https://x.com/jack/status/20"
};

// Run the Actor and wait for it to finish
const run = await client.actor("cosmic_kapi/sift-x-screenshotter").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 = { "urlsText": "https://x.com/jack/status/20" }

# Run the Actor and wait for it to finish
run = client.actor("cosmic_kapi/sift-x-screenshotter").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 '{
  "urlsText": "https://x.com/jack/status/20"
}' |
apify call cosmic_kapi/sift-x-screenshotter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cosmic_kapi/sift-x-screenshotter"
        }
    }
}
```

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/1m2adzil7IEWr70af/builds/fyPvvX4xTXy4EbmpM/openapi.json
