Render
Render a screenshot
Supply exactly one of url or html. Returns the image bytes. Counts one render.screenshot.
post/v1/screenshot
Request
- Base URL: https://api.ironfang.com/render
- URL: https://api.ironfang.com/render/v1/screenshot
- Auth: HTTP bearer
Headers
Idempotency-Keystring
Makes a synchronous render happen, and count, at most once. Any string up to 255 characters, remembered per account. The first request under a key is admitted and rendered as usual; a synchronous result is not kept, so the same request again under the key is a 409 idempotency_key_used and reserves nothing - send a new key to render again. A different request under a used key is a 409 idempotency_conflict. An identical request inside the cache window is still served from cache.
Request body
Example request
{
"actions": [
{
"selector": "#show-more",
"type": "click"
},
{
"selector": "#details",
"type": "wait_for_selector"
}
],
"css": ".chat-widget { display: none !important; }",
"script": "document.querySelector('#pricing')?.click();",
"success_rules": {
"fail_on_status": [
"4xx",
"5xx"
],
"forbid_text": [
"Sign in to continue"
],
"require_selector": "#invoice"
}
}Response
The rendered image. png unless format: jpeg was requested.
Changes
No recorded changes to this operation across all 1 revision of this API.