Skip to content
Use PageSpeed Insights locally
Branch: master
Clone or download
Latest commit 352c3ef Aug 30, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Aug 30, 2017
LICENSE Initial commit Aug 30, 2017 ✔️ Aug 30, 2017
index.js ✔️ Aug 30, 2017
package.json ✔️ Aug 30, 2017


Use PageSpeed Insights locally!


  • npm install psi-local --save-dev
  • run your application locally (e.g. http://localhost:3000)
  • create .js file and require module:
      const psi = require('psi-local');
        .then(data => {
          // do something with results ...
  • run node <your-file>.js


Module contains the only function and returns Promise for more the best usability. You can easily use ES2017 syntax for working with psi-local as this promise is never rejected. If some errors occur, it will return object { err: Error }

  (async function() {
    const port = 3000;
    const stats = await psi(port);

    if (stats.err) return handleError(stats);
    return handleResults(stats);

MIT License

Fill free to use and contribute

You can’t perform that action at this time.