Skip to main content
Use Interact when browser actions are not enough: a form with several steps, a value you only see after clicking through, or a page you want to look at before you decide. It needs an API key and the metadata.scrapeId of a scrape from the last 24 hours. A scrape sent with zeroDataRetention cannot be interacted with.
The first call opens a session on the page the scrape read. If that scrape ran actions, they run again first. The same location and blockAds choice carry over. In your code, page is the session’s browser page with Playwright style methods such as page.title() and page.locator(selector).
Check exitCode and killed before you use result. The call itself is free. You pay for the time the session is open, when it closes. See Pricing.

Request fields

Send code or prompt. A body with neither returns 400 invalidRequest.

Response fields

Close the session

Send DELETE /v1/scrape/{id}/interact as soon as you are done. The response has sessionDurationMs and costUsd. A DELETE with no open session returns 200 and bills nothing. A session also ends after 5 minutes without a call and after 10 minutes at most, and you are billed for the time it was open. After it ends, the next call on the same scrape opens a new session, billed on its own.

Limits and errors

  • A scrape id older than 24 hours returns 404 notFound. Scrape the page again.
  • Open sessions are capped per plan. Over the cap the call returns 429 rateLimited. Close one and send again. See Rate limits.
  • zeroDataRetention on a call that reaches a session opened without it returns 400 invalidRequest. Close the session with DELETE, then send it on the first call.
To open a session on any URL, see Browser.