PerfDelta Scans API
Start scans and poll their status.
Start scans and poll their status.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/perfdelta:perfdelta-scans-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: PerfDelta REST Scans API
version: 1.0.0
summary: PageSpeed and Core Web Vitals scans, reports, projects and performance budgets.
description: 'Start PageSpeed scans, read real-user Core Web Vitals (Chrome UX Report) and Lighthouse lab data, prioritised fixes, history, projects, competitors and performance budgets.
Authentication: `Authorization: Bearer `. Create keys at https://perfdelta.com/api-keys. A free account can call the read endpoints and start one scan every 24 hours (30 requests per minute); paid plans get 60 requests per minute and a monthly PageSpeed test budget. Scans cost one test per URL and device, all other calls are free of charge.
Responses are JSON (`application/json; charset=utf-8`). Errors are flat objects with an `error` code and usually a `message`. There is no pagination. The same functions are available to AI agents through the MCP server at https://perfdelta.com/api/mcp.php.
Human-readable reference: https://perfdelta.com/api-docs'
termsOfService: https://perfdelta.com/terms
contact:
name: PerfDelta
url: https://perfdelta.com/contact
email: info@perfdelta.com
x-logo:
url: https://perfdelta.com/assets/img/apple-touch-icon.png
servers:
- url: https://perfdelta.com/api/v1
security:
- bearerAuth: []
tags:
- name: Scans
description: Start scans and poll their status.
paths:
/scans.php:
get:
operationId: getScan
tags:
- Scans
summary: Status and results of a scan
description: Poll every 15 to 30 seconds until status is done or error. Only the account that started the scan can read it. Free of charge.
parameters:
- name: id
in: query
required: true
description: scan_id returned by POST /scans.php.
schema:
type: string
pattern: ^[0-9a-fA-F-]{32,36}$
responses:
'200':
description: Scan status; results once status is done.
content:
application/json:
schema:
$ref: '#/components/schemas/ScanStatus'
'404':
$ref: '#/components/responses/NotFound'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/TooManyRequests'
'503':
$ref: '#/components/responses/Unavailable'
post:
operationId: startScan
tags:
- Scans
summary: Start a scan
description: 'Costs one PageSpeed test per measured URL and device from the monthly budget. Free accounts: one scan per rolling 24 hours, a single URL, region auto only; the same URL within the window returns the existing scan with status 200 and reused true.'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
url:
type: string
format: uri
description: Public http(s) URL. Takes precedence over url_id.
url_id:
type: integer
description: URL of one of your projects.
devices:
type: string
enum:
- both
- mobile
- desktop
default: both
project_id:
type: integer
description: Adds the URL to this project (paid plans).
scope:
type: string
enum:
- url
- group
default: url
region:
type: string
enum:
- auto
- us-east
- us-west
- eu
- asia
description: Lab region; free accounts only auto.
responses:
'200':
description: 'Free account: existing scan of the same URL reused (reused true, cost 0).'
content:
application/json:
schema:
$ref: '#/components/schemas/ScanStarted'
'202':
description: Scan started.
content:
application/json:
schema:
$ref: '#/components/schemas/ScanStarted'
'402':
description: budget_exhausted or daily_limit, with needed, remaining, limit and upgrade_url.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
'500':
description: scan_failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/TooManyRequests'
'503':
$ref: '#/components/responses/Unavailable'
components:
schemas:
ScanStatus:
type: object
properties:
scan_id:
type: string
status:
type: string
enum:
- running
- done
- error
started_at:
type: string
report_url:
type: string
step:
type: integer
step_total:
type: integer
step_msg:
type: string
updated_at:
type: string
error:
type: string
mobile_score:
anyOf:
- type: integer
- type: 'null'
desktop_score:
anyOf:
- type: integer
- type: 'null'
measured_at:
type: string
pages:
type: array
items:
$ref: '#/components/schemas/ScanPage'
required:
- scan_id
- status
ScanPage:
type: object
properties:
url:
anyOf:
- type: string
- type: 'null'
device:
type: string
score:
anyOf:
- type: integer
- type: 'null'
lab:
anyOf:
- type: object
properties:
lcp_ms:
anyOf:
- type: number
- type: 'null'
cls:
anyOf:
- type: number
- type: 'null'
fcp_ms:
anyOf:
- type: number
- type: 'null'
tbt_ms:
anyOf:
- type: number
- type: 'null'
ttfb_ms:
anyOf:
- type: number
- type: 'null'
- type: 'null'
field:
anyOf:
- type: object
properties:
lcp_ms:
anyOf:
- type: number
- type: 'null'
inp_ms:
anyOf:
- type: number
- type: 'null'
cls:
anyOf:
- type: number
- type: 'null'
fcp_ms:
anyOf:
- type: number
- type: 'null'
ttfb_ms:
anyOf:
- type: number
- type: 'null'
- type: 'null'
engine:
anyOf:
- type: string
- type: 'null'
region:
anyOf:
- type: string
- type: 'null'
fallback_level:
anyOf:
- type: integer
- type: 'null'
Quota:
type: object
properties:
type:
type: string
enum:
- rolling
scans_used:
type: integer
scans_limit:
type: integer
scans_remaining:
type: integer
window_hours:
type: integer
next_scan_at:
anyOf:
- type: string
format: date-time
- type: 'null'
Attribution:
type: object
properties:
text:
type: string
url:
type: string
BudgetWarning:
anyOf:
- type: object
properties:
used_pct:
type: integer
upgrade_plan:
anyOf:
- type: string
- type: 'null'
upgrade_url:
type: string
- type: 'null'
Meta:
type: object
properties:
upgrade:
type: object
properties:
reason:
type: string
required_plan:
type: string
unlocks:
type: string
url:
type: string
Error:
type: object
description: 'Errors are flat: a code, usually a message, and further detail fields on the same level.'
properties:
error:
type: string
message:
type: string
required_plan:
type: string
upgrade_url:
type: string
retry_after:
type: integer
next_scan_at:
anyOf:
- type: string
- type: 'null'
_meta:
$ref: '#/components/schemas/Meta'
required:
- error
additionalProperties: true
ScanStarted:
type: object
properties:
scan_id:
type: string
status:
type: string
enum:
- running
- done
- error
reused:
type: boolean
devices:
type: string
scope:
type: string
measured_urls:
type: integer
cost:
type: integer
report_url:
type: string
budget_remaining:
anyOf:
- type: integer
- type: 'null'
budget_warning:
$ref: '#/components/schemas/BudgetWarning'
daily_remaining:
type: integer
project_id:
anyOf:
- type: integer
- type: 'null'
url_id:
anyOf:
- type: integer
- type: 'null'
added_to_project:
type: boolean
quota:
$ref: '#/components/schemas/Quota'
attribution:
$ref: '#/components/schemas/Attribution'
required:
- scan_id
- status
responses:
TooManyRequests:
description: 'rate_limited (Retry-After: 60), too_many_failed_attempts, quota_exhausted (free scan window, with next_scan_at) or throttled.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Forbidden:
description: email_unverified, plan_required (with required_plan and _meta.upgrade), token_scope or a plan limit such as url_limit_reached, competitor_limit, project_limit.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
description: Unknown or not readable id (not_found, unknown_project_id, unknown_url_id, url_not_found, ...).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
ValidationError:
description: Invalid input (missing_url, invalid_url, invalid_devices, invalid_region, invalid_metric, ...).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: 'Missing or invalid API key (error unauthorized). Header WWW-Authenticate: Bearer.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unavailable:
description: API temporarily disabled or no measuring capacity (disabled, busy, capacity_exhausted, free_capacity_exhausted).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: PerfDelta API key, e.g. pdk_live_...
externalDocs:
description: API documentation
url: https://perfdelta.com/api-docs