Site Audit
Audit page detail
One page of the caller’s primary website: the fields of its Audit pages item, including the saved templates, plus its schema JSON. Only pages listed by Audit pages are found. The page carries fetchError when its live fetch failed; “redirected to another domain: …” means the page redirects off the site. Returns an audit section {section, siteId, generatedAt, partial, data}; data is a PageDetail.
GET
/
v2.0
/
website
/
audit
/
pages
/
{pageId}
Audit page detail
curl --request GET \
--url https://api.lofty.com/v2.0/website/audit/pages/{pageId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/website/audit/pages/{pageId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lofty.com/v2.0/website/audit/pages/{pageId}', 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.lofty.com/v2.0/website/audit/pages/{pageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lofty.com/v2.0/website/audit/pages/{pageId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lofty.com/v2.0/website/audit/pages/{pageId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/website/audit/pages/{pageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"section": "<string>",
"siteId": 123,
"generatedAt": 123,
"partial": true,
"data": {
"pageId": 123,
"name": "<string>",
"path": "<string>",
"url": "<string>",
"pageKey": "<string>",
"title": "<string>",
"description": "<string>",
"keywords": "<string>",
"rawTitle": "<string>",
"rawDescription": "<string>",
"rawKeywords": "<string>",
"titleLength": 123,
"descriptionLength": 123,
"h1": "<string>",
"h1Count": 123,
"heroImageAltMissing": true,
"hasSchema": true,
"schemaTypes": [
"<string>"
],
"updatedAt": 123,
"fetchError": "<string>",
"schemaJson": [
"<string>"
]
}
}⌘I
Audit page detail
curl --request GET \
--url https://api.lofty.com/v2.0/website/audit/pages/{pageId} \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/website/audit/pages/{pageId}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.lofty.com/v2.0/website/audit/pages/{pageId}', 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.lofty.com/v2.0/website/audit/pages/{pageId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lofty.com/v2.0/website/audit/pages/{pageId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lofty.com/v2.0/website/audit/pages/{pageId}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/website/audit/pages/{pageId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"section": "<string>",
"siteId": 123,
"generatedAt": 123,
"partial": true,
"data": {
"pageId": 123,
"name": "<string>",
"path": "<string>",
"url": "<string>",
"pageKey": "<string>",
"title": "<string>",
"description": "<string>",
"keywords": "<string>",
"rawTitle": "<string>",
"rawDescription": "<string>",
"rawKeywords": "<string>",
"titleLength": 123,
"descriptionLength": 123,
"h1": "<string>",
"h1Count": 123,
"heroImageAltMissing": true,
"hasSchema": true,
"schemaTypes": [
"<string>"
],
"updatedAt": 123,
"fetchError": "<string>",
"schemaJson": [
"<string>"
]
}
}