How do I limit the number of records or reviews?
If repeated records are loaded by scrolling, you can stop after a specific number by setting an Element limit on the scrolling Element selector.
Limit records on an infinite-scroll list
- Create or open the Element selector that matches the repeated records.
- Enable Scroll.
- Set the Element limit to the maximum number of records you want returned.
- Preview the result and run a small test scrape.
The scraper stops scrolling when it can no longer discover new matching elements or when the configured Element limit is reached.
Example: limit customer reviews
If a product detail page contains a repeated review list that loads as you scroll, place an Element selector around the reviews, enable scrolling, and set the Element limit to the number of reviews you need.
detail_link
└── reviews (Element, scrolling enabled, element limit set)
├── reviewer
├── rating
└── review_text
When Element limit does not apply
Element limit controls the maximum number of elements returned while scrolling. It is not a general limit for every type of sitemap navigation.
If additional records are loaded through numbered pagination or a Load more button, configure that navigation with a Pagination selector instead.
See the Element selector documentation and Pagination, load more and infinite scrolling documentation for more information.