# Webpage Scroll-Through GIF Generator (`nimbryxo-studio/webpage-scroll-through-gif-generator`) Actor

Turn any webpage into an animated GIF that scrolls from top to bottom, with adjustable viewport size, scroll speed, frame delay, and resolution.

- **URL**: https://apify.com/nimbryxo-studio/webpage-scroll-through-gif-generator.md
- **Developed by:** [Nimbryxo-studio](https://apify.com/nimbryxo-studio) (community)
- **Categories:** Automation, Developer tools, Videos
- **Features:** 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

## Webpage Scroll-Through GIF Generator

Taking a scrolling screen recording of a webpage usually means opening a screen-capture tool, scrolling by hand, and exporting a video. This actor automates the whole thing: point it at a URL and it scrolls the page top to bottom in a headless browser, capturing a frame at each step, then hands you back a single animated GIF.

### What this actor does

- Loads any public URL in a headless browser at the viewport size you choose, then scrolls it down in fixed-pixel steps, capturing one frame per step.
- Stops automatically once it reaches the bottom of the page, or at a frame cap you set, whichever comes first.
- Optionally clicks a cookie-consent dismiss button first, so the banner doesn't show up in every captured frame.
- Can wait extra time after the page loads before capturing starts, for pages that finish loading content asynchronously.
- Downscales frames by an integer factor before encoding, trading sharpness for a smaller file; if capture or GIF assembly fails, the run records the reason instead of leaving the record incomplete.

### Output per run

| Field | Description |
|---|---|
| `url` | The page URL that was captured |
| `gifUrl` | Public URL of the generated GIF |
| `frameCount` | Number of frames captured before reaching the bottom of the page or the frame cap |
| `width` / `height` | Final GIF dimensions in pixels, after downscaling |
| `aspectRatio` | `width / height`, rounded to 3 decimal places |
| `fileSizeBytes` | Size of the encoded GIF, in bytes |
| `frameDelayMs` | Per-frame delay encoded into the GIF |
| `durationMs` | Total GIF playback duration: `frameDelayMs × frameCount` |
| `scrapedAt` | UTC timestamp of the run |

If capture or encoding fails, the run instead produces a record with `type: "gif_scroll_error"`, a `reason`, and a short `message` describing what went wrong, along with `url` and `scrapedAt`.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `url` | string | – | Page URL to capture. Must start with `http://` or `https://`. Required. |
| `viewportWidth` | integer | `1280` | Browser viewport width in pixels. |
| `viewportHeight` | integer | `720` | Browser viewport height in pixels. |
| `scrollStepPx` | integer | `250` | Pixels to scroll between captured frames; smaller values give a smoother animation with more frames. |
| `frameDelayMs` | integer | `200` | Per-frame delay encoded into the GIF. |
| `maxFrames` | integer | `60` | Maximum number of frames to capture, so very tall pages can't run indefinitely. |
| `cookieWindowSelector` | string | – | CSS selector of a cookie-consent dismiss button to click after the page loads; skipped if not found. |
| `waitToLoadPageMs` | integer | `0` | Extra wait, in milliseconds, after the page settles before the first frame is captured. |
| `downscaleFactor` | integer | `2` | Integer factor to shrink each frame by before encoding; `1` keeps full resolution, higher values give a smaller but softer GIF. |

#### Example: default capture

```json
{
  "url": "https://apify.com"
}
```

#### Example: taller viewport, slower scroll, sharper output

```json
{
  "url": "https://example.com/long-landing-page",
  "viewportWidth": 1440,
  "viewportHeight": 900,
  "scrollStepPx": 150,
  "frameDelayMs": 300,
  "downscaleFactor": 1,
  "maxFrames": 100
}
```

#### Example: dismiss a cookie banner and wait for async content

```json
{
  "url": "https://example.com/app-landing",
  "cookieWindowSelector": "button[aria-label=\"Accept all\"]",
  "waitToLoadPageMs": 2000
}
```

### Use cases

- **Marketing and social previews** — produce a scrolling preview of a landing page to drop into a deck, Slack message, or social post.
- **Design and QA review** — give reviewers a single animated artifact instead of a stack of full-page screenshots.
- **Documentation** — embed a page walkthrough in a doc or changelog without recording and trimming a video.
- **Release comparison** — recapture the same URL after a deploy to spot visual changes in a scroll-through.

### FAQ

**Does this need a proxy?**
No — it captures pages over the run's normal network connection.

**Why did the GIF stop before reaching the bottom of the page?**
Either it hit `maxFrames` first, or the page kept growing (infinite scroll) and the run reached its frame cap rather than scrolling forever. Raise `maxFrames` for longer pages.

**Why isn't the scrolling perfectly smooth?**
GIF frame timing only supports hundredths-of-a-second increments, so `frameDelayMs` gets rounded to the nearest supported value. This actor targets quick previews, not frame-accurate video.

**How large will the GIF be?**
It depends on page height, viewport size, and `downscaleFactor`. A full-resolution capture of a long page can run several megabytes; doubling `downscaleFactor` roughly quarters the frame area and shrinks the file accordingly.

**The page didn't capture — what happened?**
Some sites block automated browsers outright. Check the output record: a `type: "gif_scroll_error"` record with a `reason` and `message` means capture or GIF assembly failed rather than silently producing an empty result.

**Can I get just the GIF file without the dataset record?**
The `gifUrl` field in the dataset record is a direct link to the GIF file — open or download it from there.

**Does it work on pages behind a login?**
No. The actor loads the URL as a normal anonymous visitor, so pages that require authentication to view won't render correctly.

# Actor input Schema

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

The URL of the webpage to capture.

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

Browser viewport width.

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

Browser viewport height.

## `scrollStepPx` (type: `integer`):

How many pixels to scroll between each captured frame.

## `frameDelayMs` (type: `integer`):

Per-frame delay encoded into the GIF.

## `maxFrames` (type: `integer`):

Hard cap on frames captured (protects very-long pages from runaway runs).

## `cookieWindowSelector` (type: `string`):

CSS selector of a cookie-consent dismiss button to click after page load (e.g. button\[aria-label="Accept all"]). Skipped if not found.

## `waitToLoadPageMs` (type: `integer`):

Additional milliseconds to wait after networkidle before capturing the first frame. Use for sites with async/sliding content.

## `downscaleFactor` (type: `integer`):

Resize each frame down by this integer factor before encoding (1 = no resize, 2 = half, 3 = third). Lower factors → larger but sharper GIF.

## Actor input object example

```json
{
  "url": "https://apify.com",
  "viewportWidth": 1280,
  "viewportHeight": 720,
  "scrollStepPx": 250,
  "frameDelayMs": 200,
  "maxFrames": 60,
  "waitToLoadPageMs": 0,
  "downscaleFactor": 2
}
```

# Actor output Schema

## `gifs` (type: `string`):

Dataset containing one generated-GIF record per run.

# 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://apify.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("nimbryxo-studio/webpage-scroll-through-gif-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 = { "url": "https://apify.com" }

# Run the Actor and wait for it to finish
run = client.actor("nimbryxo-studio/webpage-scroll-through-gif-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 '{
  "url": "https://apify.com"
}' |
apify call nimbryxo-studio/webpage-scroll-through-gif-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nimbryxo-studio/webpage-scroll-through-gif-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/Kw5w4exMMPeJjyOMM/builds/87Oosps8CELVbgOSO/openapi.json
