Skip to main content
Piloterr
Back to library

Website Rendering Instructions (POST) API

Execute browser automation instructions (scroll, scroll_to_bottom) during headless rendering to trigger lazy-loaded content, bypass anti-bot detection, and scrape dynamically loaded pages.

Active2 credits = 1 requestPOST/v2/website/rendering

Endpoint Overview

Detailed documentation, pricing, and usage examples.

OverviewLink to Overview

The Website Rendering Instructions API extends the headless browser rendering capability with a browser_instructions parameter, allowing you to programmatically control scrolling and other browser actions before extracting the rendered HTML. This is essential for triggering lazy-loaded content, infinite scroll pages, or simulating human-like navigation to avoid detection.

Supported instruction types:

  • scroll — scroll by a precise number of pixels (horizontal and/or vertical)
  • scroll_to_bottom — automatically scroll to the bottom of the page

QuickstartLink to Quickstart

POST https://api.piloterr.com/v2/website/rendering
Content-Type: application/json

{
  "query": "https://www.comparably.com/companies/airbus",
  "wait_for": "#ng-state",
  "browser_instructions": [
    { "type": "scroll", "x": 0, "y": 4115, "wait_time_s": 5 }
  ]
}

ParametersLink to Parameters

Parameter Type Required Description
query string yes A website URL with either the http or https protocol
wait_in_seconds integer no Seconds to wait after page load before returning HTML (0–30)
wait_for string no CSS or XPath selector to wait for before returning HTML
block_ads boolean no If true, ad requests are blocked during rendering. false by default
timeout integer no Maximum seconds to wait for the page to load. Default: 30
browser_instructions array no Array of browser automation instructions to execute sequentially

Browser Instructions — scrollLink to Browser Instructions — scroll

Field Type Required Description
type string yes Must be "scroll"
x integer yes Pixels to scroll horizontally
y integer yes Pixels to scroll vertically
duration number no Scroll duration in seconds. Default: 0 (instant)
wait_time_s number no Wait time after scroll in seconds. Default: 0

Browser Instructions — scroll_to_bottomLink to Browser Instructions — scroll_to_bottom

Field Type Required Description
type string yes Must be "scroll_to_bottom"
duration number no Scroll duration in seconds. Default: 0 (instant)
wait_time_s number no Wait time after scroll in seconds. Default: 0

Response fieldsLink to Response fields

Field Type Description
(response body) string Fully rendered HTML content after JavaScript execution and browser instructions

NotesLink to Notes

  • This endpoint costs 2 credits per request
  • Domain filtering is applied. Contact support to whitelist your target domain
  • Instructions are executed sequentially; if one fails, subsequent ones continue
  • Increase timeout when instructions have significant cumulative durations

Main use casesLink to Main use cases

  • Trigger lazy-loaded images and infinite scroll sections before extracting content from product listing or news feed pages
  • Simulate human-like scrolling behavior to bypass bot detection systems on JavaScript-heavy websites
  • Load dynamically rendered content (reviews, comments, data tables) that only appears after user interaction
  • Automate multi-step browser navigation on SPAs to reach deep page states before scraping

Related APIs

Expand your data capabilities with these complementary tools.

Ready to get started?

Your web scraping API is one click away. Start with +500 credits, no infrastructure to set up, no proxies to manage, and no credit card required.

  • +500 credits
  • No credit card required
  • All endpoints included