> 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

# GenerateTitleSuggestions

# Package: seo

# Namespace: TagsSuggestionsService

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

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

## Introduction

Generates SEO title tag suggestions for a page.

Returns up to 10 ready-to-use title texts for the page, based on the page
name, page type, and primary keyword. Suggestions aim for the 45 to 65
character range that displays fully in search results.

---

## REST API

### Schema

```
 Method: generateTitleSuggestions
 Description: Generates SEO title tag suggestions for a page.  Returns up to 10 ready-to-use title texts for the page, based on the page name, page type, and primary keyword. Suggestions aim for the 45 to 65 character range that displays fully in search results.
 URL: https://www.wixapis.com/seo/suggestions/v1/tag-suggestions/title
 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
 Method parameters: 
   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.  | validation: maxLength 1000
 Return type: GenerateTitleSuggestionsResponse
  - name: tagSuggestions | type: TagSuggestions | description: The generated title 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 title tag suggestions for a product page
```curl
curl -X POST \
'https://www.wixapis.com/seo/suggestions/v1/tag-suggestions/title' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "pageType": "PRODUCT_PAGE",
  "pageName": "Handmade Ceramic Mugs",
  "primaryKeyword": "handmade ceramic mugs"
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.seo.tagSuggestions.generateTitleSuggestions(options)
 Description: Generates SEO title tag suggestions for a page.  Returns up to 10 ready-to-use title texts for the page, based on the page name, page type, and primary keyword. Suggestions aim for the 45 to 65 character range that displays fully in search results.
 # 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
 Method parameters: 
   param name: options | type: GenerateTitleSuggestionsOptions  none | required: true 
        - name: pageType | type: PageType | description: Kind of page the title 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: primaryKeyword | type: string | description: Primary keyword the page targets. When passed, suggestions try to feature it.  | validation: maxLength 1000
 Return type: PROMISE<GenerateTitleSuggestionsResponse>
  - name: tagSuggestions | type: TagSuggestions | description: The generated title 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 title tag suggestions for a product page
```javascript
import { tagSuggestions } from "@wix/seo";

async function generateTitleSuggestions() {
  const response = await tagSuggestions.generateTitleSuggestions({
    pageType: "PRODUCT_PAGE",
    pageName: "Handmade Ceramic Mugs",
    primaryKeyword: "handmade ceramic mugs",
  });
}

/* Promise resolves to:
 * {
 *   "tagSuggestions": {
 *     "suggestions": [
 *       "Handmade Ceramic Mugs - Unique Artisan Coffee Cups & Tea Mugs Online",
 *       "Handmade Ceramic Mugs | Unique Artisan Coffee Cups & Tea Mugs Online",
 *       "Handmade Ceramic Mugs - Unique Artisan Designs for Your Coffee Moments"
 *     ]
 *   }
 * }
 */

```

### generateTitleSuggestions (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 generateTitleSuggestions(options) {
  const response = await myWixClient.tagSuggestions.generateTitleSuggestions(options);
};
```

---