Pagespeed Insights Webpage Analyzer avatar
Pagespeed Insights Webpage Analyzer
Try for free

Pay $1.00 for 1,000 URLS

View all Actors
Pagespeed Insights Webpage Analyzer

Pagespeed Insights Webpage Analyzer

baldasseva/pagespeed-insights-webpage-analyzer
Try for free

Pay $1.00 for 1,000 URLS

Get Lighthouse Web Audits and Chrome User Experience Reports for a list of urls or for your whole website. Get a detailed report or aggregated results to monitor performance, accessibility, SEO and more. Schedule the analysis to keep track of the state of your website over time.

This Actor analyses the performance of a list of webpages by using the Pagespeed Insights API. Pagespeed Insights aggregates results from Chrome User Experience Report and Lighthouse.

  • The Chrome User Experience Report is collected from real browsers around the world, based on certain browser options which determine user eligibility. A set of dimensions and metrics are collected which allow site owners to determine how users experience their sites.
  • Lighthouse is an open-source, automated tool for improving the quality of web pages. You can run it against any web page, public or requiring authentication. It has audits for performance, accessibility, progressive web apps, SEO, and more.

Why use this Actor?

You can use Pagespeed Insights through their official website. However, with this Actor you can run parallel multi-page analysis programmatically and efficiently. The output of the run will also include an aggregation of all the scores of the pages that were analyzed.

Input

Fields

FieldsRequiredDescription
URLsA list of URLs. All of them will be tested and analyzed.
Analyze the whole site from a sitemapFalse by default. If true, the first URL from the first input will be used as a base to generate a sitemap. All of the links found in that sitemap will be then analyzed by Pagespeed.
Filter URLsA series of regular expressions that can filter the URLs that will be added to the queue and analyzed. It is recommended when analyzing a website from the sitemap.
Max Requests per CrawlIntroduce a limit to avoid crawls that are too long. It is recommended when analyzing a website from the sitemap.

Lighthouse testing configuration

These options affect only the Lighthouse analysis. Enabling every option can create very long outputs. Consider which testing categories you're interested in and if you need a detailed report.

FieldsRequiredDescription
Testing categoriesAccessibility, Best Practices, Performance, Progressive Web App, Search Engine Optimization
DeviceMobile or Desktop
Create detailed reportFalse by default. If true, the output will include the complete report, which includes website screenshots and long text.

Example

1{
2    "categories": ["best-practices", "performance", "accessibility"],
3    "createSitemap": false,
4    "detailedReport": false,
5    "globs": [
6        {
7            "glob": "(https://apify.com/)(?!.+/.+/api/.+)"
8        }
9    ],
10    "maxRequestsPerCrawl": 1000,
11    "strategy": "mobile",
12    "urls": [
13        {
14            "url": "https://apify.com/"
15        },
16        {
17            "url": "https://apify.com/store"
18        },
19        {
20            "url": "https://apify.com/apify/web-scraper"
21        }
22    ]
23}

Output

The output is the list of reports for each page of your queue. The format follows the format arriving from the Pagespeed Insights API.

Example

1[
2  {
3    "url": "https://apify.com/store",
4    "crux_loading_experience": {
5        "id": "https://apify.com/store",
6        "metrics": { ... },
7        "overall_category": "AVERAGE",
8        "initial_url": "https://apify.com/store"
9    },
10    "crux_origin_loading_experience": {
11        "id": "https://apify.com",
12        "metrics": { ... },
13        "overall_category": "AVERAGE",
14        "initial_url": "https://apify.com/store"
15    },
16    "lighthouse_result": {
17        "requestedUrl": "https://apify.com/store",
18        "finalUrl": "https://apify.com/store",
19        "mainDocumentUrl": "https://apify.com/store",
20        "finalDisplayedUrl": "https://apify.com/store",
21        "lighthouseVersion": "12.0.0",
22        ...
23        "categories": {
24            "performance": {
25                "id": "performance",
26                "title": "Performance",
27                "score": 0.4,
28                "auditRefs": [ ... ]
29            },
30            "accessibility": {
31                "id": "accessibility",
32                "title": "Accessibility",
33                "score": 0.87,
34                "auditRefs": [ ... ]
35            },
36            "best-practices": {
37                "id": "best-practices",
38                "title": "Best Practices",
39                "score": 0.75,
40                "auditRefs": [ ... ]
41            }
42        }
43    }
44  },
45  {
46    "url": "https://apify.com/",
47    "crux_loading_experience": { ... },
48    "crux_origin_loading_experience": { ... },
49    "lighthouse_result": { ... }
50  },
51  ...
52]

Aggregated results

The Actor also aggregates the Lighthouse results in a Key-Value Store, named OUTPUT. The OUTPUT file contains some statistics about the Actor run, the mean of the scores of all the pages and a list of pages that got a failing response from the Pagespeed Insights API.

Example

1{
2    "requestsFinished": 10,
3    "requestsFailed": 0,
4    "retryHistogram": [10],
5    "requestAvgFailedDurationMillis": null,
6    "requestAvgFinishedDurationMillis": 32371,
7    "requestsFinishedPerMinute": 6,
8    "requestsFailedPerMinute": 0,
9    "requestTotalDurationMillis": 323709,
10    "requestsTotal": 10,
11    "crawlerRuntimeMillis": 105077,
12    "lighthouseResults": {
13        "configSettings": {
14            "formFactor": "mobile",
15            "locale": "en-US",
16            "onlyCategories": ["best-practices", "performance", "accessibility"]
17        },
18        "scores": {
19            "best-practices": 0.77,
20            "performance": 0.41,
21            "accessibility": 0.89
22        },
23        "failedPages": []
24    }
25}
Developer
Maintained by Community
Actor metrics
  • 4 monthly users
  • 2 stars
  • 97.0% runs succeeded
  • Created in Mar 2024
  • Modified about 1 month ago