> 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 # SuggestDomains # Package: domainSearch # Namespace: DomainSearchService # Method link: https://dev.wix.com/docs/api-reference/account-level/domains/domain-search/suggestion-v2/suggest-domains.md ## 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` query param name: maxLength | type: maxLength | description: Maximum number of characters for the domain name, excluding the TLD. Min: `3` Max: `63` Default: `63` param name: paging | type: CursorPaging - name: limit | type: integer | description: Maximum number of domains to return in the results. Min: `0` Max: `20` - 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. 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 query param name: tlds | type: array | 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 Return type: SuggestDomainsResponse - name: suggestions | type: array | description: List of suggested available domains. - name: domain | type: string | description: Suggested domain name including TLD. - 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. - 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: ' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.domainSearch.DomainSearchService.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: options | type: SuggestDomainsOptions none - name: tlds | type: array | 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 - 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: `20` - 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. - name: maxLength | type: integer | description: Maximum number of characters for the domain name, excluding the TLD. Min: `3` Max: `63` Default: `63` 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 Return type: PROMISE - name: suggestions | type: array | description: List of suggested available domains. - name: domain | type: string | description: Suggested domain name including TLD. - 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. - 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-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 { 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); }; ``` ---