Skip to main content

Output Types

Plain HTML

By default, the scraper API returns plain HTML without requiring any additional parameters. This does not require javascript rendering to be enabled! Here are some examples:

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

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

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

Screenshot

Full Page Screenshot

To capture a full-page screenshot, set the screenshot_full_page parameter to true. This captures the entire length of the web page. This requires for render to be enabled!

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

const options = {
method: 'GET',
url: 'https://app.scraperlix.com/api/scraper',
params: {
apiKey: '<exampleToken>',
render: 'true',
url: 'https://example.com/',
screenshot_full_page: 'true',
},
};

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

Viewport Screenshot

To capture a screenshot of the current viewport or how much the current user can see, set the screenshot parameter to true. This captures only the visible part of the web page within the viewport. This requires for render to be enabled!

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

const options = {
method: 'GET',
url: 'https://app.scraperlix.com/api/scraper',
params: {
apiKey: '<exampleToken>',
render: 'true',
url: 'https://example.com/',
screenshot: 'true',
},
};

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