Scan a URL (uses budget)
scan_urlStart a PageSpeed/Core Web Vitals scan for a URL. Costs one PageSpeed test per measured URL and device from your monthly budget, shared with monitoring, the web app and the REST API (devices=both counts two per URL). Measures only the given URL by default (scope=url). For a URL from one of your projects, scope=group measures it together with all sibling URLs of its project group like the scan button on the project page, which costs one test per sibling URL and device; only group scans appear in the project history. Project competitors are compared via field data at no cost. Pass project_id to add a new URL to a project so the report appears in your dashboard. Returns scan_id and cost; poll get_scan with the scan_id, then read the full report with get_report_details. From 80 percent of the monthly budget the result carries budget_warning (used_pct, upgrade_plan, upgrade_url), otherwise budget_warning is null; tell the user, because further scans fail with budget_exhausted once the budget is used up. The budget_exhausted error also carries upgrade_url. Free plan: 1 scan per rolling 24 hours, one URL per scan; if the same URL was measured within the last hour, the existing scan is returned with reused=true without using quota. Read tools such as get_report are not limited.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "scan_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute URL to scan | |
| scope | No | url (default): measure only this URL. group: measure all URLs of its project group, cost = sibling URLs x devices. | |
| region | No | Optional measurement location for the lab test: auto (default: the project setting, otherwise derived from the domain) or us-east, us-west, eu, asia. Paid plans only; on the free plan any value other than auto fails with region_not_available. A different region starts a separate measurement series, so scores are only compared within the same region. | |
| devices | No | both (default), mobile or desktop | |
| project_id | No | Optional. Add the URL to this project first (counts against your URL limit), so the scan shows up in your dashboard and project history. Ignored if the URL is already in one of your projects. |