Using a Real Browser
This example shows how to make a basic POST request using a browser which will execute any JavaScript and wait for the page to complete loading before responding with the final rendered document.
By default, an HTTP client will be used and JavaScript will not run on the target website. To use a real browser instance, simply set the useBrowser
parameter to true
.
A few additional options are available when using a browser such as automatically solving captchas and browser control commands. If the website you are targeting has dialogs they will be automatically cancelled, if you need to accept them instead you can also set acceptDialogs
to true
.
Example Request
GET https://api.scrapi.tech/v1/scrape?url=https://deventerprise.com&useBrowser=true
POST https://api.scrapi.tech/v1/scrape
{
"url": "https://deventerprise.com",
"useBrowser": true,
"acceptDialogs": false
}
Testing
If you want to test this request or a variation of it, head to the Playground or the OpenAPI page.