
Legacy PhantomJS Crawler
Pricing
Pay per usage

Legacy PhantomJS Crawler
Replacement for the legacy Apify Crawler product with a backward-compatible interface. The actor uses PhantomJS headless browser to recursively crawl websites and extract data from them using a piece of front-end JavaScript code.
5.0 (6)
Pricing
Pay per usage
24
Total users
1.6k
Monthly users
84
Runs succeeded
>99%
Last modified
a year ago
You can access the Legacy PhantomJS Crawler 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.
$echo '{< "startUrls": [< {< "key": "START",< "value": "https://www.example.com/"< }< ],< "crawlPurls": [< {< "key": "MY_LABEL",< "value": "https://www.example.com/[.*]"< }< ],< "clickableElementsSelector": "a:not([rel=nofollow])",< "pageFunction": "function pageFunction(context) {\\n // called on every page the crawler visits, use it to extract data from it\\n var $ = context.jQuery;\\n var result = {\\n title: $('\''title'\'').text(),\\n myValue: $('\''TODO'\'').text()\\n };\\n return result;\\n}\\n",< "interceptRequest": "function interceptRequest(context, newRequest) {\\n // called whenever the crawler finds a link to a new page,\\n // use it to override default behavior\\n return newRequest;\\n}\\n"<}' |<apify call apify/legacy-phantomjs-crawler --silent --output-dataset
Legacy PhantomJS Crawler - Crawl websites, extract data API through CLI
The Apify CLI is the official tool that allows you to use Legacy PhantomJS Crawler locally, providing convenience functions and automatic retries on errors.
Install the Apify CLI
$npm i -g apify-cli$apify login
Other API clients include: