The Page Optimization API generates AI-powered, whole-page SEO suggestions for a page of a Wix site: a rewritten title tag, description tag, headings, and body text. Each suggestion is a before/after pair against the page's current content, aimed at the page's focus keyword.
With the Page Optimization API, you can:
Generation is asynchronous. Trigger Page Optimization or Trigger Home Page Optimization starts a generation job and returns a predictionId. Poll Get Page Optimization Results until status is COMPLETED. Generation typically takes under 2 minutes.
The job reads the page from the site's latest saved revision, so unpublished changes are included and the site doesn't need to be published. To analyze the page, a temporary preview deployment of that saved revision is created on the site and removed automatically after 30 minutes. The site's editor content and live version are never modified.
Optimization targets the page's focus keyword, which is read from the page's SEO settings. Set it before triggering, for example with the Item SEO Tags API. A page without a focus keyword can't be optimized.
It's important to note the following points before starting to code:
FOCUS_KEYWORD_NOT_SET.SITE_NOT_SUPPORTED.predictionId can be looked up for 2 hours after its trigger. Look up by pageId to get the page's latest suggestions at any time.predictionId, unless the page's focus keyword changed since the job started, which fails with SUGGESTIONS_ALREADY_IN_PROGRESS.predictionId. A job is IN_PROGRESS, COMPLETED, or FAILED.before is the page's current text and after the suggested replacement. before is empty when the page has no text in that slot, such as a missing meta description.<title> element and meta description, shown in search results.Last updated: 9 September 2026