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 the images of Wix-managed items, such as store products or blog posts, one image at a time or up to 20 in a single call.
- 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 images of Wix-managed items only, such as a site page, a store product, or a blog post. Each image is identified by its Wix media URL and by the ID and type of the item it belongs to, and the item's stored SEO data gives the AI context about the image. Alt text can't be generated for an arbitrary image URL.
It's important to note the following points before starting to code:
- 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.
- Each method is limited to 5 requests per second per calling user, and each call has a time budget of 60 seconds. Calls over the rate limit are rejected, so retry them after a short delay.
- 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.
- Generate Heading Structure Suggestions must be called with a Wix user identity, for example an app acting on behalf of a signed-in site owner. It reads the page's title through the site's accessibility analysis, which runs as the user, so calls made with an API key fail. The other methods accept API keys.
- 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.
- Primary keyword: The search term the page targets. When you pass one, suggestions try to feature it.