API docs (pre-rendering, server-side rendering, screenshots, PDFs, and scraping) | Headless-Render-API
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.
API Endpoint:
service.headless-render-api.com
API paths and functionality:
/$url, for pre-rendering/screenshot/$url, for screenshots/pdf/$url, for PDFs/scrape/$url, for scraping
Open 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.
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.