Some pages load more content only after you click “Load more results” or scroll and wait. In reality, the page often fetches additional results from its own API. If ScrapingBee can’t load those results, you can target the site’s API URL directly.
Here’s how to do that using this URL as an example: https://www.reuters.com/technology
*Note that the JavaScript Scenario has a maximum execution time limit of 40 seconds. Requests exceeding this limit will result in a timeout: https://www.scrapingbee.com/documentation/js-scenario/#timeout
- Open the page and inspect it. In DevTools, go to the Network tab.
- Click Load more articles. You’ll see a new request appear in the Network panel.
- Copy the Request URL. In this case, it exposes an API endpoint that returns JSON.
Example request URL:
Opening that URL returns the content in JSON.
In practice, you may not need all the parameters. From our testing, this is sufficient:
On Reuters’ side, content is paginated using the offset
and size
parameters. The maximum appears to be 20 items per page (controlled by size
), starting from offset
0
. If you want page 2, use offset
19
; for page 3, use offset
39
, and so on.
Keep in mind that every site is different. This approach works for Reuters, but other sites can use different endpoints, parameters, and pagination rules.
Go back to tutorials