# GIF Scroll Animation (`glenn/gif-scroll-animation`) Actor

Free tool to automatically create an animated GIF of any scrolling web page. Useful for testing UX, showcasing your work, and capturing any website as a GIF, including clickable elements and animations. Includes settings to adjust speed, wait before scrolling, slow down on-page animations, and more.

- **URL**: https://apify.com/glenn/gif-scroll-animation.md
- **Developed by:** [Glenn Goossens](https://apify.com/glenn) (community)
- **Categories:** Videos, Open source
- **Stats:** 5,509 total users, 8 monthly users, 95.1% runs succeeded, 27 bookmarks
- **User rating**: 2.00 out of 5 stars

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

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### Features

Our free GIF Scroll Animation actor is an automation tool to let you capture any scrolling web page as a GIF.

All content on the full page will be recorded, just as if you were scrolling the page yourself and recording it. But because it's automated, the pace of scrolling will be smooth.

It can be tricky to get a good recording of animations that appear when scrolling down a page. You might not scroll smoothly and the final result could look jerky or awkward. This GIF maker will automate the process, so that you just give it a URL and it will capture a wonderfully smooth animated recording of the page scrolling.

### Why use it?

If you want to showcase your website (or any website) or share it somewhere online, you might prefer to capture a scrolling GIF. That lets you avoid problems with browser support and you embed the GIF anywhere you like, such as on social media or in comments.

The tool can also be used to visually check pages and make sure that the user experience is good. It can let you see what the page will look like to a real person scrolling down the page and highlight problems with the layout or design. The GIF maker would be especially useful if you have to do this regularly for a lot of pages, so that you can avoid manually going to each page and interacting with it in a browser.

### How it works

It's very simple to use. You give the actor a URL, it visits the web page and takes screenshots. The screenshots are then used as frames and turned into a GIF.

There are several settings you can change if you want to change the frame rate, wait before scrolling, compress the GIF, change the viewport, and a bunch of other customizable options. Or you can just give it a URL and go with the default settings.

### Tutorial

Here's a [quick step-by-step guide](https://blog.apify.com/how-to-make-a-scrolling-gif-of-a-web-page/) to teach you how to make an animated scrolling GIF of any web page using GIF Scroll Animation. There's also a one-second history of the GIF and some awesome reaction GIFs to blow your mind...
Or you can watch our [video tutorial](https://www.youtube.com/watch?v=Rb_tI1xyOC0) on GIF Scroll Animation

https://www.youtube.com/watch?v=Rb\_tI1xyOC0

### Output

#### Example

Scrolling GIF for www.franshalsmuseum.nl:

<a href="https://blog.apify.com/how-to-make-a-scrolling-gif-of-a-web-page/" target="_blank">
  <img src="https://apify.com/src/gif-examples/www.franshalsmuseum.nl-scroll_lossy-comp.gif" alt="Frans Hals Museum GIF" style="width: 80%;">
</a>

#### Storage

The GIF files are stored in the Apify key-value store. The original GIF will always be saved. Additional GIFs might also be stored if you customize the compression method. You can also find links to the GIFs in the Dataset.

### Input parameters

| Field    | Type   | Required | Default | Description |
| -------- | ------ | -------- | ------- | ----------- |
| url      | string | Yes      |         | Website URL |
| frameRate | integer | No | 7 | Number of frames per second (fps). |
| scrollDown | boolean | Yes |  | When true, the actor will scroll down the page and capture it to create the GIF. |
| scrollPercentage | integer | No | 10 | Amount to scroll down determined as a percentage of the viewport height. (%) |
| recordingTimeBeforeAction | integer | No | 1 | Amount of time to capture the screen before doing any action like scrolling down or clicking. (ms) |
| clickSelector | integer | No |  | Used to click an element and record it. |
| recordingTimeAfterClick | integer | No | Amount of time to record the screen after clicking an element with the click selector. |
| waitToLoadPage | integer | No | 0 | Set time to wait at the beginning so that page is fully loaded (ms). |\
| cookieWindowSelector | string | No | | CSS selector to remove cookie pop-up window if one is present. |
| slowDownAnimations | boolean | No | false |When selected, slows down animations on the page so they can be properly captured. |
| lossyCompression | boolean | No | true | Lossy LZW compression of GIF using Giflossy. |
| loslessCompression | boolean | No | false | Lossless compression of GIF using Gifsicle. |
| viewportWidth | integer | No | 1366 | Inner width of browser window (pixels) |\
| viewportHeight | integer | No | 768 | Inner height of browser window (pixels) |

#### Input example

```json
{
  "url": "https://www.franshalsmuseum.nl/en/",
    "frameRate": 7,
    "scrollDown": true,
    "recordingTimeBeforeAction": 1500,
    "cookieWindowSelector": ".cookiebar"
}
```

# Actor input Schema

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

Website URL

## `proxyOptions` (type: `object`):

Select proxies to be used by your actor.

## `frameRate` (type: `integer`):

Number of frames per second (fps)

## `scrollDown` (type: `boolean`):

When selected the actor will scroll down the page and capture it to create the gif.

## `scrollPercentage` (type: `integer`):

Amount to scroll down determined as a percentage of the vierport height.

For example, if viewport height is 1000 pixels and scroll percentage is set to 10%.
Then scroll down by 10% of viewport height: 1000 px = 100 px

## `recordingTimeBeforeAction` (type: `integer`):

Amount of time to capture the screen before doing any action like scrolling down or clicking.

## `clickSelector` (type: `string`):

Used to click an element and record it.

## `recordingTimeAfterClick` (type: `integer`):

Amount of time to record the screen after clicking an element with the click selector.

## `waitToLoadPage` (type: `integer`):

Set time to wait in the beginning so that page is fully loaded.
For example when there is loading bar in the beginning that you don't want in the recording.

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

<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors" target="_blank">CSS selector</a> for the cookie pop-up window that will be used to remove the element from the DOM.

## `slowDownAnimations` (type: `boolean`):

When selected it slows down animations on the page so they can be properly captured.

## `lossyCompression` (type: `boolean`):

Lossy LZW compression of GIF using <a href="https://kornel.ski/lossygif/" target="_blank">Giflossy</a> (part of Gifsicle now).

## `loslessCompression` (type: `boolean`):

Losless compression of GIF using <a href="https://www.lcdf.org/gifsicle/" target="_blank">Gifsicle.</a>

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

Inner width of browser window

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

Inner height browser window

## Actor input object example

```json
{
  "url": "https://crawlee.dev/",
  "proxyOptions": {
    "useApifyProxy": true
  },
  "frameRate": 7,
  "scrollDown": true,
  "scrollPercentage": 10,
  "recordingTimeBeforeAction": 1000,
  "waitToLoadPage": 5000,
  "cookieWindowSelector": ".cookieConsent button",
  "slowDownAnimations": false,
  "lossyCompression": true,
  "loslessCompression": false,
  "viewportWidth": 1366,
  "viewportHeight": 768
}
```

# 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://crawlee.dev/",
    "proxyOptions": {
        "useApifyProxy": true
    },
    "frameRate": 7,
    "scrollPercentage": 10,
    "recordingTimeBeforeAction": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("glenn/gif-scroll-animation").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://crawlee.dev/",
    "proxyOptions": { "useApifyProxy": True },
    "frameRate": 7,
    "scrollPercentage": 10,
    "recordingTimeBeforeAction": 1000,
}

# Run the Actor and wait for it to finish
run = client.actor("glenn/gif-scroll-animation").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://crawlee.dev/",
  "proxyOptions": {
    "useApifyProxy": true
  },
  "frameRate": 7,
  "scrollPercentage": 10,
  "recordingTimeBeforeAction": 1000
}' |
apify call glenn/gif-scroll-animation --silent --output-dataset

```

## MCP server setup

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

```

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/vD9hGchaunvnPrcQr/builds/q5nrH49RS6XtdLWGM/openapi.json
