--- title: sitemap - Storefront API description: | Returns sitemap data for a specific resource type, enabling headless storefronts to generate XML sitemaps for search engine optimization. The query provides a page count and paginated access to resources like [`Product`](/docs/api/storefront/2026-01/objects/Product), [`Collection`](/docs/api/storefront/2026-01/objects/Collection), [`Page`](/docs/api/storefront/2026-01/objects/Page), and [`Blog`](/docs/api/storefront/2026-01/objects/Blog) objects. When paginating through resources, the number of items per page varies from 0 to 250, and empty pages can occur without indicating the end of results. Always check [`hasNextPage`](/docs/api/storefront/2026-01/objects/PaginatedSitemapResources#field-PaginatedSitemapResources.fields.hasNextPage) to determine if more pages are available. api_version: 2026-01 api_name: storefront type: query api_type: graphql source_url: html: https://shopify.dev/docs/api/storefront/latest/queries/sitemap md: https://shopify.dev/docs/api/storefront/latest/queries/sitemap.md --- # sitemap query Returns sitemap data for a specific resource type, enabling headless storefronts to generate XML sitemaps for search engine optimization. The query provides a page count and paginated access to resources like [`Product`](https://shopify.dev/docs/api/storefront/2026-01/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/2026-01/objects/Collection), [`Page`](https://shopify.dev/docs/api/storefront/2026-01/objects/Page), and [`Blog`](https://shopify.dev/docs/api/storefront/2026-01/objects/Blog) objects. When paginating through resources, the number of items per page varies from 0 to 250, and empty pages can occur without indicating the end of results. Always check [`hasNextPage`](https://shopify.dev/docs/api/storefront/2026-01/objects/PaginatedSitemapResources#field-PaginatedSitemapResources.fields.hasNextPage) to determine if more pages are available. ## Arguments * type [Sitemap​Type!](https://shopify.dev/docs/api/storefront/latest/enums/SitemapType) required The type of the resource for the sitemap. *** ## Possible returns * Sitemap [Sitemap!](https://shopify.dev/docs/api/storefront/latest/objects/Sitemap) Contains all fields required to generate sitemaps. * pages​Count [Count](https://shopify.dev/docs/api/storefront/latest/objects/Count) The number of sitemap's pages for a given type. * resources [Paginated​Sitemap​Resources](https://shopify.dev/docs/api/storefront/latest/objects/PaginatedSitemapResources) A list of sitemap's resources for a given type. Important Notes: * The number of items per page varies from 0 to 250. * Empty pages (0 items) may occur and do not necessarily indicate the end of results. * Always check `hasNextPage` to determine if more pages are available. - page [Int!](https://shopify.dev/docs/api/storefront/latest/scalars/Int) required ### Arguments The page number to fetch. *** *** ## Examples * ### sitemap reference