Skip to content
Start here

Speed

ModelsExpand Collapse
LabeledRegion = object { label, value }

A test region with a label.

label: optional string
value: optional "asia-east1" or "asia-northeast1" or "asia-northeast2" or 18 more

A test region.

One of the following:
"asia-east1"
"asia-northeast1"
"asia-northeast2"
"asia-south1"
"asia-southeast1"
"australia-southeast1"
"europe-north1"
"europe-southwest1"
"europe-west1"
"europe-west2"
"europe-west3"
"europe-west4"
"europe-west8"
"europe-west9"
"me-west1"
"southamerica-east1"
"us-central1"
"us-east1"
"us-east4"
"us-south1"
"us-west1"
LighthouseReport = object { cls, deviceType, error, 9 more }

The Lighthouse report.

cls: optional number

Cumulative Layout Shift.

deviceType: optional "DESKTOP" or "MOBILE"

The type of device.

One of the following:
"DESKTOP"
"MOBILE"
error: optional object { code, detail, finalDisplayedUrl }
code: optional "NOT_REACHABLE" or "DNS_FAILURE" or "NOT_HTML" or 2 more

The error code of the Lighthouse result.

One of the following:
"NOT_REACHABLE"
"DNS_FAILURE"
"NOT_HTML"
"LIGHTHOUSE_TIMEOUT"
"UNKNOWN"
detail: optional string

Detailed error message.

finalDisplayedUrl: optional string

The final URL displayed to the user.

fcp: optional number

First Contentful Paint.

jsonReportUrl: optional string

The URL to the full Lighthouse JSON report.

lcp: optional number

Largest Contentful Paint.

performanceScore: optional number

The Lighthouse performance score.

si: optional number

Speed Index.

state: optional "RUNNING" or "COMPLETE" or "FAILED"

The state of the Lighthouse report.

One of the following:
"RUNNING"
"COMPLETE"
"FAILED"
tbt: optional number

Total Blocking Time.

ttfb: optional number

Time To First Byte.

tti: optional number

Time To Interactive.

Trend = object { cls, fcp, lcp, 5 more }
cls: optional array of number

Cumulative Layout Shift trend.

fcp: optional array of number

First Contentful Paint trend.

lcp: optional array of number

Largest Contentful Paint trend.

performanceScore: optional array of number

The Lighthouse score trend.

si: optional array of number

Speed Index trend.

tbt: optional array of number

Total Blocking Time trend.

ttfb: optional array of number

Time To First Byte trend.

tti: optional array of number

Time To Interactive trend.

SpeedSchedule

Get a page test schedule
GET/zones/{zone_id}/speed_api/schedule/{url}
Create scheduled page test
POST/zones/{zone_id}/speed_api/schedule/{url}
Delete scheduled page test
DELETE/zones/{zone_id}/speed_api/schedule/{url}
ModelsExpand Collapse
Schedule = object { frequency, region, url }

The test schedule.

frequency: optional "DAILY" or "WEEKLY"

The frequency of the test.

One of the following:
"DAILY"
"WEEKLY"
region: optional "asia-east1" or "asia-northeast1" or "asia-northeast2" or 18 more

A test region.

One of the following:
"asia-east1"
"asia-northeast1"
"asia-northeast2"
"asia-south1"
"asia-southeast1"
"australia-southeast1"
"europe-north1"
"europe-southwest1"
"europe-west1"
"europe-west2"
"europe-west3"
"europe-west4"
"europe-west8"
"europe-west9"
"me-west1"
"southamerica-east1"
"us-central1"
"us-east1"
"us-east4"
"us-south1"
"us-west1"
url: optional string

A URL.

ScheduleCreateResponse = object { schedule, test }
schedule: optional Schedule { frequency, region, url }

The test schedule.

test: optional Test { id, date, desktopReport, 4 more }
ScheduleDeleteResponse = object { count }
count: optional number

Number of items affected.

SpeedAvailabilities

Get quota and availability
GET/zones/{zone_id}/speed_api/availabilities
ModelsExpand Collapse
Availability = object { quota, regions, regionsPerPlan }
quota: optional object { plan, quotasPerPlan, remainingSchedules, 2 more }
plan: optional string

Cloudflare plan.

quotasPerPlan: optional object { value }

The number of tests available per plan.

value: optional object { business, enterprise, free, pro }

Counts per account plan.

business: optional number
enterprise: optional number
free: optional number
pro: optional number
remainingSchedules: optional number

The number of remaining schedules available.

remainingTests: optional number

The number of remaining tests available.

scheduleQuotasPerPlan: optional object { value }

The number of schedules available per plan.

value: optional object { business, enterprise, free, pro }

Counts per account plan.

business: optional number
enterprise: optional number
free: optional number
pro: optional number
regions: optional array of LabeledRegion { label, value }
label: optional string
value: optional "asia-east1" or "asia-northeast1" or "asia-northeast2" or 18 more

A test region.

One of the following:
"asia-east1"
"asia-northeast1"
"asia-northeast2"
"asia-south1"
"asia-southeast1"
"australia-southeast1"
"europe-north1"
"europe-southwest1"
"europe-west1"
"europe-west2"
"europe-west3"
"europe-west4"
"europe-west8"
"europe-west9"
"me-west1"
"southamerica-east1"
"us-central1"
"us-east1"
"us-east4"
"us-south1"
"us-west1"
regionsPerPlan: optional object { business, enterprise, free, pro }

Available regions.

business: optional array of LabeledRegion { label, value }
label: optional string
value: optional "asia-east1" or "asia-northeast1" or "asia-northeast2" or 18 more

A test region.

One of the following:
"asia-east1"
"asia-northeast1"
"asia-northeast2"
"asia-south1"
"asia-southeast1"
"australia-southeast1"
"europe-north1"
"europe-southwest1"
"europe-west1"
"europe-west2"
"europe-west3"
"europe-west4"
"europe-west8"
"europe-west9"
"me-west1"
"southamerica-east1"
"us-central1"
"us-east1"
"us-east4"
"us-south1"
"us-west1"
enterprise: optional array of LabeledRegion { label, value }
label: optional string
value: optional "asia-east1" or "asia-northeast1" or "asia-northeast2" or 18 more

A test region.

One of the following:
"asia-east1"
"asia-northeast1"
"asia-northeast2"
"asia-south1"
"asia-southeast1"
"australia-southeast1"
"europe-north1"
"europe-southwest1"
"europe-west1"
"europe-west2"
"europe-west3"
"europe-west4"
"europe-west8"
"europe-west9"
"me-west1"
"southamerica-east1"
"us-central1"
"us-east1"
"us-east4"
"us-south1"
"us-west1"
free: optional array of LabeledRegion { label, value }
label: optional string
value: optional "asia-east1" or "asia-northeast1" or "asia-northeast2" or 18 more

A test region.

One of the following:
"asia-east1"
"asia-northeast1"
"asia-northeast2"
"asia-south1"
"asia-southeast1"
"australia-southeast1"
"europe-north1"
"europe-southwest1"
"europe-west1"
"europe-west2"
"europe-west3"
"europe-west4"
"europe-west8"
"europe-west9"
"me-west1"
"southamerica-east1"
"us-central1"
"us-east1"
"us-east4"
"us-south1"
"us-west1"
pro: optional array of LabeledRegion { label, value }
label: optional string
value: optional "asia-east1" or "asia-northeast1" or "asia-northeast2" or 18 more

A test region.

One of the following:
"asia-east1"
"asia-northeast1"
"asia-northeast2"
"asia-south1"
"asia-southeast1"
"australia-southeast1"
"europe-north1"
"europe-southwest1"
"europe-west1"
"europe-west2"
"europe-west3"
"europe-west4"
"europe-west8"
"europe-west9"
"me-west1"
"southamerica-east1"
"us-central1"
"us-east1"
"us-east4"
"us-south1"
"us-west1"

SpeedPages

List tested webpages
GET/zones/{zone_id}/speed_api/pages
List core web vital metrics trend
GET/zones/{zone_id}/speed_api/pages/{url}/trend
ModelsExpand Collapse
PageListResponse = object { region, scheduleFrequency, tests, url }
region: optional LabeledRegion { label, value }

A test region with a label.

scheduleFrequency: optional "DAILY" or "WEEKLY"

The frequency of the test.

One of the following:
"DAILY"
"WEEKLY"
tests: optional array of Test { id, date, desktopReport, 4 more }
id: optional string

UUID.

maxLength36
date: optional string
formatdate-time
desktopReport: optional LighthouseReport { cls, deviceType, error, 9 more }

The Lighthouse report.

mobileReport: optional LighthouseReport { cls, deviceType, error, 9 more }

The Lighthouse report.

region: optional LabeledRegion { label, value }

A test region with a label.

scheduleFrequency: optional "DAILY" or "WEEKLY"

The frequency of the test.

One of the following:
"DAILY"
"WEEKLY"
url: optional string

A URL.

url: optional string

A URL.

SpeedPagesTests

List page test history
GET/zones/{zone_id}/speed_api/pages/{url}/tests
Get a page test result
GET/zones/{zone_id}/speed_api/pages/{url}/tests/{test_id}
Start page test
POST/zones/{zone_id}/speed_api/pages/{url}/tests
Delete all page tests
DELETE/zones/{zone_id}/speed_api/pages/{url}/tests
ModelsExpand Collapse
Test = object { id, date, desktopReport, 4 more }
id: optional string

UUID.

maxLength36
date: optional string
formatdate-time
desktopReport: optional LighthouseReport { cls, deviceType, error, 9 more }

The Lighthouse report.

mobileReport: optional LighthouseReport { cls, deviceType, error, 9 more }

The Lighthouse report.

region: optional LabeledRegion { label, value }

A test region with a label.

scheduleFrequency: optional "DAILY" or "WEEKLY"

The frequency of the test.

One of the following:
"DAILY"
"WEEKLY"
url: optional string

A URL.

TestDeleteResponse = object { count }
count: optional number

Number of items affected.