PhantomJS integration module for NodeJS
dependabot[bot] and amir20 Bump flow-bin from 0.85.0 to 0.86.0 (#779)
Bumps [flow-bin]( from 0.85.0 to 0.86.0.
- [Release notes](
- [Commits](flowtype/flow-bin@v0.85.0...v0.86.0)

Signed-off-by: dependabot[bot] <>
Latest commit f7308d0 Nov 13, 2018

phantom - Fast NodeJS API for PhantomJS


NPM Version NPM Downloads Linux Build Code Coverage Dependencies 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');

  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.


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 phantom@3 --save

Versions older than 5.x, install with

$ npm install phantom@2 --save



Creating new phantom instances with phantom.create() 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