Skip to main content

Quick Start

Overview

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...

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 apiKey: string (required)

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://app.scraperlix.com/api/scraper',
params: {
apiKey: '<exampleToken>',
},
};

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

Target URL url: string (required)

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://app.scraperlix.com/api/scraper',
params: {
url: 'https://example.com/',
},
};

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

Render render: string

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://app.scraperlix.com/api/scraper',
params: {
render: 'true',
},
};

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