Website Screenshot Generator avatar
Website Screenshot Generator
Try for free

No credit card required

View all Actors
Website Screenshot Generator

Website Screenshot Generator

apify/screenshot-url
Try for free

No credit card required

Create a screenshot of a website based on a specified URL. The screenshot is stored as the output in a key-value store. It can be used to monitor web changes regularly after setting up the scheduler.

The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn mode

Node.js

Python

curl

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with API token
4const client = new ApifyClient({
5    token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10    "urls": [
11        {
12            "url": "https://www.apify.com/"
13        }
14    ],
15    "waitUntil": "load",
16    "delay": 0,
17    "viewportWidth": 1280,
18    "delayAfterScrolling": 2500,
19    "proxy": {
20        "useApifyProxy": true
21    }
22};
23
24(async () => {
25    // Run the Actor and wait for it to finish
26    const run = await client.actor("apify/screenshot-url").call(input);
27
28    // Fetch and print Actor results from the run's dataset (if any)
29    console.log('Results from dataset');
30    const { items } = await client.dataset(run.defaultDatasetId).listItems();
31    items.forEach((item) => {
32        console.dir(item);
33    });
34})();
Developer
Apify logo Maintained by Apify
Actor metrics
  • 81 monthly users
  • 88.5% runs succeeded
  • 16.6 days response time
  • Modified 7 days ago
Categories

You might also like these Actors