Skip to main content
object

The entry point for all Storefront API queries. Provides access to shop resources including products, collections, carts, and customer data, as well as content like articles and pages. This query acts as the public, top-level type from which all queries must start.

Use individual queries like product or collection to fetch specific resources by ID or handle. Use plural queries like products or collections to retrieve paginated lists with optional filtering and sorting. The search and predictiveSearch queries enable storefront search functionality.

Explore queries interactively with the GraphiQL explorer and sample query kit.

•Article

Returns an Article by its ID. Each article belongs to a Blog and includes content in both plain text and HTML formats, ArticleAuthor information, Comment objects, tags, and SEO data.

Arguments

•ID!
required

The ID of the Article.


•ArticleConnection!
non-null

Returns a paginated list of Article objects from the shop's Blog objects. Each article is a blog post containing content, author information, tags, and optional images.

Use the query argument to filter results by author, blog title, tags, or date fields. Sort results using the sortKey argument and reverse them with the reverse argument.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•ArticleSortKeys
Default:ID

Sort the underlying list by the given key.

•String

Apply one or multiple filters to the query. Refer to the detailed search syntax for more information about using filters.

•
Anchor to blog_title
•
Anchor to created_at
•
•
Anchor to tag_not
•
Anchor to updated_at
•

•Blog

Retrieves a Blog by its handle or ID. A blog organizes Article objects for the online store and includes author information, SEO settings, and custom Metafield objects.

Arguments

•String

The handle of the Blog.

•ID

The ID of the Blog.


•BlogConnection!
non-null

Returns a paginated list of the shop's Blog objects. Each blog serves as a container for Article objects.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•BlogSortKeys
Default:ID

Sort the underlying list by the given key.

•String

Apply one or multiple filters to the query. Refer to the detailed search syntax for more information about using filters.

Anchor to created_at
•
•
•
Anchor to updated_at
•

•Cart

Returns a Cart by its ID. The cart contains the merchandise lines a buyer intends to purchase, along with estimated costs, applied discounts, gift cards, and delivery options.

Use the checkoutUrl field to redirect buyers to Shopify's web checkout when they're ready to complete their purchase. For more information, refer to Manage a cart with the Storefront API.

Arguments

•ID!
required

The ID of the cart.


•Collection

Retrieves a single Collection by its ID or handle. Use the products field to access items in the collection.

Arguments

•ID

The ID of the Collection.

•String

The handle of the Collection.


•CollectionConnection!
non-null

Returns a paginated list of the shop's collections. Each Collection object includes a nested connection to its products.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•CollectionSortKeys
Default:ID

Sort the underlying list by the given key.

•String

Apply one or multiple filters to the query. Refer to the detailed search syntax for more information about using filters.

Anchor to collection_type
•
•
Anchor to updated_at
•

•Customer

Retrieves the Customer associated with the provided access token. Use the customerAccessTokenCreate mutation to obtain an access token using legacy customer account authentication (email and password).

The returned customer includes data such as contact information, addresses, orders, and custom data associated with the customer.

Arguments

•String!
required

The customer access token.


•Localization!
non-null

Returns the shop's localization settings. Use this query to build country and language selectors for your storefront.

The country and language fields reflect the active localized experience. To change the context, use the @inContext directive with your desired country or language code.

•LocationConnection!
non-null

Returns shop locations that support in-store pickup. Use the near argument with GeoCoordinateInput to sort results by proximity to the customer's location.

When sorting by distance, set sortKey to DISTANCE and provide coordinates using the near argument.

Learn more about supporting local pickup on storefronts.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•LocationSortKeys
Default:ID

Sort the underlying list by the given key.

•GeoCoordinateInput

Used to sort results based on proximity to the provided location.


•Menu

Retrieves a Menu by its handle. Menus are hierarchical navigation structures that merchants configure for their storefront, such as header and footer navigation.

Each menu contains MenuItem objects that can nest up to three levels deep, with each item linking to collections, products, pages, blogs, or external URLs.

Arguments

•String!
required

The navigation menu's handle.


•Metaobject

Retrieves a single Metaobject by either its global ID or its handle.


Note

When using the handle, you must also provide the metaobject type because handles are only unique within a type.


Arguments

•ID

The ID of the metaobject.

•MetaobjectHandleInput

The handle and type of the metaobject.


•MetaobjectConnection!
non-null

Returns a paginated list of Metaobject entries for a specific type. Metaobjects are custom data structures that extend Shopify's data model with merchant-defined or app-defined content like size charts, product highlights, or custom sections.

The required type argument specifies which metaobject type to retrieve. You can sort results by id or updated_at using the sortKey argument.

Arguments

•String!
required

The type of metaobject to retrieve.

•String

The key of a field to sort with. Supports "id" and "updated_at".

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.


•Node

Retrieves any object that implements the Node interface by its globally-unique ID. Use inline fragments to access type-specific fields on the returned object.

This query follows the Relay specification and is commonly used for refetching objects when you have their ID but need updated data.

Arguments

•ID!
required

The ID of the Node to return.


•[Node]!
non-null

Retrieves multiple objects by their global IDs in a single request. Any object that implements the Node interface can be fetched, including products, collections, and pages.

Use inline fragments to access type-specific fields on the returned objects. The input accepts up to 250 IDs.

Arguments

•[ID!]!
required

The IDs of the Nodes to return.

The input must not contain more than 250 values.


•Page

Retrieves a Page by its handle or id. Pages are static content pages that merchants display outside their product catalog, such as "About Us," "Contact," or policy pages.

The returned page includes information such as the HTML body content, SEO information, and any associated Metafield objects.

Arguments

•String

The handle of the Page.

•ID

The ID of the Page.


•PageConnection!
non-null

Returns a paginated list of the shop's content pages. Pages are custom HTML content like "About Us", "Contact", or policy information that merchants display outside their product catalog.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•PageSortKeys
Default:ID

Sort the underlying list by the given key.

•String

Apply one or multiple filters to the query. Refer to the detailed search syntax for more information about using filters.

Anchor to created_at
•
•
•
Anchor to updated_at
•

•PaymentSettings!
non-null

Settings related to payments.

•PredictiveSearchResult

Returns suggested results as customers type in a search field, enabling type-ahead search experiences. The query matches products, collections, pages, and articles based on partial search terms, and also provides search query suggestions to help customers refine their search.

You can filter results by resource type and limit the quantity. The limitScope argument controls whether limits apply across all result types or per type. Use unavailableProducts to control how out-of-stock products appear in results.

Arguments

•Int

Limits the number of results based on limit_scope. The value can range from 1 to 10, and the default is 10.

•PredictiveSearchLimitScope

Decides the distribution of results.

•String!
required

The search query.

•[SearchableField!]

Specifies the list of resource fields to use for search. The default fields searched on are TITLE, PRODUCT_TYPE, VARIANT_TITLE, and VENDOR. For the best search experience, you should search on the default field set.

The input must not contain more than 250 values.

•[PredictiveSearchType!]

The types of resources to search for.

The input must not contain more than 250 values.

•SearchUnavailableProductsType

Specifies how unavailable products are displayed in the search results.


•Product

Retrieves a single Product by its ID or handle. Use this query to build product detail pages, access variant and pricing information, or fetch product media and metafields. See some examples of querying products.

Arguments

•ID

The ID of the Product.

•String

The handle of the Product.


Anchor to productRecommendationsproductRecommendations
•[Product!]

Returns recommended products for a given product, identified by either ID or handle. Use the intent argument to control the recommendation strategy.

Shopify auto-generates related recommendations based on sales data, product descriptions, and collection relationships. Complementary recommendations require manual configuration through the Shopify Search & Discovery app. Returns up to ten Product objects.

Arguments

•ID

The id of the product.

•String

The handle of the product.

•ProductRecommendationIntent
Default:RELATED

The recommendation intent that is used to generate product recommendations. You can use intent to generate product recommendations on various pages across the channels, according to different strategies.


•ProductConnection!
non-null

Returns a paginated list of the shop's products.

For full-text storefront search, use the search query instead.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•ProductSortKeys
Default:ID

Sort the underlying list by the given key.

•String

You can apply one or multiple filters to a query. Learn more about Shopify API search syntax.

Anchor to available_for_sale
•

Filter by products that have at least one product variant available for sale.

Anchor to created_at
•

Filter by the date and time when the product was created.

Example:

  • created_at:>'2020-10-21T23:39:20Z'
  • created_at:<now
  • created_at:<=2024
Anchor to product_type
•

Filter by a comma-separated list of product types.

Example:

  • product_type:snowboard
•

Filter products by the product tags field.

Example:

  • tag:my_tag
Anchor to tag_not
•

Filter by products that don't have the specified product tags.

Example:

  • tag_not:my_tag
•

Filter by the product title field.

Example:

  • title:The Minimal Snowboard
Anchor to updated_at
•

Filter by the date and time when the product was last updated.

Example:

  • updated_at:>'2020-10-21T23:39:20Z'
  • updated_at:<now
  • updated_at:<=2024
Anchor to variants.price
•

Filter by the price of the product's variants.

•

Filter by the product vendor field.

Example:

  • vendor:Snowdevil
  • vendor:Snowdevil OR vendor:Icedevil

•StringConnection!
non-null

Returns a paginated list of all tags that have been added to products in the shop. Useful for building tag-based product filtering or navigation in a storefront.

Arguments

•Int!
required

Returns up to the first n elements from the list.


•StringConnection!
non-null

Returns a list of product types from the shop's Product objects that are published to your app. Use this query to build filtering interfaces or navigation menus based on product categorization.

Arguments

•Int!
required

Returns up to the first n elements from the list.


•[ApiVersion!]!
non-null

Returns all public Storefront API versions, including supported, release candidate, and unstable versions.

•SearchResultItemConnection!
non-null

Returns paginated search results for Product, Page, and Article resources based on a query string. Results are sorted by relevance by default.

The response includes the total result count and available product filters for building faceted search interfaces. Use the prefix argument to enable partial word matching on the last search term, allowing queries like "winter snow" to match "snowboard" or "snowshoe".

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•SearchSortKeys
Default:RELEVANCE

Sort the underlying list by the given key.

•String!
required

The search query.

•SearchPrefixQueryType

Specifies whether to perform a partial word match on the last search term.

•[ProductFilter!]

Returns a subset of products matching all product filters.

The input must not contain more than 250 values.

•[SearchType!]

The types of resources to search for.

The input must not contain more than 250 values.

•SearchUnavailableProductsType

Specifies how unavailable products or variants are displayed in the search results.


•Shop!
non-null

Returns the Shop associated with the storefront access token. The Shop object provides general store information such as the shop name, description, and primary domain.

Use this query to access data like store policies, PaymentSettings, Brand configuration, and shipping destinations. It also exposes ShopPayInstallmentsPricing and SocialLoginProvider options for customer accounts.

•Sitemap!
non-null

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, Collection, Page, and 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 to determine if more pages are available.

Arguments

•SitemapType!
required

The type of the resource for the sitemap.


•UrlRedirectConnection!
non-null

Returns a paginated list of UrlRedirect objects configured for the shop. Each redirect maps an old path to a target location.

Arguments

•Int

Returns up to the first n elements from the list.

•String

Returns the elements that come after the specified cursor.

•Int

Returns up to the last n elements from the list.

•String

Returns the elements that come before the specified cursor.

•Boolean
Default:false

Reverse the order of the underlying list.

•String

Apply one or multiple filters to the query. Refer to the detailed search syntax for more information about using filters.

Anchor to created_at
•
•
•

Deprecated fields

•Blog
Deprecated

Arguments

•String!
required

The handle of the blog.


•Collection
Deprecated

Arguments

•String!
required

The handle of the collection.


•Page
Deprecated

Arguments

•String!
required

The handle of the page.


•Product
Deprecated

Arguments

•String!
required

A unique, human-readable string of the product's title. A handle can contain letters, hyphens (-), and numbers, but no spaces. The handle is used in the online store URL for the product.



Was this section helpful?