Audit pages
The menu pages of the caller’s primary website, the same pages as the CMS SEO > Page SEO table, with their menu label, URL, SEO title, description and keywords (title and description lengths) and their saved templates (rawTitle, rawDescription, rawKeywords), H1, hero image alt, schema types and last update; at most 100. Feature Area pages, landing pages and blog posts are not listed; the site-wide page counts are in structure. Items carry fetchError when the live page fetch failed; “redirected to another domain: …” means the page redirects off the site. title and description are the values shown on the live page, with template variables already filled in. The saved templates are in each item’s rawTitle / rawDescription / rawKeywords. When a value comes from a variable such as {{Company Name}}, change the source (for example the company name in CRM) instead of replacing the variable with fixed text. A variable still in braces is a value the audit could not fill; the live page may display the same text or a fallback value. h1Count, hasSchema and schemaTypes are null when the page could not be checked right now; 0 / false / [] mean the live page has none. An empty h1 with h1Count of at least 1 and a fetchError means the H1 exists but its live text could not be read. Returns an audit section {section, siteId, generatedAt, partial, data}; data is a {page, size, total, items: PageItem[]}.
curl --request GET \
--url https://api.lofty.com/v2.0/website/audit/pages \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/website/audit/pages"
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', 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",
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"
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")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/website/audit/pages")
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": {
"page": 123,
"size": 123,
"total": 123,
"items": [
{
"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>"
}
]
}
}curl --request GET \
--url https://api.lofty.com/v2.0/website/audit/pages \
--header 'Authorization: <authorization>'import requests
url = "https://api.lofty.com/v2.0/website/audit/pages"
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', 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",
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"
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")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lofty.com/v2.0/website/audit/pages")
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": {
"page": 123,
"size": 123,
"total": 123,
"items": [
{
"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>"
}
]
}
}