Offset pagination asks for 'items 40 to 60'. Cursor pagination asks for 'the next page after this marker'. The difference matters as soon as the underlying data changes while you are reading it.
What to watch for
Be careful with relative URLs. Resolve every link against the page it came from, not against the site root, or you will request pages that do not exist.
Selectors are the most fragile part of any scraper. Prefer stable attributes such as data-testid or semantic structure over generated class names, which can change on every deploy.
Deduplicate as you go. The same item often appears on several listing pages, and a stable identifier such as a SKU or ID makes duplicates easy to spot.
Putting it into practice
Validate the data you extract. Prices without currencies, dates without time zones and empty fields are common sources of silent errors downstream.
Keep configuration such as base URLs, delays and selectors out of your code. Changing a delay should not require a redeploy.
Key takeaway
Use cursors when the API offers them, treat them as opaque strings, and stop when the API returns no next cursor rather than when a page is short.