Two audits run against the live store: a Lighthouse page speed measurement and a GEO audit of how ready the store is for AI search. Unpublished storefront edits are not in either result, so [publish](/docs/api-reference/storefront-code#publish-the-storefront) before you measure a change.

Every endpoint here needs the `analytics:read` scope. A team member connected over OAuth needs the same permission.

## Measure page speed

```
POST /api/v1/seo/page-speed/audits
```

Runs Google Lighthouse against the live page and keeps the result in the store's page speed history. The answer comes back when the measurement is done, usually within a minute and at most about five. Both devices are measured side by side, so two strategies take no longer than one. Scores drift a few points between identical runs.

| Field | Type | Description |
|-------|------|-------------|
| `url` | `string` | A path on the store (`/`, `/product/blue-mug`) or the full `https://` address of any public page, such as a competitor's. Defaults to the homepage |
| `strategies` | `("mobile" \| "desktop")[]` | The devices to simulate. Defaults to `["mobile"]` |

```bash
curl -X POST \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"url":"/","strategies":["mobile","desktop"]}' \
  https://your-store.yns.store/api/v1/seo/page-speed/audits
```

### Response (201)

`{ url, runs }`, with one run per strategy:

| Field | Description |
|-------|-------------|
| `strategy` | `mobile` or `desktop` |
| `performanceScore`, `accessibilityScore` | Lighthouse scores out of 100. The accessibility score is guidance, not a WCAG compliance verdict |
| `firstContentfulPaintMs`, `largestContentfulPaintMs`, `totalBlockingTimeMs`, `speedIndexMs`, `timeToInteractiveMs`, `cumulativeLayoutShift` | The page's metrics |
| `opportunities` | Lighthouse's failing audits, worst first |
| `weight` | Where the page's bytes went, tagged by owner: `content` (uploaded pictures), `storefront` (theme code and fonts) or `third-party` (a script on another company's domain) |
| `accessibilityIssues` | Failing accessibility audits, most impactful first |
| `previous`, `change` | The last measurement of the same page on the same device, and the difference. A positive score change is better. Both `null` on a first check |

| Status | Description |
|--------|-------------|
| `400` | The target is not a page that can be measured, such as a bad address or a non-http scheme |

## List page speed audits

```
GET /api/v1/seo/page-speed/audits
```

The runs already measured for this store, newest first: the automatic run after each publish (`source: "publish"`) and every run that was asked for (`source: "agent"`). It never starts a measurement. Each row has the performance and accessibility scores, LCP, total blocking time, CLS and the storefront commit that was live.

| Parameter | Type | Description |
|-----------|------|-------------|
| `url` | `string` | One page only: a path on the store or the full address that was measured. Omit for every page |
| `strategy` | `"mobile" \| "desktop"` | One device only. Omit for both |
| `source` | `"publish" \| "agent"` | One source only. Omit for both |
| `limit` | `integer` | Runs per page, 1–100. Default 20 |
| `offset` | `integer` | Runs to skip |

Returns `{ data: [...], meta: { count } }`.

## Get a page speed audit

```
GET /api/v1/seo/page-speed/audits/:id
```

One stored run in full: every metric, `opportunities`, `weight` and `accessibilityIssues` with snippets of the elements caught. Answers `404` for an unknown id.

### Deprecated page speed reports

`GET /api/v1/page-speed-reports` and `GET /api/v1/page-speed-reports/:id` return the same data as the two reads above. They stay as deprecated aliases. Use `/api/v1/seo/page-speed/audits` in new code.

---

## Audit readiness for AI search (GEO)

```
POST /api/v1/seo/geo/audits
```

Checks how ready a live store is for AI search: whether ChatGPT, Perplexity and Google AI Overviews can reach it, read its product pages and trust its product data. Nothing in the store changes. The answer comes back when the audit is done, usually within a minute and at most about two. A store audited in the last hours answers from the kept result.

| Field | Type | Description |
|-------|------|-------------|
| `url` | `string` | The store to audit, as `shop.com` or `https://shop.com`. Any public store works, such as a competitor or the shop you are moving from. Defaults to this store |

```bash
curl -X POST \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{}' \
  https://your-store.yns.store/api/v1/seo/geo/audits
```

### Response (200)

`{ report, insights }`.

| `report` field | Description |
|----------------|-------------|
| `score` | The GEO score out of 100 |
| `categories` | A score per area: AI crawler access, product data, readable content, search signals, AI discovery and trust. `null` for an area that was not measured |
| `checks` | Every check and its result |
| `recommendations` | Fixes ranked by the points each one is worth |
| `site` | AI crawler access per bot, `robots.txt`, homepage markup, trust and category pages |
| `products` | Product pages found and checked, with up to 8 sampled pages in `audited`: their facts, structured data and failing checks |
| `complete` | `false` when part of the store did not answer |

`insights` is written advice in English, or `null` when it could not be written. It covers how an assistant reads the store, a better title, meta description and description opening per product, the shopper questions each page answers or leaves open (`answerCoverage`), and mobile speed.

| Status | Description |
|--------|-------------|
| `400` | The address is not a store, or the store refuses crawlers |

## Related

- [Redirects](/docs/api-reference/redirects) – add a redirect when a fix changes a product's address
- [Storefront Code](/docs/api-reference/storefront-code) – fix code-side findings and publish them