Page Speed Test

Test a page with Google PageSpeed Insights. Returns the performance score, Core Web Vitals and what to fix first.

Pay by wallet (x402) page-speed-test

Example

Input
{
  "url": "https://google.com"
}
Answer
{
  "url": "https://google.com",
  "grade": "C",
  "metrics": {
    "fcp_ms": 2761,
    "lcp_ms": 6692,
    "tbt_ms": 365,
    "ttfb_ms": 8,
    "cls_score": 0.001,
    "speed_index": 2805
  },
  "strategy": "mobile",
  "diagnostics": [
    {
      "title": "Reduce unused CSS",
      "description": "Reduce unused rules from stylesheets and defer CSS not used for above-the-fold content to decrease bytes consumed by network activity. [Learn how to reduce unused CSS](https://developer.chrome.com/docs/lighthouse/performance/unused-css-rules/).",
      "displayValue": "Est savings of 10 KiB"
    },
    {
      "title": "Reduce unused JavaScript",
      "description": "Reduce unused JavaScript and defer loading scripts until they are required to decrease bytes consumed by network activity. [Learn how to reduce unused JavaScript](https://developer.chrome.com/docs/lighthouse/performance/unused-javascript/).",
      "displayValue": "Est savings of 296 KiB"
    }
  ],
  "opportunities": [
    {
      "title": "Reduce unused JavaScript",
      "savings_ms": 1350,
      "description": "Reduce unused JavaScript and defer loading scripts until they are required to decrease bytes consumed by network activity. [Learn how to reduce unused JavaScript](https://developer.chrome.com/docs/lighthouse/performance/unused-javascript/)."
    },
    {
      "title": "Avoid multiple page redirects",
      "savings_ms": 780,
      "description": "Redirects introduce additional delays before the page can be loaded. [Learn how to avoid page redirects](https://developer.chrome.com/docs/lighthouse/performance/redirects/)."
    }
  ],
  "performance_score": 64
}

Inputs

FieldTypeRequiredWhat it is
urlstringYes—
strategystringNomobile or desktop (default: mobile)

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
gradestringAlways (present in every successful answer)
metricsobjectAlways (present in every successful answer)
opportunitiesarrayAlways (present in every successful answer)
performance_scorenumberAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "page-speed-test",
    "inputs": {
      "url": "https://google.com"
    },
    "max_price_cents": 5
  }'

Limitations

  • Performance scores can vary throughout the day

    Scores reflect a point-in-time test — site performance may vary throughout the day

    What to do instead: Schedule periodic tests (e.g., every 6 hours) and track the trend rather than relying on a single measurement

  • One location may not reflect every user’s experience

    Results measured from a single geographic location — actual user experience varies by region

    What to do instead: Run tests at multiple times and average the scores, or use the lab data breakdown to identify bottlenecks independent of location

  • Pages Lighthouse cannot load are refused, not scored

    If Lighthouse cannot load the page because it is unavailable, blocks automated visitors, requires authentication or redirects in a loop, the call is refused. No score is returned and no charge is taken.

    What to do instead: Check the URL loads in a browser from a clean session, and that it is reachable without a login

Bundled checks that include it

Related tools