Skip to main content
POST
Scrape a page

Authorizations

Authorization
string
header
required

Either a Gainflow API key (gf_live_*) or a WorkOS AuthKit OAuth 2.1 JWT.

Headers

Idempotency-Key
string

Optional 24-hour idempotency key (max 128 chars). Reusing with a different payload returns 409 Conflict.

Required string length: 1 - 128

Body

application/json
url
string<uri>
required
Maximum string length: 2048
formats
enum<string>[]
Required array length: 1 - 5 elements
Available options:
markdown,
html,
raw_html,
links,
screenshot
only_main_content
boolean
default:true
parse
object
country
string
default:US
Pattern: ^[A-Z]{2}$
max_age_sec
integer
default:0
Required range: 0 <= x <= 604800
zdr
boolean
default:false
timeout_ms
integer
default:15000
Required range: 1000 <= x <= 30000
render_js
boolean
default:false

Force rendering in the L4 Camoufox browser engine. When false, Gainflow automatically escalates SPA shells and anti-bot challenges.

wait_for_ms
integer
default:800

Optional wait after DOMContentLoaded when rendered in the L4 browser engine.

Required range: 0 <= x <= 10000
actions
object[]

Optional browser actions executed before extraction (triggers L4 Camoufox).

Maximum array length: 10

Response

Scraped page result

data
object
required
meta
object
required