API Parameters
Learn to optimize ScraperAPI with advanced parameters in Java: country_code, render, premium proxies, and autoparse. Full reference with JSON configuration.
You can use the usual API parameters just the same way you’d use it with our synchronous API. These parameters should go into an apiParams
object inside the POST data, e.g:
{
"apiKey": "API_KEY",
"apiParams": {
"autoparse": false, // boolean
"country_code": "us", // string, see: https://api.scraperapi.com/geo
"keep_headers": true, // boolean
"device_type": "desktop", // desktop | mobile
"follow_redirect": false, // boolean, true by default
"premium": true, // boolean
"ultra_premium": true, // boolean
"render": false, // boolean
"wait_for_selector": "#replace-with-selector", // works in combination with render=true
"screenshot": true, // boolean
"retry_404": false // boolean
"output_format": "text" // text | markdown. Default is HTML.
},
"url": "https://example.com",
"expectUnsuccessReport": true, // boolean, returns data for failed jobs
"timeoutSec": "value" // number of seconds for the timeout. timeoutSec=600 --> 600 seconds.
}
// Note: expectUnsuccessReport and timeoutSec are exclusive to the Async API
Last updated
Was this helpful?