Web Scraping code templates
Actor templates help you quickly set up your web scraping projects, saving you development time and giving you immediate access to all the features the Apify platform has to offer.
Scrape single page with provided URL with Axios and extract data from page's HTML with Cheerio.
StarterA scraper example that uses Cheerio to parse HTML. It's fast, but it can't run the website's JavaScript or pass JS anti-scraping challenges.
Example of a Puppeteer and headless Chrome web scraper. Headless browsers render JavaScript and are harder to block, but they're slower than plain HTTP.
Web scraper example with Crawlee, Playwright and headless Chrome. Playwright is more modern, user-friendly and harder to block than Puppeteer.
Example of using the Playwright Test project to run automated website tests in the cloud and display their results. Usable as an API.
Empty template with basic structure for the Actor with Apify SDK that allows you to easily add your own functionality.
Template with basic structure for an Actor using Standby mode that allows you to easily add your own functionality.
StarterScrape single page with provided URL with Axios and extract data from page's HTML with Cheerio.
StarterScrape single page with provided URL with Axios and extract data from page's HTML with Cheerio.
StarterA scraper example that uses Cheerio to parse HTML. It's fast, but it can't run the website's JavaScript or pass JS anti-scraping challenges.
Example of a Puppeteer and headless Chrome web scraper. Headless browsers render JavaScript and are harder to block, but they're slower than plain HTTP.
Web scraper example with Crawlee, Playwright and headless Chrome. Playwright is more modern, user-friendly and harder to block than Puppeteer.
Skeleton project that helps you quickly bootstrap `CheerioCrawler` in JavaScript. It's best for developers who already know Apify SDK and Crawlee.
Example of running Cypress tests and saving their results on the Apify platform. JSON results are saved to Dataset, videos to Key-value store.
Empty template with basic structure for the Actor with Apify SDK that allows you to easily add your own functionality.
Template with basic structure for an Actor using Standby mode that allows you to easily add your own functionality.
StarterExample of how to use LangChain.js with Apify to crawl the web data, vectorize them, and prompt the OpenAI model.
This example Scrapy spider scrapes page titles from URLs defined in input parameter. It shows how to use Apify SDK for Python and Scrapy pipelines to save results.
Scrape single page with provided URL with HTTPX and extract data from page's HTML with Beautiful Soup.
StarterExample of a web scraper that uses Python HTTPX to scrape HTML from URLs provided on input, parses it using BeautifulSoup and saves results to storage.
Crawler example that uses headless Chrome driven by Playwright to scrape a website. Headless browsers render JavaScript and can help when getting blocked.
Scraper example built with Selenium and headless Chrome browser to scrape a website and save the results to storage. A popular alternative to Playwright.
Empty template with basic structure for the Actor with Apify SDK that allows you to easily add your own functionality.
Template with basic structure for an Actor using Standby mode that allows you to easily add your own functionality.
StarterApify Universal Scrapers
Universal Scrapers provide you with a solid boilerplate to build fully functioning scrapers directly on the Apify platform. Configure and run your web scrapers manually in a user interface or programmatically via an API.
![Cheerio Scraper avatar](https://images.apifyusercontent.com/7zQj15OJiqLHWgsBw-9FAiMnhZJSg_8olqCDW1b58C8/rs:fill:76:76/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9ZclF1RWtvd2tOQ0xkazRqMi9Ldm1mR3lXTFBaNzZ1OW1ueS1DaGVlcmlvMTAwcHgucG5n.webp)
Cheerio Scraper
apify/cheerio-scraper
Crawls websites using raw HTTP requests, parses the HTML with the Cheerio library, and extracts data from the pages using a Node.js code. Supports both recursive crawling and lists of URLs. This actor is a high-performance alternative to apify/web-scraper for websites that do not require JavaScript.
5.1k
75
![Web Scraper avatar](https://images.apifyusercontent.com/J6UV1Nvv0A5RpAIUBaSPN_eBye_lDVpBYyoTg5Jl03I/rs:fill:76:76/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9tb0pSTFJjODVBaXRBcnBOTi9abjh2YldUaWthN2FuQ1FNbi1TRC0wMi0wMi5wbmc.webp)
Web Scraper
apify/web-scraper
Crawls arbitrary websites using the Chrome browser and extracts data from pages using JavaScript code. The Actor supports both recursive crawling and lists of URLs and automatically manages concurrency for maximum performance. This is Apify's basic tool for web crawling and scraping.
68.1k
155
![Puppeteer Scraper avatar](https://images.apifyusercontent.com/kwqswuIESBnGi_BWU38jhNyq1y6fJJk_NzQ82ACHG3o/rs:fill:76:76/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9ZSkNuUzlxb2dpOVh4RGdMQi9YeWd0Snl4RVFpWG4zV2Vwcy1JTUdfNzYzNXNhLTA4LnBuZw.webp)
Puppeteer Scraper
apify/puppeteer-scraper
Crawls websites with the headless Chrome and Puppeteer library using a provided server-side Node.js code. This crawler is an alternative to apify/web-scraper that gives you finer control over the process. Supports both recursive crawling and list of URLs. Supports login to website.
4.1k
47
![Playwright Scraper avatar](https://images.apifyusercontent.com/ebqTD8Rv487sfGzWELPQcawfIhihXvrl9hheJxdeVuk/rs:fill:76:76/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9NcFJibk5tVkFvajVSQzFNYS9oRnp5VHUycDN5elRLUDZyZC1wbGF5d3JpZ2h0LnBuZw.webp)
Playwright Scraper
apify/playwright-scraper
Crawls websites with the headless Chromium, Chrome, or Firefox browser and Playwright library using a provided server-side Node.js code. Supports both recursive crawling and a list of URLs. Supports login to a website.
742
13
![Vanilla JS Scraper avatar](https://images.apifyusercontent.com/wtwYQu3RZ1R8GvU9I-cxuYpLvtpp6tKFTyjYIii37HA/rs:fill:76:76/aHR0cHM6Ly9hcGlmeS1pbWFnZS11cGxvYWRzLXByb2QuczMuYW1hem9uYXdzLmNvbS9VUko3dVVNUThERENNaVVmVy9KZkUydDJIb3ZHa21rbmRFZi1KUy5wbmc.webp)
Vanilla JS Scraper
mstephen190/vanilla-js-scraper
Scrape the web using familiar JavaScript methods! Crawls websites using raw HTTP requests, parses the HTML with the JSDOM package, and extracts data from the pages using Node.js code. Supports both recursive crawling and lists of URLs. This actor is a non jQuery alternative to CheerioScraper.
404
2
BeautifulSoup Scraper
apify/beautifulsoup-scraper
Crawls websites using raw HTTP requests. It parses the HTML with the BeautifulSoup library and extracts data from the pages using Python code. Supports both recursive crawling and lists of URLs. This Actor is a Python alternative to Cheerio Scraper.
695
4