Pagination Detector avatar

Pagination Detector

Pricing

Pay per event

Go to Apify Store
Pagination Detector

Pagination Detector

This actor detects pagination patterns on web pages. It identifies numbered pagination, next/prev links, `<link rel="next/prev">` tags, load-more buttons, and URL-based pagination patterns. Useful for web scraping preparation and SEO analysis.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

Detect pagination patterns, next/prev links, and page counts on web pages.

What does Pagination Detector do?

This actor detects pagination patterns on web pages. It identifies numbered pagination, next/prev links, <link rel="next/prev"> tags, load-more buttons, and URL-based pagination patterns. Use it to plan your web scraping strategy, audit SEO pagination implementation, or understand how a website structures its paginated content before building a crawler.

Submit a list of URLs and get back a structured report for each page telling you whether pagination exists, what type it is, where the next and previous pages are located, and (when available) the total page count.

Use cases

  • Web scraping engineers -- detect how to navigate paginated content before building a scraper
  • SEO specialists -- audit whether rel="next/prev" tags are properly implemented across your site
  • Site architects -- understand pagination patterns during website redesign or migration planning
  • QA testers -- verify that pagination links work correctly across different page templates
  • Data analysts -- identify all paginated sections on a site to estimate total content volume

Why use Pagination Detector?

  • Detects multiple pagination types -- finds numbered pagination, next/prev links, rel="next/prev" tags, load-more buttons, and URL-based patterns
  • Batch processing -- check hundreds of URLs in a single run to audit pagination across your entire site
  • Structured JSON output -- every result includes pagination type, next/prev URLs, and page count for easy programmatic use
  • API accessible -- trigger detection runs from your own code or automation workflows
  • Pay-per-event pricing -- only pay for each URL checked, no monthly subscription required
  • Fast HTTP-based analysis -- no browser overhead means quick results even for large batches
  • Clear output format -- each result includes a paginationType classification and direct URLs, so you can immediately act on the data

Input parameters

ParameterTypeRequiredDefaultDescription
urlsstring[]Yes--List of URLs to detect pagination on

Example input

{
"urls": [
"https://news.ycombinator.com",
"https://www.reddit.com",
"https://example.com"
]
}

Output example

{
"url": "https://news.ycombinator.com",
"hasPagination": true,
"paginationType": "next-prev",
"nextPageUrl": "https://news.ycombinator.com/news?p=2",
"prevPageUrl": null,
"totalPages": null,
"currentPage": null,
"error": null,
"checkedAt": "2026-03-01T12:00:00.000Z"
}

Output fields

FieldTypeDescription
urlstringThe checked page URL
hasPaginationbooleanWhether any pagination pattern was detected
paginationTypestringType of pagination found (numbered, next-prev, load-more, url-pattern, or null)
nextPageUrlstringURL of the next page, if detected
prevPageUrlstringURL of the previous page, if detected
totalPagesnumberTotal page count, if detectable from numbered pagination
currentPagenumberCurrent page number, if detectable
errorstringError message if detection failed, null otherwise
checkedAtstringISO timestamp of the check

How much does it cost?

Pagination Detector uses Apify's pay-per-event pricing model. You only pay for what you use.

EventPriceDescription
Start$0.035One-time per run
URL checked$0.001Per URL checked

Example costs:

  • 10 URLs: $0.035 + 10 x $0.001 = $0.045
  • 100 URLs: $0.035 + 100 x $0.001 = $0.135
  • 1,000 URLs: $0.035 + 1,000 x $0.001 = $1.035

Using the Apify API

You can start Pagination Detector programmatically from your own applications using the Apify API. The following examples show how to run the actor and retrieve results in both Node.js and Python.

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/pagination-detector').call({
urls: ['https://news.ycombinator.com'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/pagination-detector').call(run_input={
'urls': ['https://news.ycombinator.com'],
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Integrations

Pagination Detector works with all major automation platforms available on Apify. Export results to Google Sheets to build a pagination audit spreadsheet for your site. Use Zapier or Make to trigger pagination checks when new pages are added to your CMS. Send detection results to Slack to notify your scraping team about new pagination patterns that need handling. Pipe output into n8n workflows or set up webhooks to get notified as soon as a run finishes. Chain it with other Apify actors to automatically feed detected next-page URLs into your scrapers. You can also use the Apify scheduling feature to run periodic audits and detect when sites change their pagination implementation.

Supported pagination patterns

The actor detects the following pagination implementations:

  • Numbered pagination -- clickable page number links (1, 2, 3, ...) commonly used on e-commerce category pages
  • Next/prev links -- anchor tags with "Next", "Previous", or arrow text linking to adjacent pages
  • Rel next/prev tags -- <link rel="next"> and <link rel="prev"> HTML head tags used for SEO
  • Load-more buttons -- buttons that trigger loading additional content (detected in the HTML source)
  • URL-based patterns -- query parameters like ?page=2 or path segments like /page/2/

Tips and best practices

  • Check category and listing pages -- pagination is most commonly found on category pages, search results, and content listing pages rather than individual articles
  • Use the output to plan your scraper -- if the actor detects next-prev pagination, your scraper should follow nextPageUrl links; if it detects numbered pagination, you can construct URLs directly
  • Batch similar page templates together -- pages using the same template usually share the same pagination pattern, so checking one representative URL per template is often sufficient
  • Combine with Sitemap URL Extractor -- extract all URLs from a sitemap first, then run Pagination Detector on listing pages to understand the full site structure
  • Check both desktop and mobile URLs -- some sites use different pagination patterns on mobile versions
  • Look at the paginationType value to decide your scraping strategy -- next-prev means you should follow links sequentially, while numbered means you can generate all page URLs upfront

FAQ

What pagination types can this actor detect? It detects numbered pagination (page 1, 2, 3...), next/prev anchor links, <link rel="next/prev"> HTML tags, load-more buttons, and URL-based patterns like ?page=2 or /page/2/. The paginationType field in the output tells you exactly which pattern was found.

How do I use the results to build a scraper? Check the paginationType field. For next-prev, follow the nextPageUrl link on each page until it returns null. For numbered pagination, use the totalPages value to construct all page URLs. For url-pattern, look at the URL structure and generate the sequence programmatically.

What if a page has multiple pagination patterns? The actor reports the most prominent pagination pattern it detects. If a page has both numbered pagination and next/prev links (which is common), the actor will report both the type and any available next/prev URLs.

Does it follow pagination to find all pages? No. The actor analyzes a single page to detect what pagination pattern is present and provides the next/prev URLs. It does not crawl through all pages. Use the detected patterns to build your own pagination logic.

Can it detect infinite scroll? The actor uses HTTP requests without a browser, so it cannot detect JavaScript-based infinite scroll. It focuses on HTML-based pagination patterns that are visible in the page source. For sites that use infinite scroll, consider checking whether they also provide a <link rel="next"> tag or a URL-based fallback pattern.