Accept user input
This example accepts and logs user input:
Add data to dataset
This example saves data to the default dataset. If the dataset doesn't exist, it will be created.
Basic crawler
This is the most bare-bones example of the Apify SDK, which demonstrates some of its building blocks such as the
Call actor
This example demonstrates how to start an Apify actor using
Capture a screenshot
To run this example on the Apify Platform, select the apify/actor-node-puppeteer-chrome image for your Dockerfile.
Cheerio crawler
This example demonstrates how to use CheerioCrawler
Crawl all links on a website
This example uses the Apify.enqueueLinks() method to add new links to the RequestQueue as the crawler navigates
Crawl multiple URLs
This example crawls the specified list of URLs.
Crawl a website with relative links
If a website uses relative links, CheerioCrawler and Apify.enqueueLinks() may
Crawl a single URL
This example uses the Apify.utils.requestAsBrowser() function to grab the
Crawl a sitemap
This example downloads and crawls the URLs from a sitemap.
Crawl some links on a website
This CheerioCrawler example uses the pseudoUrls property
Forms
This example demonstrates how to use PuppeteerCrawler
Dataset Map and Reduce methods
This example shows an easy use-case of the Apify dataset
Playwright crawler
This example demonstrates how to use PlaywrightCrawler
Puppeteer crawler
This example demonstrates how to use PuppeteerCrawler
Puppeteer recursive crawl
Run the following example to perform a recursive crawl
Puppeteer with proxy
This example demonstrates how to load pages in headless Chrome / Puppeteer
Synchronous run
This example shows a quick actor that has a run time of just a few seconds.
Use stealth mode
Deprecated: This example is deprecated. Checkout the Avoid getting blocked guide.