Speed

Speed

Domain types

LabeledRegion{…}

A test region with a label.

LighthouseReport{…}

The Lighthouse report.

Trend{…}
Speed

Availabilities

Speed.Availabilities

Methods

list(, ):
get/zones/{zone_id}/speed_api/availabilities

Retrieves quota for all plans, as well as the current zone quota.

Domain types

Availability{…}
Speed

Pages

Speed.Pages

Methods

list(, ): <>
get/zones/{zone_id}/speed_api/pages

Lists all webpages which have been tested.

trend(, , ):
get/zones/{zone_id}/speed_api/pages/{url}/trend

Lists the core web vital metrics trend over time for a specific page.

Speed.Pages.Tests

Methods

list(, , ): <>
get/zones/{zone_id}/speed_api/pages/{url}/tests

Test history (list of tests) for a specific webpage.

get(, , , ):
get/zones/{zone_id}/speed_api/pages/{url}/tests/{test_id}

Retrieves the result of a specific test.

Security

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Accepted Permissions (at least one required)

Zone Settings Write Zone Settings Read

Parameters
url: string

A URL.

testId: string
zone_id: string
(maxLength: 32)

Identifier.

Returns
id?: string
(maxLength: 36)

UUID.

date?: string
(format: date-time)
desktopReport?:

The Lighthouse report.

mobileReport?:

The Lighthouse report.

region?:

A test region with a label.

scheduleFrequency?: "DAILY" | "WEEKLY"

The frequency of the test.

url?: string

A URL.

Request example
200Example
create(, , ):
post/zones/{zone_id}/speed_api/pages/{url}/tests

Starts a test for a specific webpage, in a specific region.

delete(, , ):
delete/zones/{zone_id}/speed_api/pages/{url}/tests

Deletes all tests for a specific webpage from a specific region. Deleted tests are still counted as part of the quota.

Domain types

Test{…}
Speed

Schedule

Speed.ScheduleResource

Methods

get(, , ):
get/zones/{zone_id}/speed_api/schedule/{url}

Retrieves the test schedule for a page in a specific region.

create(, , ):
post/zones/{zone_id}/speed_api/schedule/{url}

Creates a scheduled test for a page.

delete(, , ):
delete/zones/{zone_id}/speed_api/schedule/{url}

Deletes a scheduled test for a page.

Domain types

Schedule{…}

The test schedule.