Pagination Detector
Pricing
Pay per event
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
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
paginationTypeclassification and direct URLs, so you can immediately act on the data
Input parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
urls | string[] | 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
| Field | Type | Description |
|---|---|---|
url | string | The checked page URL |
hasPagination | boolean | Whether any pagination pattern was detected |
paginationType | string | Type of pagination found (numbered, next-prev, load-more, url-pattern, or null) |
nextPageUrl | string | URL of the next page, if detected |
prevPageUrl | string | URL of the previous page, if detected |
totalPages | number | Total page count, if detectable from numbered pagination |
currentPage | number | Current page number, if detectable |
error | string | Error message if detection failed, null otherwise |
checkedAt | string | ISO 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.
| Event | Price | Description |
|---|---|---|
| Start | $0.035 | One-time per run |
| URL checked | $0.001 | Per 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 ApifyClientclient = 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().itemsprint(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=2or 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-prevpagination, your scraper should follownextPageUrllinks; 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
paginationTypevalue to decide your scraping strategy --next-prevmeans you should follow links sequentially, whilenumberedmeans 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.