Puppeteer Scraper
Try for free
No credit card required
Go to Store
Puppeteer Scraper
apify/puppeteer-scraper
Try for free
No credit card required
You can access the Puppeteer Scraper programmatically from your own applications by using the Apify API. You can choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
1echo '{
2 "startUrls": [
3 {
4 "url": "https://apify.com"
5 }
6 ],
7 "pseudoUrls": [
8 {
9 "purl": "https://apify.com[(/[\\\\w-]+)?]"
10 }
11 ],
12 "linkSelector": "a",
13 "pageFunction": "async function pageFunction(context) {\\n const { page, request, log } = context;\\n const title = await page.title();\\n log.info(`URL: ${request.url} TITLE: ${title}`);\\n return {\\n url: request.url,\\n title\\n };\\n}",
14 "proxyConfiguration": {
15 "useApifyProxy": false
16 },
17 "customData": {},
18 "initialCookies": [],
19 "preGotoFunction": "async function preGotoFunction({ request, page, Apify }) {\\n /* add your pre-navigation logic here, if needed */\\n}"
20}' |
21apify call apify/puppeteer-scraper --silent --output-dataset
Puppeteer Scraper API through CLI
The Apify CLI is the official tool that allows you to use Puppeteer Scraper locally, providing convenience functions and automatic retries on errors.
Install the Apify CLI
1npm i -g apify-cli
2apify login
Other API clients include:
Developer
Maintained by Community
Actor Metrics
2 monthly users
-
1 star
>99% runs succeeded
Created in Apr 2019
Modified 6 years ago