> 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

# GetSitemap

# Package: bingWebmasterTools

# Namespace: BwtService

# Method link: https://dev.wix.com/docs/api-reference/business-management/seo/bing-webmaster-tools/site-readiness-v1/get-sitemap.md

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

## Introduction

Retrieves one submitted sitemap, with Bing's processing details. When the
sitemap is a sitemap index, also returns the sitemaps it lists. To list
every sitemap submitted for the site, use List Sitemaps.

---

## REST API

### Schema

```
 Method: getSitemap
 Description: Retrieves one submitted sitemap, with Bing's processing details. When the sitemap is a sitemap index, also returns the sitemaps it lists. To list every sitemap submitted for the site, use List Sitemaps.
 URL: https://www.wixapis.com/gsc/connection/v1/bing/sitemap
 Method: GET
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  sitemapUrl
 Method parameters: 
   query param name: sitemapUrl | type: sitemapUrl | description: Full URL of the sitemap, as submitted. | required: true | validation: format WEB_URL
 Return type: GetSitemapResponse
  - name: sitemap | type: Sitemap | description: The requested sitemap, with Bing's processing details.  
     - name: url | type: string | description: URL of the sitemap.  | read-only: true | validation: maxLength 2000
     - name: type | type: string | description: Type of the sitemap, in Bing's vocabulary. For example, `Sitemap` or `Sitemap Index`. Unset when Bing doesn't report it.  | read-only: true | validation: maxLength 100
     - name: status | type: string | description: Bing's processing status of the sitemap, in Bing's vocabulary. For example, `Success` or `Pending`. Unset when Bing doesn't report it.  | read-only: true | validation: maxLength 100
     - name: submittedDate | type: string | description: Date and time the sitemap was submitted.  | read-only: true | validation: format date-time
     - name: lastCrawledDate | type: string | description: Date and time Bing last crawled the sitemap.  | read-only: true | validation: format date-time
     - name: urlCount | type: string | description: Number of URLs in the sitemap. Unset when Bing doesn't report it.  | read-only: true | validation: format int64
     - name: fileSize | type: string | description: Size of the sitemap file in bytes. Unset when Bing doesn't report it.  | read-only: true | validation: format int64
     - name: compressed | type: boolean | description: Whether the sitemap file is compressed. Unset when Bing doesn't report it.  | read-only: true 
  - name: childSitemaps | type: array<Sitemap> | description: The sitemaps listed by the requested sitemap, when it's a sitemap index, with Bing's processing details for each. Empty for a sitemap that isn't an index.  | validation: maxItems 1000

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: SITEMAP_NOT_FOUND | Description: Couldn't find the sitemap. Check that `sitemapUrl` matches a sitemap returned by List Sitemaps.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: MISSING_TOKEN | Description: No Bing account is connected for this site. Connect one with the BWT Connection API first.
   HTTP Code: 429 | Status Code: RESOURCE_EXHAUSTED | Application Code: BING_QUOTA_EXCEEDED | Description: Bing throttled the request. Retry after the throttling window.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: BING_UNAVAILABLE | Description: Bing answered with a temporary server error. Retry with backoff.


```

### Examples

### Get Sitemap
```curl
curl -X GET \
'https://www.wixapis.com/bwt/v1/bing/sitemap?sitemapUrl=https%3A%2F%2Fwww.my-fashion-store.com%2Fsitemap.xml' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.bwt.siteReadiness.getSitemap(sitemapUrl)
 Description: Retrieves one submitted sitemap, with Bing's processing details. When the sitemap is a sitemap index, also returns the sitemaps it lists. To list every sitemap submitted for the site, use List Sitemaps.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  sitemapUrl
 Method parameters: 
   param name: sitemapUrl | type: string | description: Full URL of the sitemap, as submitted. | required: true | validation: format WEB_URL
 Return type: PROMISE<GetSitemapResponse>
  - name: sitemap | type: Sitemap | description: The requested sitemap, with Bing's processing details.  
     - name: url | type: string | description: URL of the sitemap.  | read-only: true | validation: maxLength 2000
     - name: type | type: string | description: Type of the sitemap, in Bing's vocabulary. For example, `Sitemap` or `Sitemap Index`. Unset when Bing doesn't report it.  | read-only: true | validation: maxLength 100
     - name: status | type: string | description: Bing's processing status of the sitemap, in Bing's vocabulary. For example, `Success` or `Pending`. Unset when Bing doesn't report it.  | read-only: true | validation: maxLength 100
     - name: submittedDate | type: Date | description: Date and time the sitemap was submitted.  | read-only: true 
     - name: lastCrawledDate | type: Date | description: Date and time Bing last crawled the sitemap.  | read-only: true 
     - name: urlCount | type: string | description: Number of URLs in the sitemap. Unset when Bing doesn't report it.  | read-only: true | validation: format int64
     - name: fileSize | type: string | description: Size of the sitemap file in bytes. Unset when Bing doesn't report it.  | read-only: true | validation: format int64
     - name: compressed | type: boolean | description: Whether the sitemap file is compressed. Unset when Bing doesn't report it.  | read-only: true 
  - name: childSitemaps | type: array<Sitemap> | description: The sitemaps listed by the requested sitemap, when it's a sitemap index, with Bing's processing details for each. Empty for a sitemap that isn't an index.  | validation: maxItems 1000

 Possible Errors:
   HTTP Code: 404 | Status Code: NOT_FOUND | Application Code: SITEMAP_NOT_FOUND | Description: Couldn't find the sitemap. Check that `sitemapUrl` matches a sitemap returned by List Sitemaps.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: MISSING_TOKEN | Description: No Bing account is connected for this site. Connect one with the BWT Connection API first.
   HTTP Code: 429 | Status Code: RESOURCE_EXHAUSTED | Application Code: BING_QUOTA_EXCEEDED | Description: Bing throttled the request. Retry after the throttling window.
   HTTP Code: 503 | Status Code: UNAVAILABLE | Application Code: BING_UNAVAILABLE | Description: Bing answered with a temporary server error. Retry with backoff.


```

### Examples

### Get one submitted sitemap and the sitemaps it lists
```javascript
import { siteReadiness } from "@wix/bwt";

async function getSitemap() {
  const response = await siteReadiness.getSitemap(
    "https://www.my-fashion-store.com/sitemap.xml"
  );
}

/* Promise resolves to:
 * {
 *   "sitemap": {
 *     "url": "https://www.my-fashion-store.com/sitemap.xml",
 *     "type": "Sitemap Index",
 *     "status": "Success",
 *     "submittedDate": "2026-10-13T10:47:12.000Z",
 *     "lastCrawledDate": "2026-10-14T03:21:40.000Z",
 *     "urlCount": "2",
 *     "fileSize": "1842",
 *     "compressed": false
 *   },
 *   "childSitemaps": [
 *     {
 *       "url": "https://www.my-fashion-store.com/pages-sitemap.xml",
 *       "type": "Sitemap",
 *       "status": "Success",
 *       "submittedDate": "2026-10-13T10:47:12.000Z",
 *       "lastCrawledDate": "2026-10-14T03:22:05.000Z",
 *       "urlCount": "12",
 *       "fileSize": "2310",
 *       "compressed": false
 *     },
 *     {
 *       "url": "https://www.my-fashion-store.com/store-products-sitemap.xml",
 *       "type": "Sitemap",
 *       "status": "Success",
 *       "submittedDate": "2026-10-13T10:47:12.000Z",
 *       "lastCrawledDate": "2026-10-14T03:22:09.000Z",
 *       "urlCount": "48",
 *       "fileSize": "9127",
 *       "compressed": false
 *     }
 *   ]
 * }
 */

```

### getSitemap (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 { siteReadiness } from '@wix/bwt';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function getSitemap(sitemapUrl) {
  const response = await myWixClient.siteReadiness.getSitemap(sitemapUrl);
};
```

---