Skip to content
Start here

Speed

ModelsExpand Collapse
LabeledRegion { label, value }

A test region with a label.

label?: string
value?: "asia-east1" | "asia-northeast1" | "asia-northeast2" | 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 { cls, deviceType, error, 9 more }

The Lighthouse report.

cls?: number

Cumulative Layout Shift.

deviceType?: "DESKTOP" | "MOBILE"

The type of device.

One of the following:
"DESKTOP"
"MOBILE"
error?: Error { code, detail, finalDisplayedUrl }
code?: "NOT_REACHABLE" | "DNS_FAILURE" | "NOT_HTML" | 2 more

The error code of the Lighthouse result.

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

Detailed error message.

finalDisplayedUrl?: string

The final URL displayed to the user.

fcp?: number

First Contentful Paint.

jsonReportUrl?: string

The URL to the full Lighthouse JSON report.

lcp?: number

Largest Contentful Paint.

performanceScore?: number

The Lighthouse performance score.

si?: number

Speed Index.

state?: "RUNNING" | "COMPLETE" | "FAILED"

The state of the Lighthouse report.

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

Total Blocking Time.

ttfb?: number

Time To First Byte.

tti?: number

Time To Interactive.

Trend { cls, fcp, lcp, 5 more }
cls?: Array<number | null>

Cumulative Layout Shift trend.

fcp?: Array<number | null>

First Contentful Paint trend.

lcp?: Array<number | null>

Largest Contentful Paint trend.

performanceScore?: Array<number | null>

The Lighthouse score trend.

si?: Array<number | null>

Speed Index trend.

tbt?: Array<number | null>

Total Blocking Time trend.

ttfb?: Array<number | null>

Time To First Byte trend.

tti?: Array<number | null>

Time To Interactive trend.

SpeedSchedule

Get a page test schedule
client.speed.schedule.get(stringurl, ScheduleGetParams { zone_id, region } params, RequestOptionsoptions?): Schedule { frequency, region, url }
GET/zones/{zone_id}/speed_api/schedule/{url}
Create scheduled page test
client.speed.schedule.create(stringurl, ScheduleCreateParams { zone_id, frequency, region } params, RequestOptionsoptions?): ScheduleCreateResponse { schedule, test }
POST/zones/{zone_id}/speed_api/schedule/{url}
Delete scheduled page test
client.speed.schedule.delete(stringurl, ScheduleDeleteParams { zone_id, region } params, RequestOptionsoptions?): ScheduleDeleteResponse { count }
DELETE/zones/{zone_id}/speed_api/schedule/{url}
ModelsExpand Collapse
Schedule { frequency, region, url }

The test schedule.

frequency?: "DAILY" | "WEEKLY"

The frequency of the test.

One of the following:
"DAILY"
"WEEKLY"
region?: "asia-east1" | "asia-northeast1" | "asia-northeast2" | 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?: string

A URL.

ScheduleCreateResponse { schedule, test }
schedule?: Schedule { frequency, region, url }

The test schedule.

test?: Test { id, date, desktopReport, 4 more }
ScheduleDeleteResponse { count }
count?: number

Number of items affected.

SpeedAvailabilities

Get quota and availability
client.speed.availabilities.list(AvailabilityListParams { zone_id } params, RequestOptionsoptions?): Availability { quota, regions, regionsPerPlan }
GET/zones/{zone_id}/speed_api/availabilities
ModelsExpand Collapse
Availability { quota, regions, regionsPerPlan }
quota?: Quota { plan, quotasPerPlan, remainingSchedules, 2 more }
plan?: string

Cloudflare plan.

quotasPerPlan?: QuotasPerPlan { value }

The number of tests available per plan.

value?: Value { business, enterprise, free, pro }

Counts per account plan.

business?: number
enterprise?: number
free?: number
pro?: number
remainingSchedules?: number

The number of remaining schedules available.

remainingTests?: number

The number of remaining tests available.

scheduleQuotasPerPlan?: ScheduleQuotasPerPlan { value }

The number of schedules available per plan.

value?: Value { business, enterprise, free, pro }

Counts per account plan.

business?: number
enterprise?: number
free?: number
pro?: number
regions?: Array<LabeledRegion { label, value } >
label?: string
value?: "asia-east1" | "asia-northeast1" | "asia-northeast2" | 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?: RegionsPerPlan { business, enterprise, free, pro }

Available regions.

business?: Array<LabeledRegion { label, value } >
label?: string
value?: "asia-east1" | "asia-northeast1" | "asia-northeast2" | 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?: Array<LabeledRegion { label, value } >
label?: string
value?: "asia-east1" | "asia-northeast1" | "asia-northeast2" | 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?: Array<LabeledRegion { label, value } >
label?: string
value?: "asia-east1" | "asia-northeast1" | "asia-northeast2" | 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?: Array<LabeledRegion { label, value } >
label?: string
value?: "asia-east1" | "asia-northeast1" | "asia-northeast2" | 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
client.speed.pages.list(PageListParams { zone_id } params, RequestOptionsoptions?): SinglePage<PageListResponse { region, scheduleFrequency, tests, url } >
GET/zones/{zone_id}/speed_api/pages
List core web vital metrics trend
client.speed.pages.trend(stringurl, PageTrendParams { zone_id, deviceType, metrics, 4 more } params, RequestOptionsoptions?): Trend { cls, fcp, lcp, 5 more }
GET/zones/{zone_id}/speed_api/pages/{url}/trend
ModelsExpand Collapse
PageListResponse { region, scheduleFrequency, tests, url }
region?: LabeledRegion { label, value }

A test region with a label.

scheduleFrequency?: "DAILY" | "WEEKLY"

The frequency of the test.

One of the following:
"DAILY"
"WEEKLY"
tests?: Array<Test { id, date, desktopReport, 4 more } >
id?: string

UUID.

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

The Lighthouse report.

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

The Lighthouse report.

region?: LabeledRegion { label, value }

A test region with a label.

scheduleFrequency?: "DAILY" | "WEEKLY"

The frequency of the test.

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

A URL.

url?: string

A URL.

SpeedPagesTests

List page test history
client.speed.pages.tests.list(stringurl, TestListParams { zone_id, page, per_page, region } params, RequestOptionsoptions?): V4PagePaginationArray<Test { id, date, desktopReport, 4 more } >
GET/zones/{zone_id}/speed_api/pages/{url}/tests
Get a page test result
client.speed.pages.tests.get(stringurl, stringtestId, TestGetParams { zone_id } params, RequestOptionsoptions?): Test { id, date, desktopReport, 4 more }
GET/zones/{zone_id}/speed_api/pages/{url}/tests/{test_id}
Start page test
client.speed.pages.tests.create(stringurl, TestCreateParams { zone_id, region } params, RequestOptionsoptions?): Test { id, date, desktopReport, 4 more }
POST/zones/{zone_id}/speed_api/pages/{url}/tests
Delete all page tests
client.speed.pages.tests.delete(stringurl, TestDeleteParams { zone_id, region } params, RequestOptionsoptions?): TestDeleteResponse { count }
DELETE/zones/{zone_id}/speed_api/pages/{url}/tests
ModelsExpand Collapse
Test { id, date, desktopReport, 4 more }
id?: string

UUID.

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

The Lighthouse report.

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

The Lighthouse report.

region?: LabeledRegion { label, value }

A test region with a label.

scheduleFrequency?: "DAILY" | "WEEKLY"

The frequency of the test.

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

A URL.

TestDeleteResponse { count }
count?: number

Number of items affected.