Page Performance
Google PageSpeed Insights scores and Core Web Vitals for any public URL, on a mobile or desktop profile.
/v1/page-performance3 credits (charged only on success)API keyRuns Google PageSpeed Insights (Lighthouse) against a URL and returns the performance, accessibility and SEO category scores plus the Core Web Vitals metrics. Use it to benchmark a page, track a deploy, or compare competitors. Results come from Google, are cached for 24 hours, and are limited by daily quotas described below.
Request
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | none | Full http:// or https:// URL. Must be public and must not contain a fragment (#). See Page SEO for the URL rules. |
strategy | string | No | mobile | mobile or desktop. Any other value is treated as mobile without an error. |
Example
curl "https://api.rankparse.com/v1/page-performance?url=https://stripe.com&strategy=desktop" \
-H "X-API-Key: rp_your_key"import requests
resp = requests.get(
"https://api.rankparse.com/v1/page-performance",
params={"url": "https://stripe.com", "strategy": "desktop"},
headers={"X-API-Key": "rp_your_key"},
timeout=90,
)
if resp.status_code == 429:
print("Quota hit:", resp.json()["code"])
else:
resp.raise_for_status()
perf = resp.json()["data"]
print(perf["performance_score"], perf["core_web_vitals"]["lcp_ms"])const res = await fetch(
"https://api.rankparse.com/v1/page-performance?" +
new URLSearchParams({ url: "https://stripe.com", strategy: "desktop" }),
{ headers: { "X-API-Key": process.env.RANKPARSE_API_KEY } }
);
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const { data } = await res.json();
console.log(data.performance_score, data.core_web_vitals.lcp_ms);A fresh PageSpeed run can take several seconds because Google loads the page in a real browser. Use a generous client timeout (60 seconds or more).
Response
{
"url": "https://stripe.com",
"data": {
"url": "https://stripe.com",
"performance_score": 87,
"accessibility_score": 94,
"seo_score": 100,
"core_web_vitals": {
"lcp_ms": 1834.5,
"cls": 0.02,
"inp_ms": null,
"fcp_ms": 912,
"ttfb_ms": 148
},
"crux_data": true,
"strategy": "desktop",
"cached_at": "2026-10-11T09:42:17.318Z"
},
"credits_used": 3,
"credits_remaining": 997
}Response fields
| Field | Type | Description |
|---|---|---|
performance_score | integer | Lighthouse performance category score, 0 to 100. |
accessibility_score | integer | Lighthouse accessibility score, 0 to 100. |
seo_score | integer | Lighthouse SEO score, 0 to 100. A category Google did not return is reported as 0. |
core_web_vitals.lcp_ms | number or null | Largest Contentful Paint, milliseconds. |
core_web_vitals.cls | number or null | Cumulative Layout Shift (unitless). |
core_web_vitals.inp_ms | number or null | Interaction to Next Paint, milliseconds. Frequently null in lab runs. |
core_web_vitals.fcp_ms | number or null | First Contentful Paint, milliseconds. |
core_web_vitals.ttfb_ms | number or null | Server response time, milliseconds. |
crux_data | boolean | true when Google holds real-user (Chrome UX Report) field data for the URL. See Lab vs field data. |
strategy | string | The profile that was measured: mobile or desktop. |
cached_at | string | ISO 8601 time the PageSpeed result was produced. For a cache hit this is when it was first fetched, up to 24 hours ago. |
Behavior and limits
Lab vs field data
Scores and the core_web_vitals metrics are lab data: Lighthouse measurements from a single simulated load. They are repeatable for diagnosis but differ from what real visitors experience. The crux_data flag only tells you whether Google also has field data (Chrome UX Report, real-user measurements) for this URL; the field values themselves are not included in this response.
Caching
- Successful results are cached for 24 hours, keyed by exact
urlplusstrategy, and the cache is shared across all RankParse users. A trailing slash or a different query string is a different URL. - A cache hit is returned immediately and does not use Google's quota, but it is billed and counts toward your daily cap like any other call.
Billing
- Costs 3 credits, charged only after a successful result. Quota errors (
quota_exceeded,user_quota_exceeded) andpsi_unavailablenever charge you. URLs that fail validation are rejected before any work is done. - The credit check happens after the PageSpeed run. If your balance is too low you receive
402 insufficient_credits, but that attempt has already counted toward your daily cap. Check your balance first with/v1/creditsif you are close to zero.
Quotas
| Cap | Limit | Scope | Resets |
|---|---|---|---|
| Per person | 50 calls per day | The person behind the API key, not the workspace or the key. Cache hits and failed PageSpeed calls count too. | 00:00 UTC |
| Service-wide | 25,000 uncached PageSpeed attempts per day | All RankParse customers and the free tools together. Cache hits do not count. | 00:00 UTC |
When the service-wide cap is hit, the 429 body includes retry_after: seconds until the next UTC midnight.
Subject to the standard 60 requests per minute limit as well. See Rate limiting.
Errors
| Status | Code | When |
|---|---|---|
400 | invalid_url | Missing, malformed or non-http(s) URL; credentials, whitespace or a fragment in the URL. |
400 | private_ip | Host is private, reserved or local. |
401 | invalid_api_key | Missing, invalid or revoked key. |
402 | insufficient_credits | Balance below 3 credits. |
402 | spend_cap_reached | Monthly spend cap reached. |
429 | rate_limited | More than 60 requests per minute. |
429 | user_quota_exceeded | You made 50 page-performance calls today. Message: Maximum 50 page-performance calls per day reached. |
429 | quota_exceeded | The service-wide daily PageSpeed quota is exhausted. Includes retry_after (seconds). |
503 | psi_unavailable | Google PageSpeed Insights returned an error or could not be reached. Retry later; you were not charged. |
Example quota error:
{
"error": "Too Many Requests",
"code": "quota_exceeded",
"message": "Daily PageSpeed quota reached. Try again tomorrow.",
"retry_after": 41230
}See Errors for the shared error format.
Related
MCP tool: get_page_performance (arguments url and optional strategy).