The Tag Suggestions API generates AI-powered SEO text for a site's pages: title tags, description tags, image alt text, and heading-level corrections. Each call returns ready-to-use suggestions that you can show to a site owner or apply to the page.
With the Tag Suggestions API, you can:
- Generate title tag and description tag suggestions for a page from its name, type, topic, and primary keyword.
- Generate alt text for Wix-hosted images, one image at a time or up to 20 in a single call. Pass the ID of the Wix item an image belongs to, such as a store product or blog post, to give the AI context.
- Check a page's heading hierarchy and get the heading level each heading should have.
The methods differ in where the AI gets its content:
- Generate Title Suggestions, Generate Description Suggestions, and Generate Heading Structure Suggestions work from the content you pass in the request. They work for any page, including pages of headless projects and pages hosted outside Wix. The site's name, language, and locale are read from the site to phrase the suggestions.
- Generate Alt Text Suggestions and Bulk Generate Alt Text Suggestions work on Wix-hosted images, such as
static.wixstatic.com URLs. Each image is identified by its Wix media URL. itemType names the kind of Wix item the images belong to, such as a site page, a store product, or a blog post. Passing the item's ID as parentItemId is optional but recommended: the item's stored SEO data gives the AI context about the image. Without it, alt text is generated from the image alone.
Suggestions are generated by AI for each call and aren't stored. There's no ID to retrieve them by later, and calling the same method twice may return different suggestions.
A call may return fewer suggestions than the documented maximum. The AI output is filtered before it's returned: duplicates, texts outside the target length, and texts that leave out the primary keyword are dropped. If no suggestion passes the filter, generation is retried once before the call fails with GENERATION_FAILED.
Suggestions are generated in the site's language. You can't request a different language.
It's important to note the following points before starting to code:
- Each call has a time budget of 60 seconds.
- Calls are rate limited. Calls over the limit are rejected with HTTP 429.
- Free-text fields, such as
pageContent, topic, and toneOfVoice, are sent to the AI model and written to service logs. Send page content only, and don't include personal data.
- Alt text is generated for images hosted on Wix media domains only, such as
static.wixstatic.com. Other image URLs are rejected with an INVALID_ARGUMENT error.
- All methods accept both a Wix user identity, for example an app acting on behalf of a signed-in site owner, and an API key.
- Title tag: The page's
<title> element, shown as the headline of a search result. Suggestions aim for 45 to 65 characters, which displays fully in search results.
- Description tag: The page's meta description, shown under the headline of a search result. Suggestions aim for 130 to 165 characters.
- Alt text: A short phrase that describes what an image depicts. It's used by screen readers, shown when the browser can't display the image, and read by search engines to understand what's on the page.
- Heading structure: The hierarchy of a page's H1 to H6 headings. A good structure has a single H1, no skipped levels, and headings that describe the content below them.
- Page type: The kind of page a suggestion is for, such as a homepage, blog post, or product page. It helps the AI phrase the suggestion for the page's purpose.
- Item type: Identifier of the kind of Wix item a page or image belongs to, such as
STATIC_PAGE_V2 for a regular site page or STORES_PRODUCT for a store product. For a site page this is STATIC_PAGE_V2, not the STATIC_PAGE value the Item SEO Tags API uses.
- Primary keyword: The search term the page targets. When you pass one, suggestions try to feature it.