---
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
- TypeScript: <https://skmtc.dev/scrunch/apis/scrunch-data-api/docs/:brand_id/site-optimization/optimization/get.ts> (a function with typed inputs; its response is checked against the schema)

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.

## 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.

## 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-11-03** `e37811b6bc07`: 1 info
  - endpoint added

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

---

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