# Screenify (`spectre_scrape/screenify`) Actor

Take pixel-perfect screenshots with lazy-load handling, cookie banner dismissal, sticky header removal, and element targeting.

- **URL**: https://apify.com/spectre_scrape/screenify.md
- **Developed by:** [Spectre](https://apify.com/spectre_scrape) (community)
- **Categories:** Automation, Social media, Other
- **Stats:** 4 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## Website Screenshot Generator

Take clean, reliable screenshots of any website with one Apify Actor.

Website Screenshot Generator is built for pages that are hard to capture well:

- lazy-loaded content
- cookie and consent banners
- sticky headers and floating widgets
- animated UI states
- element-level screenshots for specific sections

Use it to create screenshots for product pages, research, QA, documentation, monitoring, and content workflows.

This README is written for the Apify listing, so it focuses on what users can do with the Actor and what they get back.

### What can Website Screenshot Generator do?

Website Screenshot Generator is designed to make website screenshots look clean and usable on the first try.

It can:

- capture a full page or just the visible viewport
- screenshot a specific element with a CSS selector
- attempt to dismiss cookie banners automatically
- scroll through the page to trigger lazy-loaded images and content
- hide sticky or fixed-position elements that often ruin full-page captures
- disable animations before capture for a more stable result
- save the screenshot as a PNG in the default Apify Key-Value Store
- publish run metadata to the dataset for easy automation

This makes it a practical choice when a basic browser screenshot is not enough.

Typical Apify use cases:

- saving screenshots for internal review
- generating visual evidence for monitoring
- capturing pages for documentation or research
- pulling screenshots into automation or AI workflows

### How to use Website Screenshot Generator

1. Open the Actor in Apify.
2. Paste the target website URL.
3. Choose your screenshot settings:
   - viewport width and height
   - full-page or viewport screenshot
   - optional element selector
   - cookie banner dismissal
   - sticky header hiding
   - post-load delay
4. Run the Actor.
5. Download the PNG from the Key-Value Store or use the API response in your workflow.

Recommended settings:

- Use `fullPage: true` for landing pages, docs, and article pages.
- Use `elementSelector` when you only need a specific card, section, or widget.
- Keep `closeCookieBanners` and `hideStickyHeaders` enabled for the cleanest results.

Example input:

```json
{
  "url": "https://example.com",
  "viewportWidth": 1920,
  "viewportHeight": 1080,
  "fullPage": true,
  "hideStickyHeaders": true,
  "closeCookieBanners": true,
  "delayMs": 2000,
  "navigationTimeoutMs": 30000
}
```

If you want a screenshot of just one section:

```json
{
  "url": "https://example.com/pricing",
  "elementSelector": "#pricing",
  "viewportWidth": 1440,
  "viewportHeight": 900
}
```

### Input

Required:

- `url`: The page you want to screenshot.

Optional:

- `viewportWidth`: Browser width in pixels. Default: `1920`
- `viewportHeight`: Browser height in pixels. Default: `1080`
- `fullPage`: Capture the whole scrollable page. Default: `false`
- `elementSelector`: CSS selector for a specific element to capture
- `hideStickyHeaders`: Hide fixed and sticky elements before capture. Default: `true`
- `closeCookieBanners`: Try to close consent banners automatically. Default: `true`
- `delayMs`: Extra wait time before capture. Default: `2000`
- `navigationTimeoutMs`: Maximum wait time for page navigation. Default: `30000`

Best practice:

- Use a larger viewport for modern landing pages.
- Use `elementSelector` only when the page structure is stable.
- Increase `delayMs` for highly animated sites.

### Output

The Actor produces two outputs:

- A PNG screenshot saved in the default Key-Value Store under `OUTPUT_SCREENSHOT`
- A dataset item containing the screenshot URL and capture metadata

Returned metadata includes:

- source URL
- viewport size
- whether the screenshot was full-page

Example result:

```json
{
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/OUTPUT_SCREENSHOT",
  "sourceUrl": "https://example.com",
  "viewportWidth": 1920,
  "viewportHeight": 1080,
  "fullPage": true
}
```

### How much will using Website Screenshot Generator cost you?

The cost depends on:

- the Apify plan you are on
- how many pages you screenshot
- how long each run takes
- whether the site is slow, heavily scripted, or blocked

In practice, the biggest cost drivers are browser time and retries.

To keep costs down:

- screenshot only the pages you need
- use a smaller viewport when appropriate
- avoid very large full-page captures unless necessary
- set a realistic timeout so blocked pages do not burn runtime

If you are running this at scale, the most efficient workflow is usually:

- one run per page
- targeted element screenshots where possible
- lightweight settings first, then increase quality only when needed

### Frequently asked questions

#### Can I use integrations with Website Screenshot Generator?

Yes. You can connect this Actor to automations and external tools through Apify integrations, webhooks, or your own workflow orchestration.

#### Can I use Website Screenshot Generator with the Apify API?

Yes. You can trigger the Actor, pass input, and read the screenshot result through the Apify API.

#### Can I use Website Screenshot Generator through an MCP Server?

Yes, if your MCP setup can call Apify Actors or Apify API endpoints, you can use this Actor as part of that workflow.

### Is it legal to take website screenshots?

Usually yes, but it depends on the website, your use case, and local laws.

Things to consider:

- website terms of service
- copyright and trademark concerns
- privacy and personal data
- robots and access restrictions
- permission requirements for internal or commercial use

This README is not legal advice. If you plan to use screenshots commercially, for sensitive data, or at scale, review the terms and consult legal counsel where appropriate.

### Your feedback

If you use Website Screenshot Generator, your feedback is welcome.

Tell us:

- which sites it works well on
- where cookie handling fails
- which banner patterns are missing
- what would make the output easier to automate

Feedback helps improve capture quality and makes the Actor more useful for everyone.

If you want this listing to be shorter and more conversion-focused for Apify, I can trim it down further and make the first screen of the listing more sales-oriented.

# Actor input Schema

## `url` (type: `string`):

The full URL of the website to screenshot.

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

Browser viewport width in pixels.

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

Browser viewport height in pixels.

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

Capture the entire scrollable page instead of just the viewport.

## `elementSelector` (type: `string`):

A CSS selector for a specific element to screenshot (e.g., '#pricing'). If provided, overrides the fullPage option.

## `hideStickyHeaders` (type: `boolean`):

Inject CSS to hide position:fixed and position:sticky elements before capture, preventing stitching artifacts on full-page shots.

## `closeCookieBanners` (type: `boolean`):

Attempt to automatically close cookie/GDPR consent banners before taking the screenshot.

## `delayMs` (type: `integer`):

Milliseconds to wait after all preparation steps before capturing. Useful for complex layout animations.

## `navigationTimeoutMs` (type: `integer`):

Maximum time to wait for the page to load before giving up.

## Actor input object example

```json
{
  "url": "https://example.com",
  "viewportWidth": 1920,
  "viewportHeight": 1080,
  "fullPage": false,
  "hideStickyHeaders": true,
  "closeCookieBanners": true,
  "delayMs": 2000,
  "navigationTimeoutMs": 30000
}
```

# Actor output Schema

## `screenshot` (type: `string`):

No description

## `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 = {
    "url": "https://example.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("spectre_scrape/screenify").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 = { "url": "https://example.com" }

# Run the Actor and wait for it to finish
run = client.actor("spectre_scrape/screenify").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 '{
  "url": "https://example.com"
}' |
apify call spectre_scrape/screenify --silent --output-dataset

```

## MCP server setup

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

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/SPM3NamtVbHR99hUE/builds/rONJY2lQqvpDYSKOW/openapi.json
