---
title: Sitemap - Storefront API
description: Contains all fields required to generate sitemaps.
api_version: 2026-04
source_url:
  html: https://shopify.dev/docs/api/storefront/latest/objects/sitemap
  md: https://shopify.dev/docs/api/storefront/latest/objects/sitemap.md
---

# Sitemap

object

Contains all fields required to generate sitemaps.

## Fields

* 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.

  ***

***

## Map

No referencing types

***

## Queries

* [sitemap](https://shopify.dev/docs/api/storefront/latest/queries/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-04/objects/Product), [`Collection`](https://shopify.dev/docs/api/storefront/2026-04/objects/Collection), [`Page`](https://shopify.dev/docs/api/storefront/2026-04/objects/Page), and [`Blog`](https://shopify.dev/docs/api/storefront/2026-04/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-04/objects/PaginatedSitemapResources#field-PaginatedSitemapResources.fields.hasNextPage) to determine if more pages are available.

  * type

    [Sitemap​Type!](https://shopify.dev/docs/api/storefront/latest/enums/SitemapType)

    required

    ### Arguments

    The type of the resource for the sitemap.

  ***

***

## Sitemap Queries

### Queried by

* [sitemap](https://shopify.dev/docs/api/storefront/latest/queries/sitemap)