This page describes the functions of our HTTP API: pre-rendering, screenshots, PDFs, and scraping.
Each function targets a specific URL and is accessible through GET requests.
You can configure the options via HTTP headers.
Primary API Client: Node.js
To access Node.js client documentation, visit the Node.js client GitHub repository
Contact us
If you need a specific feature from a headless browser, please email us at support@headless-render-api.com
API Endpoint:service.headless-render-api.com
/$url
, for pre-rendering/screenshot/$url
, for screenshots/pdf/$url
, for PDFs/scrape/$url
, for scrapingOpen API Spec:
AI LLM (ChatGPT) Spec:
Notes:
For the target $URL
, include it as part of the path without re-encoding or re-escaping beyond what's required for a standard browser URL input. Both UTF-8 encoding and percent-encoding are acceptable
The pre-rendering API is designed for webserver middleware. A faster, separate endpoint is available for scraping purposes without pre-rendering features.
The Screenshot, PDF, and Scrape APIs are accessible via simple HTTP GET requests
The scrape endpoint serializes HTML just like the pre-render endpoint, but without the injected JavaScript, preloaded state, custom serialization, and proxy functionality, making it up to twice as fast for HTML serialization. If you're looking to scrape JavaScript apps (or plain old HTML apps), this is your endpoint.
X-Prerender-Token
curl --header "X-Prerender-Token: secret-token"
Our official libraries are configured to propogate 400
errors to what a visitor of your website would see, but the libraries are (or should be) configured to hide rate limiting (429
) and 5xx
errors and fallback to non-prerendered content.
400
content-type: application/octet-stream
429
500
502
503
504