> 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 # ListPublishedSiteUrls # Package: siteUrls # Namespace: UrlsApi # Method link: https://dev.wix.com/docs/api-reference/business-management/site-urls/published-site-urls/list-published-site-urls.md ## Permission Scopes: Read Site URLs: SCOPE.DC-SITES.READ-URLS ## Introduction Retrieves a list of a site's published URLs. If a site hasn't been published, the call returns an empty array. --- ## REST API ### Schema ``` Method: listPublishedSiteUrls Description: Retrieves a list of a site's published URLs. If a site hasn't been published, the call returns an empty array. URL: https://www.wixapis.com/urls-server/v2/published-site-urls Method: GET Method parameters: param name: filters | type: Filters - name: urlType | type: UrlTypeFilter | description: URL type filter. Default: `ALL` - enum: - ALL: All URLs. - PREMIUM: Only URLs directing to the Premium version of the site. - FREE: Only URLs provided by Wix for free. These URLs include `wixsite.com`. - name: primary | type: boolean | description: Whether to return only the site's primary URL. - name: multilingual | type: boolean | description: Whether to return language subdomains hosted by [Wix Multilingual](https://support.wix.com/article/wix-multilingual-adding-and-setting-up-wix-multilingual). Return type: ListPublishedSiteUrlsResponse - name: urls | type: array | description: List of published site URLs. This array will be empty if the site isn't published. - name: urlType | type: UrlType | description: URL type. - enum: - UNKNOWN: Unknown URL type. - PREMIUM: Only URLs directing to the Premium version of the site. - FREE: Only URLs provided by Wix for free. These URLs include `wixsite.com`. - name: primary | type: boolean | description: Whether this is the site's primary URL. - name: url | type: string | description: Published site URL. - name: multilingualInfo | type: MultilingualInfo | description: Language subdomain info hosted by [Wix multilingual](https://support.wix.com/article/wix-multilingual-adding-and-setting-up-wix-multilingual). - name: languageCode | type: string | description: Language tag in [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) format. For example, `en-US`. - name: defaultLanguage | type: boolean | description: Whether this is the site's default language. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NO_PRIMARY_URL | Description: No primary URL exists for this site. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: MISSING_IDENTITY | Description: Can't extract identity from request. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNABLE_TO_EXTRACT_MS_ID | Description: Can't extract site GUID from request. ``` ### Examples ### List Published Site URLs ```curl curl -X GET \ 'https://www.wixapis.com/urls-server/v2/published-site-urls' \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.siteUrls.UrlsApi.listPublishedSiteUrls(options) Description: Retrieves a list of a site's published URLs. If a site hasn't been published, the call returns an empty array. Method parameters: param name: options | type: ListPublishedSiteUrlsOptions none - name: filters | type: Filters | description: Optional filters for the list. If this field is omitted, defaults to primary URLs of all URL types. - name: urlType | type: UrlTypeFilter | description: URL type filter. Default: `ALL` - enum: - ALL: All URLs. - PREMIUM: Only URLs directing to the Premium version of the site. - FREE: Only URLs provided by Wix for free. These URLs include `wixsite.com`. - name: primary | type: boolean | description: Whether to return only the site's primary URL. - name: multilingual | type: boolean | description: Whether to return language subdomains hosted by [Wix Multilingual](https://support.wix.com/article/wix-multilingual-adding-and-setting-up-wix-multilingual). Return type: PROMISE - name: urls | type: array | description: List of published site URLs. This array will be empty if the site isn't published. - name: urlType | type: UrlType | description: URL type. - enum: - UNKNOWN: Unknown URL type. - PREMIUM: Only URLs directing to the Premium version of the site. - FREE: Only URLs provided by Wix for free. These URLs include `wixsite.com`. - name: primary | type: boolean | description: Whether this is the site's primary URL. - name: url | type: string | description: Published site URL. - name: multilingualInfo | type: MultilingualInfo | description: Language subdomain info hosted by [Wix multilingual](https://support.wix.com/article/wix-multilingual-adding-and-setting-up-wix-multilingual). - name: languageCode | type: string | description: Language tag in [IETF BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) format. For example, `en-US`. - name: defaultLanguage | type: boolean | description: Whether this is the site's default language. Possible Errors: HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: NO_PRIMARY_URL | Description: No primary URL exists for this site. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: MISSING_IDENTITY | Description: Can't extract identity from request. HTTP Code: 400 | Status Code: INVALID_ARGUMENT | Application Code: UNABLE_TO_EXTRACT_MS_ID | Description: Can't extract site GUID from request. ``` ### Examples ### listPublishedSiteUrls ```javascript import { site } from '@wix/urls'; async function listPublishedSiteUrls(options) { const response = await site.listPublishedSiteUrls(options); }; ``` ### listPublishedSiteUrls (with elevated permissions) ```javascript import { site } from '@wix/urls'; import { auth } from '@wix/essentials'; async function myListPublishedSiteUrlsMethod(options) { const elevatedListPublishedSiteUrls = auth.elevate(site.listPublishedSiteUrls); const response = await elevatedListPublishedSiteUrls(options); } ``` ### listPublishedSiteUrls (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 { site } from '@wix/urls'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { site }, // Include the auth strategy and host as relevant }); async function listPublishedSiteUrls(options) { const response = await myWixClient.site.listPublishedSiteUrls(options); }; ``` ---