
Web Scraper Experimental Debug
Pricing
Pay per usage
Go to Store

Web Scraper Experimental Debug
Experimental version of Apify Web Scraper with Chrome debugger integrated
0.0 (0)
Pricing
Pay per usage
3
Total users
63
Monthly users
2
Runs succeeded
>99%
Last modified
4 years ago
You can access the Web Scraper Experimental Debug programmatically from your own applications by using the Apify API. You can also 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.
1import { ApifyClient } from 'apify-client';2
3// Initialize the ApifyClient with your Apify API token4// Replace the '<YOUR_API_TOKEN>' with your token5const client = new ApifyClient({6 token: '<YOUR_API_TOKEN>',7});8
9// Prepare Actor input10const input = {11 "startUrls": [12 {13 "url": "https://apify.com"14 }15 ],16 "pseudoUrls": [17 {18 "purl": "https://apify.com[(/[\\w-]+)?]"19 }20 ],21 "linkSelector": "a",22 "pageFunction": async function pageFunction(context) {23 // See README for context properties. If the syntax is unfamiliar see the link24 // https://javascript.info/destructuring-assignment#object-destructuring25 const { request, log, jQuery } = context;26 27 // To be able to use jQuery as $, one needs save it into a variable28 // and select the inject jQuery option. We've selected it for you.29 const $ = jQuery;30 const title = $('title').text();31 32 // This is yet another new feature of Javascript called template strings.33 // https://javascript.info/string#quotes34 log.info(`URL: ${request.url} TITLE: ${title}`);35 36 // To save data just return an object with the requested properties.37 return {38 url: request.url,39 title40 };41 },42 "proxyConfiguration": {43 "useApifyProxy": false44 },45 "initialCookies": [],46 "waitUntil": [47 "networkidle2"48 ],49 "customData": {}50};51
52// Run the Actor and wait for it to finish53const run = await client.actor("mtrunkat/web-scraper-experimental-dbgr").call(input);54
55// Fetch and print Actor results from the run's dataset (if any)56console.log('Results from dataset');57console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);58const { items } = await client.dataset(run.defaultDatasetId).listItems();59items.forEach((item) => {60 console.dir(item);61});62
63// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs
Web Scraper Experimental Debug API in JavaScript
The Apify API client for JavaScript is the official library that allows you to use Web Scraper Experimental Debug API in JavaScript or TypeScript, providing convenience functions and automatic retries on errors.
Install the apify-client
$npm install apify-client
Other API clients include: