Skip to main content

Overview

Query Parameters

PARAMETERTYPEDEFAULTDESCRIPTION
apiKeystringGet your free api key
urlstringThe URL you want to scrape
renderbooleanfalseRender the JavaScript on the page with a headless browser.
config.window_widthnumber1920Set the width of the browser
config.window_heightnumber1080Set the height of the browser
screenshotbooleanfalseThis parameter is used to take a screenshot of the visible area once the API processing is complete
screenshot_full_pagebooleanfalseThis parameter is used to take a screenshot of the entire website when the API processing is complete
instructionsobject[]Give instructions to scrape automate, to do stuff such as clicking, waiting, fillup input fields etc...
proxy_typestringSelect the proxy type for better anonymity, performance and speed
proxy_countrystringSelect the geographical location of your proxy, which country should the proxy come from.
workflow_idstringThis parameter is used to reuse configurations using api workflow!
webhook_urlstringThis parameter is used for setting a webhook where the response will be sent to.

Getting Started

To start using our api, you need 2 required parameters. First is the apiKey, you can get the apiKey after setting up your account. The other required parameter is the url parameter, this is the website you want to scrape.

API key

All the requests you make are authorized by using apiKey, this parameter is required to allow access to our API. You can get your apikey after creating an account on ScrapeAutomate.


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

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

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

Target URL

The URL is the page you want to scrape. It needs to be encoded. Some HTTP clients will do that automatically for you.


const axios = require('axios').default;
const options = {
method: 'GET',
url: 'https://api.scrapeautomate.com/scraper',
params: {
url: 'https://example.com/',
},
};

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

Render

The render parameter is to enable javascript rendering and opening a browser so you can scrape. Render can be either true or false. Enabling render allows you to do many other things such as wait for a selector, take screenshots, give javascript instructions to the scraper, and more! Enabling render cost more credits than having it disabled.


const axios = require('axios').default;
const options = {
method: 'GET',
url: 'https://api.scrapeautomate.com/scraper',
params: {
render: 'true',
},
};

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

Full Process