> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# SuggestDomains

# Package: domainSearch

# Namespace: DomainSearchService

# Method link: https://dev.wix.com/docs/api-reference/account-level/domains/domain-search/suggestion-v2/suggest-domains.md

## Permission Scopes:
Manage Domains: SCOPE.ACC-DC-PREMIUM.MANAGE-DOMAINS

## Introduction

Suggests domains that are available for purchase, based on the provided
`query` input.


You may use this endpoint to get inspired and then call
[Check Domain Availability](https://dev.wix.com/api/rest/account-level-apis/domain-search/check-domain-availability)
to check whether a specific variation of the suggestions is also available
for purchsase.

The `tlds` must not include the dot. For example, `com` and not `.com`.

> __Important:__ This call requires an account level API key and cannot be authenticated with the standard authorization header.

---

## REST API

### Schema

```
 Method: suggestDomains
 Description: Suggests domains that are available for purchase, based on the provided `query` input.   You may use this endpoint to get inspired and then call [Check Domain Availability](https://dev.wix.com/api/rest/account-level-apis/domain-search/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchsase.  The `tlds` must not include the dot. For example, `com` and not `.com`.  > __Important:__ This call requires an account level API key and cannot be authenticated with the standard authorization header.
 URL: https://www.wixapis.com/domain-search/v2/suggest-domains
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   query param name: limit | type: limit | description: Number of domain suggestions to return. __Deprecated__: This field will be removed on March 1, 2025. Use `paging.limit` instead.  Min: `1` Max: `20` Default: `10`  | validation: minimum 1, maximum 20, format int32
   query param name: maxLength | type: maxLength | description: Maximum number of characters for the domain name, excluding the TLD.  Min: `3` Max: `63` Default: `63`  | validation: minimum 3, maximum 63, format int32
   param name: paging | type: CursorPaging    
        - name: limit | type: integer | description: Maximum number of domains to return in the results.  Min: `0` Max: `50`  | validation: minimum 1, maximum 50, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: minLength 0, maxLength 10000
   query param name: query | type: query | description: Input to base your domain suggestions on. May include letters, numbers, spaces, dots, and hyphens. Must not include the TLD.  Min: 1 characters Max: 100 characters | required: true | validation: minLength 1, maxLength 100
   query param name: tlds | type: array<tlds> | description: [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must not include the dot. For example, `com`, not `.com`. Not all TLDs can be connected to Wix sites. Supported TLDS include `com`, `net`, and `org`. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.  Max: 10 TLDs  | validation: minItems 0, maxItems 10, maxLength 63
 Return type: SuggestDomainsResponse
  - name: suggestions | type: array<DomainSuggestion> | description: List of suggested available domains.  
     - name: domain | type: string | description: Suggested domain name including TLD.  | validation: format HOSTNAME
     - name: premium | type: boolean | description: Whether the domain has a higher price due to its perceived value or demand.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Metadata about the returned list of suggested domains.  
     - name: count | type: integer | description: Number of domains returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  
     - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page.  


```

### Examples

### Retrieve suggestions for available domains.
```curl
curl -X GET 
'https://www.wixapis.com/domain-search/v2/suggest-domains?query=my%20stunning%20domain&paging.limit=4&tlds=com&tlds=love' \
-H 'Authorization: <AUTH>' \
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.domains.domainSuggestions.suggestDomains(query, options)
 Description: Suggests domains that are available for purchase, based on the provided `query` input.   You may use this endpoint to get inspired and then call [Check Domain Availability](https://dev.wix.com/api/rest/account-level-apis/domain-search/check-domain-availability) to check whether a specific variation of the suggestions is also available for purchsase.  The `tlds` must not include the dot. For example, `com` and not `.com`.  > __Important:__ This call requires an account level API key and cannot be authenticated with the standard authorization header.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  query
 Method parameters: 
   param name: query | type: string | description: Input to base your domain suggestions on. May include letters, numbers, spaces, dots, and hyphens. Must not include the TLD.  Min: 1 characters Max: 100 characters | required: true | validation: minLength 1, maxLength 100
   param name: options | type: SuggestDomainsOptions  none  
        - name: tlds | type: array<string> | description: [Top-level domains](https://en.wikipedia.org/wiki/Top-level_domain). Must not include the dot. For example, `com`, not `.com`. Not all TLDs can be connected to Wix sites. Supported TLDS include `com`, `net`, and `org`. Contact the [Wix B2B sales team](mailto:bizdev@wix.com) for more information.  Max: 10 TLDs  | validation: minItems 0, maxItems 10, maxLength 63
        - name: paging | type: CursorPaging | description: Cursor paging options.  
           - name: limit | type: integer | description: Maximum number of domains to return in the results.  Min: `0` Max: `50`  | validation: minimum 1, maximum 50, format int32
           - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: minLength 0, maxLength 10000
        - name: maxLength | type: integer | description: Maximum number of characters for the domain name, excluding the TLD.  Min: `3` Max: `63` Default: `63`  | validation: minimum 3, maximum 63, format int32
 Return type: PROMISE<SuggestDomainsResponse>
  - name: suggestions | type: array<DomainSuggestion> | description: List of suggested available domains.  
     - name: domain | type: string | description: Suggested domain name including TLD.  | validation: format HOSTNAME
     - name: premium | type: boolean | description: Whether the domain has a higher price due to its perceived value or demand.  
  - name: pagingMetadata | type: CursorPagingMetadata | description: Metadata about the returned list of suggested domains.  
     - name: count | type: integer | description: Number of domains returned in the response.  | validation: format int32
     - name: cursors | type: Cursors | description: Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used.  
        - name: next | type: string | description: Cursor pointing to next page in the list of results.  
        - name: prev | type: string | description: Cursor pointing to previous page in the list of results.  
     - name: hasNext | type: boolean | description: Indicates if there are more results after the current page. If `true`, another page of results can be retrieved. If `false`, this is the last page.  


```

### Examples

### Suggest domains with an API Key
```javascript
import { createClient, ApiKeyStrategy } from "@wix/sdk";
import { domainSuggestions } from "@wix/domains";

const wixClient = createClient({
  modules: { domainSuggestions },
  auth: ApiKeyStrategy({
    siteId: "MY-SITE-ID",
    apiKey: "MY-API-KEY",
  }),
});

async function suggestDomains(query, options) {
  const response = await domainSuggestions.suggestDomains(query, options);
}

```

### suggestDomains (self-managed)
Self-managed 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 { domainSuggestions } from '@wix/domains';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function suggestDomains(query,options) {
  const response = await myWixClient.domainSuggestions.suggestDomains(query,options);
};
```

---