Need help with phantomjs-node?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

3.5K Stars 503 Forks ISC License 761 Commits 10 Opened issues


PhantomJS integration module for NodeJS

Services available


Need anything else?

Contributors list


Development on this project has been suspended due to lack of support for PhantomJs.

phantom - Fast NodeJS API for PhantomJS


NPM Version NPM Downloads Linux Build Node Version

Super easy to use

const phantom = require('phantom');

(async function() { const instance = await phantom.create(); const page = await instance.createPage(); await page.on('onResourceRequested', function(requestData) {'Requesting', requestData.url); });

const status = await''); const content = await'content'); console.log(content);

await instance.exit(); })();

Using Node v7.9.0+ you can run the above example with

node file.js

See examples folder for more ways to use this module.

Use it with npx

You can quickly test any website with phantomjs-node without needing to install the package.

$ npx [email protected]

The above command is very useful to test if your website works on older browsers. I frequently use it to ensure polyfills have been installed correctly.

Deprecation warnings of PhantomJs

In March 2018, the owner of PhantomJS announced suspension of development. There hasn't been any updates since. Since phantomjs-node is only a wrapper around phantomjs, then you should use it at your own risk because the underlying dependency is no longer supported. I plan to maintain this project until usage has dropped significantly.


Node v6.x and later

Latest version of phantom does require Node v6.x and later. You can install with

$ npm install phantom --save

Node v5.x

To use version 3.x you need to have at least Node v5+. You can install it using

$ npm install [email protected] --save

Versions older than 5.x, install with

$ npm install [email protected] --save



Creating new phantom instances with

can be slow. If you are frequently creating new instances and destroying them, as a result of HTTP requests for example, it might be worth creating a pool of instances that are re-used.

See the phantom-pool module for more info.


To run the test suite, first install the dependencies, then run

npm test
$ npm install
$ npm test


This package is under development. Pull requests are welcomed. Please make sure tests are added for new functionalities and that your build does pass in TravisCI.


The current lead maintainer is Amir Raminfar

List of all contributors



We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.