```yaml
product: AlterLab
title: "Infinite Scroll — Web Scraping Glossary | AlterLab"
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/glossary/infinite-scroll
```

general

# Infinite Scroll

Infinite scroll is a UX pattern where additional content loads automatically as the user scrolls toward the bottom of the page, replacing traditional pagination.

Social media feeds, image galleries, and news aggregators commonly use infinite scroll to create a seamless browsing experience. From a scraping perspective, the page's initial HTML contains only the first batch of items; subsequent batches are loaded via JavaScript-triggered XHR or Fetch API calls as the viewport approaches the document's bottom edge.

Scraping infinite-scroll pages requires either a headless browser that can trigger scroll events and wait for network responses to settle, or direct interception of the underlying API calls that power the lazy loading. The latter is more efficient — once the API endpoint and parameters are identified, content can be fetched programmatically without rendering overhead.

AlterLab's network interception capability captures these background API calls, allowing callers to retrieve all paginated content without simulating scroll gestures. When the underlying API is not publicly accessible, the browser-based tier scrolls the page programmatically and captures DOM updates.

### What is Infinite Scroll?

Infinite scroll is a UX pattern where additional content loads automatically as the user scrolls toward the bottom of the page, replacing traditional pagination.

### How does AlterLab handle Infinite Scroll?

AlterLab's network interception capability captures these background API calls, allowing callers to retrieve all paginated content without simulating scroll gestures. When the underlying API is not publicly accessible, the browser-based tier scrolls the page programmatically and captures DOM updates.

## Examples

```
// Playwright: scroll to bottom to trigger infinite load
async function scrapeInfiniteScroll(page) {
  let prevHeight = 0;
  while (true) {
    await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight));
    await page.waitForTimeout(1500);
    const newHeight = await page.evaluate(() => document.body.scrollHeight);
    if (newHeight === prevHeight) break;
    prevHeight = newHeight;
  }
}
```

## Related Terms

[PaginationThe division of large data sets across multiple pages, requiring scrapers to follow next-page links or increment page parameters to retrieve complete data.](https://alterlab.io/glossary/pagination)[Dynamic ContentPage content generated client-side by JavaScript after the initial HTML is served, requiring a browser engine to render.](https://alterlab.io/glossary/dynamic-content)[JavaScript RenderingThe process of executing a page's JavaScript in a browser engine before extracting content, required for React, Vue, and Angular SPAs.](https://alterlab.io/glossary/javascript-rendering)[Network InterceptionCapturing XHR/fetch API responses made by a page's JavaScript during browser rendering to extract structured data directly from network calls.](https://alterlab.io/glossary/network-interception)[Headless BrowserA web browser that runs without a graphical user interface, executing JavaScript and rendering pages exactly as a real browser would.](https://alterlab.io/glossary/headless-browser)

## Extract Infinite Scroll data from any website

AlterLab returns clean, structured data from any public URL — no scraper infrastructure needed. Start free, no credit card required.

[View API docs](https://alterlab.io/docs/api/rest)

[Back to Glossary](https://alterlab.io/glossary)