This recipe guides you through searching for available domains, getting domain suggestions, and purchasing a domain to connect to a Wix site. Use this recipe when a user wants to buy a domain, find a domain, check domain availability, connect a domain to their site, or get a custom domain for their Wix site.
GET https://www.wixapis.com/domain-search/v2/check-domain-availabilityGET https://www.wixapis.com/domain-search/v2/suggest-domainsBefore searching for domains, gather information:
mybusiness.com)If the user has a specific domain in mind, check whether it's available for purchase.
Endpoint: GET https://www.wixapis.com/domain-search/v2/check-domain-availability
Query Parameters:
| Parameter | Description | Example |
|---|---|---|
domain | The full domain name including TLD | mybusiness.com |
Example Request:
Example Response:
| Field | Description |
|---|---|
domain | The domain that was checked |
available | true if available for purchase, false if taken |
premium | true if this is a premium-priced domain |
premiumType | Type of premium pricing (if applicable) |
domain field must include the TLD (e.g., mybusiness.com, not just mybusiness)DOMAINS_UNSUPPORTED_TLD error, inform the user and suggest supported alternativesManageWixSite tool)If the user wants alternatives, or if their preferred domain is unavailable, use the suggestions API.
Endpoint: GET https://www.wixapis.com/domain-search/v2/suggest-domains
Query Parameters:
| Parameter | Description | Example |
|---|---|---|
query | Keyword or domain to base suggestions on | mybusiness |
paging.limit | Number of suggestions to return | 10 |
tlds | Filter by specific TLDs (can be repeated). Do not include the dot. | com, net, org |
Example Request:
Example Request with TLD filter:
Example Response:
If pagingMetadata.hasNext is true, more suggestions are available. Use the cursors.next value to fetch the next page.
Show the suggestions in a clear format, highlighting:
.com for general, .me for personal branding, .shop/.store for e-commerce)Before generating a purchase link, ask the user which site they'd like to connect the domain to.
Use the ListWixSites tool to retrieve the user's sites and present them for selection. The user must pick a site, as the site ID is required for the purchase URL.
Once the user picks a domain and a target site, first verify availability using Step 2, then generate a purchase link.
Purchase URL format:
| Parameter | Description | Example |
|---|---|---|
{SITE_ID} | The Wix site ID (GUID) the domain will be connected to | 57d71937-e772-44ab-a89a-e4d0a7d9d814 |
{DOMAIN_NAME} | The chosen domain name including TLD | mybusiness.com |
Example:
Replace {SITE_ID} with the selected site's ID and {DOMAIN_NAME} with the user's chosen domain (e.g., ravitgonen.online).
Use the ListWixSites tool to list the user's sites and retrieve the site ID from the response.
| Error Code | Description | Action |
|---|---|---|
DOMAINS_UNSUPPORTED_TLD | The TLD is not supported by Wix | Inform the user and suggest supported TLDs using the Suggest Domains API |
access_denied | Authentication issue | Use account-level API authentication (not site-level) |
mysite.ioDOMAINS_UNSUPPORTED_TLD error.io is not supportedmysite → present alternativesmysite.onlinemysite.online is available → available: true57d71937-e772-44ab-a89a-e4d0a7d9d814)https://manage.wix.com/dashboard/57d71937-e772-44ab-a89a-e4d0a7d9d814/premium-express-checkout-app/storefront-bundle-selection?domainName=mysite.online&locale=en