Works with the best tools:
Works with the best tools:
Have a question?
Contact usAdvanced options let you fine-tune how ScrapingBot fetches each page — enabling JavaScript rendering, switching proxy types, selecting a proxy location, and customising the HTTP request. These options are available across all endpoints.
| Option | Type | Default | Description |
|---|---|---|---|
| useChrome | boolean | false | 10 creditsEnable headless Chrome rendering for JavaScript-heavy pages (React, Vue, Angular…). Without this option, only static HTML is fetched. ⚠️ Consumes 10 credits per request instead of 1. |
| premiumProxy | boolean | false | 10 creditsUse a premium residential proxy pool. Significantly improves success rate on protected sites (Amazon, LinkedIn, Google, Rakuten…). ⚠️ Consumes 10 credits. Combined with useChrome: 20 credits. |
| proxyCountry | string | null | 25 creditsRoute the request through a proxy in a specific country. Useful when a site returns different content or currency based on the visitor's location. Requires premiumProxy: true for a wider set of countries. |
| proxyState | string | null | 60 creditsTarget a specific US or Australian state using its two-letter code (e.g. "NY", "CA", "NSW"). Only valid for supported countries — requires premiumProxy: true.⚠️ Consumes 60 credits per request. |
| waitForNetworkRequests | boolean | false | Wait for most AJAX/XHR requests to complete before returning the HTML. Useful for pages that load prices or content asynchronously. Can slow down or fail if some requests never finish — only use when necessary. ⚠️ Only works when useChrome is true. |
| headers | object | null | Add custom HTTP headers to the request (e.g. Accept-Language, Referer). Contact support before using with premiumProxy — custom headers must be validated by our team first. |
| body | object | null | Send a POST request to the target URL using this object as the request body. Only works when both premiumProxy and useChrome are false. |
| Options combination | Credits / request | Notes |
|---|---|---|
| Standard | 1 | Default mode. |
| useChrome: true | 10 | Headless Chrome rendering. |
| premiumProxy: true | 10 | Residential proxy. |
| useChrome + premiumProxy | 20 | Chrome + residential proxy. |
| proxyCountry (with premiumProxy) | 25 | Country-targeted residential proxy. |
| proxyState (with premiumProxy) | 60 | State-targeted residential proxy. |
Avoid using proxyCountry unless strictly necessary — it restricts the available IP pool and can lower success rates. Only use it when the target site returns different content or blocks access based on IP location.
proxyCountry valuesThese country codes are available when not using premiumProxy. Pass the code directly as a string, e.g. "FR".
proxyCountry valuesWhen using premiumProxy: true, you have access to a larger pool covering most ISO 3166-1 countries. Pass the two-letter code, e.g. proxyCountry: "US".
Hover a code to see the country name.
const username = "yourUsername";
const apiKey = "yourApiKey";
const url = "https://www.scraping-bot.io/rawHtmlPage.html";
const auth = "Basic " + Buffer.from(`${username}:${apiKey}`).toString("base64");
async function scrape() {
const response = await fetch("http://api.scraping-bot.io/scrape/raw-html", {
method: "POST",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: auth,
},
body: JSON.stringify({
url,
options: {
useChrome: false, // set to true if you want to use headless chrome for javascript rendering
premiumProxy: true, // set to false to use standard proxies instead of premium proxies (Unblock Amazon, Google, Rakuten...)
proxyCountry: null, // allows you to choose a country proxy (example: proxyCountry: "FR")
waitForNetworkRequests: false, // wait for most ajax requests to finish until returning the Html content (this option can only be used if useChrome is set to true),
// this can slowdown or fail your scraping if some requests are never ending only use if really needed to get some price loaded asynchronously for example
},
}),
});
// the Raw HTML endpoint returns the page's HTML as plain text, not JSON
const html = await response.text();
console.log(html);
}
scrape();