# puppeteer-autoscroll-down

> Handle infinite scroll on websites with puppeteer

Latest version **2.0.1** (published 2025-09-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install puppeteer-autoscroll-down
pnpm add puppeteer-autoscroll-down
yarn add puppeteer-autoscroll-down
bun add puppeteer-autoscroll-down
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2025-09-18 |
| First published | 2019-01-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 50 |
| Author | mbalabash |
| Maintainers | mbalabash |
| Keywords | headless-chrome, puppeteer, parsing, infinite, scroll |

## Links

- npm: https://www.npmjs.com/package/puppeteer-autoscroll-down
- Repository: https://github.com/mbalabash/puppeteer-autoscroll-down
- Homepage: https://github.com/mbalabash/puppeteer-autoscroll-down#readme
- Issues: https://github.com/mbalabash/puppeteer-autoscroll-down/issues
- npm.io page: https://npm.io/package/puppeteer-autoscroll-down

## Alternatives

- [@snazzah/davey](https://npm.io/package/@snazzah/davey.md) — 1.5M weekly downloads
- [@vendure/testing](https://npm.io/package/@vendure/testing.md) — 8.3K weekly downloads
- [vue-simple-context-menu](https://npm.io/package/vue-simple-context-menu.md) — 6.6K weekly downloads
- [cypress-webpack-preprocessor-v5](https://npm.io/package/cypress-webpack-preprocessor-v5.md) — 2.1K weekly downloads
- [@backstage/plugin-catalog-backend-module-puppetdb](https://npm.io/package/@backstage/plugin-catalog-backend-module-puppetdb.md) — 1.3K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2025-09-18
- 2.0.0 — 2023-11-21
- 1.1.2 — 2023-03-25
- 1.1.1 — 2022-03-28
- 1.1.0 — 2022-02-27
- 1.0.0 — 2021-12-11
- 0.2.0 — 2021-11-05
- 0.1.7 — 2021-05-25
- 0.1.6 — 2020-07-22
- 0.1.5 — 2020-04-20
- 0.1.4 — 2020-03-17
- 0.1.3 — 2020-03-14
- 0.1.2 — 2019-08-28
- 0.1.1 — 2019-01-26
- 0.1.0 — 2019-01-26

## README

# Handle infinite scroll on websites with puppeteer

Small puppeteer tool which makes your parsing experience a little bit better

## Usage

**`size` - Number of pixels to scroll on each step** `[default: 250]`

**`delay` - Delay in ms after each completed scroll step** `[default: 100]`

**`stepsLimit` - Max number of steps to scroll** `[default: null]`

```js
const puppeteer = require('puppeteer')
const { scrollPageToBottom } = require('puppeteer-autoscroll-down')

const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto('http://example.com')

const lastPosition = await scrollPageToBottom(page, {
  size: 500,
  delay: 250
})

await browser.close()
```

### Async content loading

**You can use returned value with request/response hooks to handle async content loading**

```js
const puppeteer = require('puppeteer')
const { scrollPageToBottom } = require('puppeteer-autoscroll-down')

const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto('http://example.com')

let isLoadingAvailable = true // Your condition-to-stop

while (isLoadingAvailable) {
  await scrollPageToBottom(page, { size: 500 })
  await page.waitForResponse(
    response => response.url() === 'http://example.com' && response.status() === 200
  )
  isLoadingAvailable = false // Update your condition-to-stop value
}

await browser.close()
```

### Not only scroll to the bottom, but there is also function for scroll to the top

**`scrollPageToTop` supports same API as `scrollPageToBottom`**

```js
const puppeteer = require('puppeteer')
const { scrollPageToTop } = require('puppeteer-autoscroll-down')

const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto('http://example.com')

const lastPosition = await scrollPageToTop(page, {
  size: 500,
  delay: 250
})

await browser.close()
```

## Install

```sh
npm i puppeteer-autoscroll-down
```

or

```sh
yarn add puppeteer-autoscroll-down
```

## License

MIT

---
_Source: https://npm.io/package/puppeteer-autoscroll-down · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
