site-optimization

Get Page Optimization Detail

Changed on

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.

get/{brand_id}/site-optimization/optimization

Request

  • Base URL
    https://api.scrunchai.com/v1
  • Auth
    HTTP bearer

Path parameters

brand_idinteger required

Query parameters

pathstring required

The page path, e.g. /about.

statusstring[] nullable

Restrict to these run statuses. Default: reviewed runs only.

domainstring nullable

Scope to one site of the brand by host, e.g. us.example.com.

Response

Successful Response

pathstring required
status'pending' | 'completed' | 'staged' | 'deployed' | 'retired' | 'outdated' | 'acknowledged' required

Changes