Skip to main content

Proxies

If you want to have more control of where and which proxy is being used for your scraping requests, its very simple. To specify where the proxies are coming from and which type of proxies are being used you can use the proxy_type and proxy_country query parameters to do exactly that!

Proxy type

The proxy_type query parameter is very simple, based on the proxy_type's available in our database, you can use any of the proxy_type. But keep in mind that different proxy_types cost different amount of credits.

This is an optional parameter which is not required. Here is an demo:

const axios = require('axios').default;

const options = {
method: 'GET',
url: 'https://api.scrapeautomate.com/scraper',
params: {
apiKey: '<exampleToken>',
render: 'false',
url: 'https://example.com/',
proxy_type: 'residential'
},
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

By doing this, it made it so that residential proxies are used as the proxy and it will take an residential proxy from any country.

Proxy country

The proxy_country property is used to specify the geographical location of the proxy, for example where the proxy should come from. This can be used along with the proxy_type but it can also be used by it self if you don't mind using a random type of proxy. Here is a demo:

const axios = require('axios').default;

const options = {
method: 'GET',
url: 'https://api.scrapeautomate.com/scraper',
params: {
apiKey: '<exampleToken>',
render: 'false',
url: 'https://example.com/',
proxy_country: 'US'
},
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

The proxy_country comes from the database, if for some reason the proxy_country doesn't exist inside the database you will get an error saying that proxy doesn't exist.