> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GenerateDescriptionSuggestions

# Package: seo

# Namespace: TagsSuggestionsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/seo/tag-suggestions-v1/generate-description-suggestions.md

## Permission Scopes:
View SEO Settings: SCOPE.PROMOTE.VIEW-SEO

## Introduction

Generates SEO description tag suggestions for a page.

Returns up to 10 ready-to-use meta description texts, based on the page
name, topic, page type, and the optional context fields. Suggestions aim
for the 130 to 165 character range that displays fully in search results.

The optional context fields (primary keyword, tone of voice, business
type, business location, and page content) are hints that may influence
the generated text; they aren't guaranteed to appear in it.

---

## REST API

### Schema

```
 Method: generateDescriptionSuggestions
 Description: Generates SEO description tag suggestions for a page.  Returns up to 10 ready-to-use meta description texts, based on the page name, topic, page type, and the optional context fields. Suggestions aim for the 130 to 165 character range that displays fully in search results.  The optional context fields (primary keyword, tone of voice, business type, business location, and page content) are hints that may influence the generated text; they aren't guaranteed to appear in it.
 URL: https://www.wixapis.com/seo/suggestions/v1/tag-suggestions/description
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  pageName, topic
 Method parameters: 
   param name: businessLocation | type: businessLocation | description: Location of the business, for location-aware phrasing. Optional hint.  | validation: maxLength 1000
   param name: businessType | type: businessType | description: Type of business the site is for. Optional hint.  | validation: maxLength 1000
   param name: pageContent | type: pageContent | description: Text content of the page, to ground the description in what the page actually says. Send page content only. Don't include personal data. Optional hint.  | validation: maxLength 100000
   param name: pageName | type: pageName | description: Name of the page, as shown in the site's menu or page list. | required: true | validation: minLength 1, maxLength 1000
   param name: pageType | type: PageType | description: Kind of page the suggestion is for. Helps the AI phrase the suggestion for the page's purpose.  
      - enum:
           UNKNOWN_PAGE_TYPE - Unknown page type.
           WEBSITE_PAGE - A general site page. This is the default when no page type is passed.
           HOMEPAGE - The site's homepage.
           BLOG_POST - A blog post.
           BLOG_CATEGORY_PAGE - A blog category page.
           BLOG_TAGS_PAGE - A blog tags page.
           PRODUCT_PAGE - A store product details page.
           PRODUCT_CATEGORY_PAGE - A store product category or collection page.
           SERVICE_BOOKING_PAGE - A service booking page.
           EVENT_PAGE - An event details page.
           RESTAURANT_MENU_PAGE - A restaurant menu page.
           RESTAURANT_MENU_ITEM_PAGE - A restaurant menu item page.
           ONLINE_PROGRAM_PAGE - An online program page.
           PORTFOLIO_COLLECTION_PAGE - A portfolio collection page.
           PORTFOLIO_PROJECT_PAGE - A portfolio project page.
           TABLE_RESERVATIONS_PAGE - A table reservations page.
           OTHER_APP_PAGE - A page of another Wix app.
   param name: primaryKeyword | type: primaryKeyword | description: Primary keyword the page targets. When passed, suggestions try to feature it. Optional hint.  | validation: maxLength 1000
   param name: toneOfVoice | type: toneOfVoice | description: Tone of voice for the generated text, for example, `friendly` or `professional`. Optional hint.  | validation: maxLength 1000
   param name: topic | type: topic | description: What the page is about, for example, the product name for a product page, or the article subject for a blog post. | required: true | validation: minLength 1, maxLength 1000
 Return type: GenerateDescriptionSuggestionsResponse
  - name: tagSuggestions | type: TagSuggestions | description: The generated description tag suggestions.  
     - name: suggestions | type: array<string> | description: Suggested tag texts, best match first.  | read-only: true | validation: maxItems 10, maxLength 1000

 Possible Errors:
   HTTP Code: 429 | Status Code: RESOURCE_EXHAUSTED | Application Code: QUOTA_LIMIT_REACHED | Description: The caller's generation quota is exhausted. Reserved for future metering and not currently returned.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: GENERATION_FAILED | Description: The AI generation pipeline failed. Retry the call.


```

### Examples

### Generate description tag suggestions for a product page
The optional hints give the AI context about the business and the page's content.

```curl
curl -X POST \
'https://www.wixapis.com/seo/suggestions/v1/tag-suggestions/description' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "pageType": "PRODUCT_PAGE",
  "pageName": "Handmade Ceramic Mugs",
  "topic": "Handmade ceramic coffee mugs",
  "primaryKeyword": "handmade ceramic mugs",
  "toneOfVoice": "friendly",
  "businessType": "Pottery studio",
  "businessLocation": "Portland, Oregon",
  "pageContent": "Each mug is wheel-thrown and glazed by hand in our Portland studio. Dishwasher and microwave safe. Ships within 3 days."
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.seo.tagSuggestions.generateDescriptionSuggestions(options)
 Description: Generates SEO description tag suggestions for a page.  Returns up to 10 ready-to-use meta description texts, based on the page name, topic, page type, and the optional context fields. Suggestions aim for the 130 to 165 character range that displays fully in search results.  The optional context fields (primary keyword, tone of voice, business type, business location, and page content) are hints that may influence the generated text; they aren't guaranteed to appear in it.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  options.pageName, options.topic, options
 Method parameters: 
   param name: options | type: GenerateDescriptionSuggestionsOptions  none | required: true 
        - name: pageType | type: PageType | description: Kind of page the description is for.  Default: `WEBSITE_PAGE`.  
             - enum:
             -     UNKNOWN_PAGE_TYPE: Unknown page type.
             -     WEBSITE_PAGE: A general site page. This is the default when no page type is passed.
             -     HOMEPAGE: The site's homepage.
             -     BLOG_POST: A blog post.
             -     BLOG_CATEGORY_PAGE: A blog category page.
             -     BLOG_TAGS_PAGE: A blog tags page.
             -     PRODUCT_PAGE: A store product details page.
             -     PRODUCT_CATEGORY_PAGE: A store product category or collection page.
             -     SERVICE_BOOKING_PAGE: A service booking page.
             -     EVENT_PAGE: An event details page.
             -     RESTAURANT_MENU_PAGE: A restaurant menu page.
             -     RESTAURANT_MENU_ITEM_PAGE: A restaurant menu item page.
             -     ONLINE_PROGRAM_PAGE: An online program page.
             -     PORTFOLIO_COLLECTION_PAGE: A portfolio collection page.
             -     PORTFOLIO_PROJECT_PAGE: A portfolio project page.
             -     TABLE_RESERVATIONS_PAGE: A table reservations page.
             -     OTHER_APP_PAGE: A page of another Wix app.
        - name: pageName | type: string | description: Name of the page, as shown in the site's menu or page list. | required: true | validation: minLength 1, maxLength 1000
        - name: topic | type: string | description: What the page is about, for example, the product name for a product page, or the article subject for a blog post. | required: true | validation: minLength 1, maxLength 1000
        - name: primaryKeyword | type: string | description: Primary keyword the page targets. When passed, suggestions try to feature it. Optional hint.  | validation: maxLength 1000
        - name: toneOfVoice | type: string | description: Tone of voice for the generated text, for example, `friendly` or `professional`. Optional hint.  | validation: maxLength 1000
        - name: businessType | type: string | description: Type of business the site is for. Optional hint.  | validation: maxLength 1000
        - name: businessLocation | type: string | description: Location of the business, for location-aware phrasing. Optional hint.  | validation: maxLength 1000
        - name: pageContent | type: string | description: Text content of the page, to ground the description in what the page actually says. Send page content only. Don't include personal data. Optional hint.  | validation: maxLength 100000
 Return type: PROMISE<GenerateDescriptionSuggestionsResponse>
  - name: tagSuggestions | type: TagSuggestions | description: The generated description tag suggestions.  
     - name: suggestions | type: array<string> | description: Suggested tag texts, best match first.  | read-only: true | validation: maxItems 10, maxLength 1000

 Possible Errors:
   HTTP Code: 429 | Status Code: RESOURCE_EXHAUSTED | Application Code: QUOTA_LIMIT_REACHED | Description: The caller's generation quota is exhausted. Reserved for future metering and not currently returned.
   HTTP Code: 500 | Status Code: INTERNAL | Application Code: GENERATION_FAILED | Description: The AI generation pipeline failed. Retry the call.


```

### Examples

### Generate description tag suggestions for a product page
The optional hints give the AI context about the business and the page's content.

```javascript
import { tagSuggestions } from "@wix/seo";

async function generateDescriptionSuggestions() {
  const response = await tagSuggestions.generateDescriptionSuggestions({
    pageType: "PRODUCT_PAGE",
    pageName: "Handmade Ceramic Mugs",
    topic: "Handmade ceramic coffee mugs",
    primaryKeyword: "handmade ceramic mugs",
    toneOfVoice: "friendly",
    businessType: "Pottery studio",
    businessLocation: "Portland, Oregon",
    pageContent:
      "Each mug is wheel-thrown and glazed by hand in our Portland studio. Dishwasher and microwave safe. Ships within 3 days.",
  });
}

/* Promise resolves to:
 * {
 *   "tagSuggestions": {
 *     "suggestions": [
 *       "Discover our handmade ceramic mugs, crafted in Portland. Each mug is unique, microwave & dishwasher safe. Shop handmade ceramic mugs now!",
 *       "Discover our handmade ceramic mugs, crafted in Portland, Oregon. Each unique piece is dishwasher safe. Shop now for handmade ceramic mugs!"
 *     ]
 *   }
 * }
 */

```

### generateDescriptionSuggestions (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { tagSuggestions } from '@wix/seo';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { tagSuggestions },
  // Include the auth strategy and host as relevant
});


async function generateDescriptionSuggestions(options) {
  const response = await myWixClient.tagSuggestions.generateDescriptionSuggestions(options);
};
```

---