Skip to main content

Overview

Agent Pages are kept fresh automatically: Scrunch checks your pages on a schedule and re-optimizes the ones that changed. Force Refresh lets you skip the wait. It refetches the pages you name from your live site, then re-optimizes and republishes them whether or not they changed. Use it right after you publish a change on your site, so AI agents see the new version as soon as possible.

When to use Force Refresh

Use this API when you need to:
  • Push a content update, correction, or pricing change to agents right after it goes live on your site.
  • Refresh a set of pages after a deploy, from your CI or CMS publish hook.
  • Re-run optimization on a page you believe is out of date.
Force Refresh only refreshes pages that already have an active Agent Page. New pages are picked up by the regular crawl.

Endpoint

The endpoint requires a bearer token with the optimize scope. See Authentication.

Request

Path rules

  • Each path is trimmed and can be up to 2,048 characters.
  • Paths must be site-relative. Full URLs (https://example.com/pricing) and protocol-relative URLs (//example.com/pricing) are rejected with a 422.
  • Paths are normalized the same way Agent Pages are stored: lowercased, with the trailing slash and query string dropped. Duplicates after normalization are merged, keeping the first.
  • / is the homepage.

Response

The endpoint returns 202 Accepted: refreshes run in the background after the response. The body holds one result per requested path, in request order, and the brand’s remaining quota.

Outcome values

Only queued paths count toward any limit.

Limits

The hourly and daily quotas are shared by all of a brand’s sites. Queued refreshes run a few at a time per site, so a batch of 100 completes over several minutes rather than instantly.

Example: refresh pages after a deploy

Response:

Errors

A path that is in cooldown, not found, or excluded doesn’t cause an error: the request still returns 202 with those outcomes.

Best practices

  • Refresh only what changed. Send the paths your deploy touched rather than your whole site; the scheduled checks already cover everything else.
  • Retry safely. Re-sending a path within 5 minutes returns cooldown and uses no quota.
  • Respect the quota. On rate_limited or 429, wait for quota.*.resets_at or the Retry-After header before sending more.
  • Send one request at a time per brand. Requests for the same brand are processed one at a time; a request sent while another is in progress gets 429 with Retry-After: 1. Batch paths into one request (up to 100) rather than sending many single-path requests in parallel.
  • Don’t poll for completion yet. queued means the refresh was accepted, not that it finished. Allow a few minutes for a batch to republish.