> ## Documentation Index
> Fetch the complete documentation index at: https://developer.lofty.com/llms.txt
> Use this file to discover all available pages before exploring further.

# search_site_audit

> Facts about the caller's own Lofty website, one section per call. Read-only.

> [!NOTE]
>
> **READ** · 7 operations · never changes data

Read the facts an audit of the caller's own Lofty website is made of, one section per call: overview, site-level SEO settings, pages with their SEO fields, one page's raw templates, navigation structure, robots / sitemap / llms files and third-party integrations. The tool reports, it does not score: conclusions and advice are up to the model.

Every section is wrapped as `{section, siteId, generatedAt, partial, data}`. `partial=true` means a part of the section could not be fetched; the item then carries `fetchError` saying why.

```js theme={null}
// kind is required; the other arguments only apply to pages / page_detail.
search_site_audit({
  kind: "overview" | "seo_settings" | "pages" | "page_detail" | "structure"
      | "technical_files" | "integrations",
  page?: number,        // kind=pages: page number from 1
  size?: number,        // kind=pages: 1-50, default 20
  page_id?: string      // required for kind=page_detail: the pageId of an item from kind=pages
})
```

| kind | What `data` holds |
| - | - |
| `overview` | site id, domain, status, page count, Feature Area count (the number of Feature Areas the site has, the same number as `featuredAreaCount` in `seo_settings` and the `feature_area` count in `structure`) |
| `seo_settings` | brand name, intro video link, site keywords, the site's Feature Areas (`featuredAreas`, the first 50 by id; `featuredAreaCount` is the total, the same number as `featureAreaCount` in `overview`) and the Feature Area version |
| `pages` | the site's menu pages, the same pages as the CMS **SEO → Page SEO** table, up to 100: menu label as `name`, URL, SEO `title` / `description` / `keywords` with lengths, the saved templates `rawTitle` / `rawDescription` / `rawKeywords`, `h1` / `h1Count`, `heroImageAltMissing`, `hasSchema`, `schemaTypes`, `updatedAt`, `fetchError`. `title` and `description` are the values shown on the live page, with template variables such as `{{Company Name}}` already filled in. A variable still in braces is one the audit could not fill; the live page may show the same text or a fallback value. `h1`, `h1Count`, `hasSchema` and `schemaTypes` are `null` when the page could not be checked this time (see `fetchError`); `0` / `false` / `[]` mean the live page has none. Feature Area pages, landing pages and blog posts are not listed; the site-wide Feature Area and landing page counts are in `structure` (blog posts are not counted), and community pages are in `search_feature_areas` |
| `page_detail` | one listed page's item fields plus `schemaJson`; the page body text is not returned |
| `structure` | navigation tree (the menu the live header shows: internal links without a live page are left out, except neighborhood menu items; external links are kept; folders left without children are left out), `totalPages` (every page of the site), site-wide counts per type in `pageTypeCounts` (`navigation`, `feature_area`, `landing_page`; the counts can overlap, so they do not add up to `totalPages`), how Feature Area pages are linked from the home page |
| `technical_files` | robots.txt, sitemap.xml and llms.txt as fetched from the live site: per file whether it exists, HTTP status, size, last-modified and any fetch error; the robots `Disallow` rules grouped by user agent (`groups`, each with its `userAgents` and `disallow` paths, so a rule for one crawler is not read as a rule for all) and whether a sitemap is declared; the sitemap URL count |
| `integrations` | whether Google Search Console, Bing Webmaster Tools and Google Business Profile are connected, and NAP consistency with the Business Profile. For Bing, `connected` means a Bing account is linked and `verified` means this site is verified in Bing |

> [!NOTE]
>
> A `fetchError` starting with `redirected to another domain` means the site's own URL redirects to
> another domain — report that to the user as a problem in itself, and do not treat the other
> site's content as this site's. A `fetchError` starting with `HTTP error fetching URL. Status=`
> gives the HTTP status the live page answered with (for example `Status=404`). A `fetchError` of
> `This page could not be checked right now. Please try again later.` covers every other failure
> (timeout, connection failure, unfinished fetch). With any `fetchError`, the page's `h1`,
> `h1Count`, `hasSchema` and `schemaTypes` that could not be checked are `null`, which means "not
> checked this time", not "none". Only `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.

> [!NOTE]
>
> Show the user `title` and `description` as they are: they are the live values, except a
> variable still in braces, which the live page may show as a fallback value. 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. The saved templates are in each item's `rawTitle` /
> `rawDescription` / `rawKeywords`.

> [!TIP]
>
> Before changing a page with `manage_page_seo`, keep the raw template values
> (`rawTitle` / `rawDescription` / `rawKeywords`). For traffic numbers use `search_site_analytics`; for community pages use
> `search_feature_areas`.

Available to website-only (Lofty Front) agents and to sites on the Hyperlocal Website package; other callers get `403001`. Every call works on the caller's primary website.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.