Page Speed Test
Test a page with Google PageSpeed Insights. Returns the performance score, Core Web Vitals and what to fix first.
page-speed-test Example
{
"url": "https://google.com"
} {
"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
| Field | Type | Required | What it is |
|---|---|---|---|
url | string | Yes | — |
strategy | string | No | mobile or desktop (default: mobile) |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
grade | string | Always (present in every successful answer) |
metrics | object | Always (present in every successful answer) |
opportunities | array | Always (present in every successful answer) |
performance_score | number | Always (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
}' {
"tool": "strale_execute",
"arguments": {
"slug": "page-speed-test",
"inputs": {
"url": "https://google.com"
},
"max_price_cents": 5
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "page-speed-test",
inputs: {
"url": "https://google.com"
},
max_price_cents: 5,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="page-speed-test",
inputs={
"url": "https://google.com",
},
max_price_cents=5,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/page-speed-test?url=https%3A%2F%2Fgoogle.com' 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
- Website Health Check €0.40
- Page SEO Check €0.30
Related tools
- Backlink Check €0.15
- Cookie Scan €0.15
- Domain Age Check €0.03
- Keyword Rank Check €0.15
- Website Carbon Estimate €0.05