---
title: "Get Page Optimization Detail"
method: GET
path: "/{brand_id}/site-optimization/optimization"
tags: ["site-optimization"]
---

# Get Page Optimization Detail

`GET /{brand_id}/site-optimization/optimization`

## Request

- Base URL: `https://api.scrunchai.com/v1`
- URL: `https://api.scrunchai.com/v1/{brand_id}/site-optimization/optimization`
- Auth: HTTP bearer

Fetch the latest optimization run for one page: a summary of how many content blocks were transformed / enriched / removed, the optimized token total, and every block's before/after content.

By default only **reviewed** runs are returned (`completed`, `staged`, `deployed`, `acknowledged`) — i.e. optimizations a human accepted — not raw unreviewed optimizer output. Pass one or more `status` params to opt into other lifecycle states (e.g. `?status=pending`). Each chunk carries its own `status`, so a `rejected` block (its `after` was not accepted) is distinguishable from an `approved` one. Returns 404 when the page has no run in the requested statuses.

Pass `domain` (e.g. `us.example.com`) to pin the run to one site of the brand, so a path shared across sites resolves to the intended page.

## Path parameters

- `brand_id` integer, required

## Query parameters

- `path` string, required: The page path, e.g. `/about`.
- `status` string[], nullable: Restrict to these run statuses. Default: reviewed runs only.
- `domain` string, nullable: Scope to one site of the brand by host, e.g. `us.example.com`.

## Response `200`

Successful Response

- PathOptimization: Endpoint 2 response: a page's latest optimization run with before/after chunks.
  - `path` string, required
  - `status` 'pending' | 'completed' | 'staged' | 'deployed' | 'retired' | 'outdated' | 'acknowledged', required
  - `summary` OptimizationSummary, required: Per-category chunk counts and the optimized token total for a run.
    - `transformed` integer, required
    - `enriched` integer, required
    - `removed` integer, required
    - `tokens_after` integer, required
  - `chunks` OptimizationChunk[]
    - `id` string, required
    - `order` integer, required
    - `category` 'enriched' | 'transformed' | 'removed', nullable
    - `status` 'pending' | 'approved' | 'rejected', nullable
    - `before` ContentNode[]
      - `type` 'html'
      - `text` string, required
    - `after` ContentNode[]
      - `type` 'html'
      - `text` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-29** `a00f8154837e`: 1 info
  - added the new optional `query` request parameter `domain`
- **2026-09-17** `18ca42065270`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scrunchai/apis/scrunch-data-api/changes/:brand_id/site-optimization/optimization/get.md)

---

[API](https://skmtc.dev/scrunchai/apis/scrunch-data-api.md) - [All operations](https://skmtc.dev/scrunchai/apis/scrunch-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scrunchai/apis/scrunch-data-api/revisions/de4fc679600a?raw)
