Run a PageSpeed audit
curl --request POST \
--url https://api.snowseo.com/v3/page-speed/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auditId": "<string>",
"teamId": "<string>",
"selection": {
"mode": "ids",
"ids": [
"<string>"
]
},
"targets": [
{
"url": "<string>",
"auditId": "<string>"
}
],
"strategies": [],
"allPages": false,
"force": false
}
'import requests
url = "https://api.snowseo.com/v3/page-speed/run"
payload = {
"auditId": "<string>",
"teamId": "<string>",
"selection": {
"mode": "ids",
"ids": ["<string>"]
},
"targets": [
{
"url": "<string>",
"auditId": "<string>"
}
],
"strategies": [],
"allPages": False,
"force": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auditId: '<string>',
teamId: '<string>',
selection: {mode: 'ids', ids: ['<string>']},
targets: [{url: '<string>', auditId: '<string>'}],
strategies: [],
allPages: false,
force: false
})
};
fetch('https://api.snowseo.com/v3/page-speed/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.snowseo.com/v3/page-speed/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'auditId' => '<string>',
'teamId' => '<string>',
'selection' => [
'mode' => 'ids',
'ids' => [
'<string>'
]
],
'targets' => [
[
'url' => '<string>',
'auditId' => '<string>'
]
],
'strategies' => [
],
'allPages' => false,
'force' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.snowseo.com/v3/page-speed/run"
payload := strings.NewReader("{\n \"auditId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"targets\": [\n {\n \"url\": \"<string>\",\n \"auditId\": \"<string>\"\n }\n ],\n \"strategies\": [],\n \"allPages\": false,\n \"force\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.snowseo.com/v3/page-speed/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auditId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"targets\": [\n {\n \"url\": \"<string>\",\n \"auditId\": \"<string>\"\n }\n ],\n \"strategies\": [],\n \"allPages\": false,\n \"force\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snowseo.com/v3/page-speed/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auditId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"targets\": [\n {\n \"url\": \"<string>\",\n \"auditId\": \"<string>\"\n }\n ],\n \"strategies\": [],\n \"allPages\": false,\n \"force\": false\n}"
response = http.request(request)
puts response.read_body{
"eligibility": {
"selected": 123,
"eligible": 123,
"skipped": 123,
"byReason": {}
},
"units": 123,
"status": "<string>",
"message": "<string>",
"url": "<string>",
"mobile": {
"url": "<string>",
"scores": {
"performance": 123,
"accessibility": 123,
"bestPractices": 123,
"seo": 123
},
"fetchedAt": "<string>",
"coreWebVitals": {},
"agenticBrowsing": {},
"failedAudits": [
{}
],
"informativeAudits": [
{}
],
"passedAudits": [
{}
],
"notApplicableAudits": [
{}
],
"manualAudits": [
{}
]
},
"desktop": {
"url": "<string>",
"scores": {
"performance": 123,
"accessibility": 123,
"bestPractices": 123,
"seo": 123
},
"fetchedAt": "<string>",
"coreWebVitals": {},
"agenticBrowsing": {},
"failedAudits": [
{}
],
"informativeAudits": [
{}
],
"passedAudits": [
{}
],
"notApplicableAudits": [
{}
],
"manualAudits": [
{}
]
},
"fetchedAt": "<string>",
"mobileError": "<string>",
"desktopError": "<string>"
}{
"status": "<string>",
"targetCount": 123,
"acceptedAt": 123,
"acceptedUrls": [
"<string>"
]
}PageSpeed
Run PageSpeed Audit
Enqueue a Google PageSpeed Insights batch audit for specific pages or the entire site.
POST
/
v3
/
page-speed
/
run
Run a PageSpeed audit
curl --request POST \
--url https://api.snowseo.com/v3/page-speed/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auditId": "<string>",
"teamId": "<string>",
"selection": {
"mode": "ids",
"ids": [
"<string>"
]
},
"targets": [
{
"url": "<string>",
"auditId": "<string>"
}
],
"strategies": [],
"allPages": false,
"force": false
}
'import requests
url = "https://api.snowseo.com/v3/page-speed/run"
payload = {
"auditId": "<string>",
"teamId": "<string>",
"selection": {
"mode": "ids",
"ids": ["<string>"]
},
"targets": [
{
"url": "<string>",
"auditId": "<string>"
}
],
"strategies": [],
"allPages": False,
"force": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
auditId: '<string>',
teamId: '<string>',
selection: {mode: 'ids', ids: ['<string>']},
targets: [{url: '<string>', auditId: '<string>'}],
strategies: [],
allPages: false,
force: false
})
};
fetch('https://api.snowseo.com/v3/page-speed/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.snowseo.com/v3/page-speed/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'auditId' => '<string>',
'teamId' => '<string>',
'selection' => [
'mode' => 'ids',
'ids' => [
'<string>'
]
],
'targets' => [
[
'url' => '<string>',
'auditId' => '<string>'
]
],
'strategies' => [
],
'allPages' => false,
'force' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.snowseo.com/v3/page-speed/run"
payload := strings.NewReader("{\n \"auditId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"targets\": [\n {\n \"url\": \"<string>\",\n \"auditId\": \"<string>\"\n }\n ],\n \"strategies\": [],\n \"allPages\": false,\n \"force\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.snowseo.com/v3/page-speed/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auditId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"targets\": [\n {\n \"url\": \"<string>\",\n \"auditId\": \"<string>\"\n }\n ],\n \"strategies\": [],\n \"allPages\": false,\n \"force\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snowseo.com/v3/page-speed/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"auditId\": \"<string>\",\n \"teamId\": \"<string>\",\n \"selection\": {\n \"mode\": \"ids\",\n \"ids\": [\n \"<string>\"\n ]\n },\n \"targets\": [\n {\n \"url\": \"<string>\",\n \"auditId\": \"<string>\"\n }\n ],\n \"strategies\": [],\n \"allPages\": false,\n \"force\": false\n}"
response = http.request(request)
puts response.read_body{
"eligibility": {
"selected": 123,
"eligible": 123,
"skipped": 123,
"byReason": {}
},
"units": 123,
"status": "<string>",
"message": "<string>",
"url": "<string>",
"mobile": {
"url": "<string>",
"scores": {
"performance": 123,
"accessibility": 123,
"bestPractices": 123,
"seo": 123
},
"fetchedAt": "<string>",
"coreWebVitals": {},
"agenticBrowsing": {},
"failedAudits": [
{}
],
"informativeAudits": [
{}
],
"passedAudits": [
{}
],
"notApplicableAudits": [
{}
],
"manualAudits": [
{}
]
},
"desktop": {
"url": "<string>",
"scores": {
"performance": 123,
"accessibility": 123,
"bestPractices": 123,
"seo": 123
},
"fetchedAt": "<string>",
"coreWebVitals": {},
"agenticBrowsing": {},
"failedAudits": [
{}
],
"informativeAudits": [
{}
],
"passedAudits": [
{}
],
"notApplicableAudits": [
{}
],
"manualAudits": [
{}
]
},
"fetchedAt": "<string>",
"mobileError": "<string>",
"desktopError": "<string>"
}{
"status": "<string>",
"targetCount": 123,
"acceptedAt": 123,
"acceptedUrls": [
"<string>"
]
}Enqueue a Google PageSpeed Insights audit job in the background. Audits can target specific URLs, a table
selection, or the entire site (allPages: true). Use POST /v3/page-speed/run-preview with the same body to see what would run first.Authorizations
bearerAuthapiKey
Your SnowSEO API key (sk_...).
Body
application/json
SEO audit ID for this team's site.
SnowSEO team ID, as returned by list_teams.
- Option 1
- Option 2
Show child attributes
Show child attributes
Selected pages to audit.
Show child attributes
Show child attributes
Devices to test. Defaults to both.
Available options:
mobile, desktop Audit every page of the site. Expensive - this can consume a large share of the PageSpeed API key's quota.
Re-audit even if the stored result is still fresh.
Was this page helpful?

