--- title: QueryRoot - Storefront API description: >- The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. api_version: unstable api_name: storefront source_url: html: 'https://shopify.dev/docs/api/storefront/unstable/objects/QueryRoot' md: 'https://shopify.dev/docs/api/storefront/unstable/objects/QueryRoot.md' --- # Query​Root object The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. ## Fields * article [Article](https://shopify.dev/docs/api/storefront/unstable/objects/Article) Fetch a specific Article by its ID. * id [ID!](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) required ### Arguments The ID of the `Article`. *** * articles [Article​Connection!](https://shopify.dev/docs/api/storefront/unstable/connections/ArticleConnection) non-null List of the shop's articles. * first [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) ### Arguments Returns up to the first `n` elements from the list. * after [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come after the specified cursor. * last [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) Returns up to the last `n` elements from the list. * before [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come before the specified cursor. * reverse [Boolean](https://shopify.dev/docs/api/storefront/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Article​Sort​Keys](https://shopify.dev/docs/api/storefront/unstable/enums/ArticleSortKeys) Default:ID Sort the underlying list by the given key. * query [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Apply one or multiple filters to the query. Refer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters. * author * blog\_title * created\_at * tag * tag\_not * updated\_at *** * blog [Blog](https://shopify.dev/docs/api/storefront/unstable/objects/Blog) Fetch a specific `Blog` by one of its unique attributes. * handle [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) ### Arguments The handle of the `Blog`. * id [ID](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) The ID of the `Blog`. *** * blogs [Blog​Connection!](https://shopify.dev/docs/api/storefront/unstable/connections/BlogConnection) non-null List of the shop's blogs. * first [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) ### Arguments Returns up to the first `n` elements from the list. * after [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come after the specified cursor. * last [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) Returns up to the last `n` elements from the list. * before [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come before the specified cursor. * reverse [Boolean](https://shopify.dev/docs/api/storefront/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Blog​Sort​Keys](https://shopify.dev/docs/api/storefront/unstable/enums/BlogSortKeys) Default:ID Sort the underlying list by the given key. * query [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Apply one or multiple filters to the query. Refer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters. * created\_at * handle * title * updated\_at *** * cart [Cart](https://shopify.dev/docs/api/storefront/unstable/objects/Cart) Retrieve a cart by its ID. For more information, refer to [Manage a cart with the Storefront API](https://shopify.dev/custom-storefronts/cart/manage). * id [ID!](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) required ### Arguments The ID of the cart. *** * collection [Collection](https://shopify.dev/docs/api/storefront/unstable/objects/Collection) Fetch a specific `Collection` by one of its unique attributes. * id [ID](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) ### Arguments The ID of the `Collection`. * handle [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) The handle of the `Collection`. *** * collections [Collection​Connection!](https://shopify.dev/docs/api/storefront/unstable/connections/CollectionConnection) non-null List of the shop’s collections. * first [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) ### Arguments Returns up to the first `n` elements from the list. * after [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come after the specified cursor. * last [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) Returns up to the last `n` elements from the list. * before [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come before the specified cursor. * reverse [Boolean](https://shopify.dev/docs/api/storefront/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Collection​Sort​Keys](https://shopify.dev/docs/api/storefront/unstable/enums/CollectionSortKeys) Default:ID Sort the underlying list by the given key. * query [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Apply one or multiple filters to the query. Refer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters. * collection\_type * title * updated\_at *** * customer [Customer](https://shopify.dev/docs/api/storefront/unstable/objects/Customer) Token access required The customer associated with the given access token. Tokens are obtained by using the [`customerAccessTokenCreate` mutation](https://shopify.dev/docs/api/storefront/latest/mutations/customerAccessTokenCreate). * customer​Access​Token [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required ### Arguments The customer access token. *** * localization [Localization!](https://shopify.dev/docs/api/storefront/unstable/objects/Localization) non-null Returns the localized experiences configured for the shop. * locations [Location​Connection!](https://shopify.dev/docs/api/storefront/unstable/connections/LocationConnection) non-null List of the shop's locations that support in-store pickup. When sorting by distance, you must specify a location via the `near` argument. * first [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) ### Arguments Returns up to the first `n` elements from the list. * after [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come after the specified cursor. * last [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) Returns up to the last `n` elements from the list. * before [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come before the specified cursor. * reverse [Boolean](https://shopify.dev/docs/api/storefront/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Location​Sort​Keys](https://shopify.dev/docs/api/storefront/unstable/enums/LocationSortKeys) Default:ID Sort the underlying list by the given key. * near [Geo​Coordinate​Input](https://shopify.dev/docs/api/storefront/unstable/input-objects/GeoCoordinateInput) Used to sort results based on proximity to the provided location. *** * menu [Menu](https://shopify.dev/docs/api/storefront/unstable/objects/Menu) Token access required Retrieve a [navigation menu](https://help.shopify.com/manual/online-store/menus-and-links) by its handle. * handle [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required ### Arguments The navigation menu's handle. *** * metaobject [Metaobject](https://shopify.dev/docs/api/storefront/unstable/objects/Metaobject) Token access required Fetch a specific Metaobject by one of its unique identifiers. * id [ID](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) ### Arguments The ID of the metaobject. * handle [Metaobject​Handle​Input](https://shopify.dev/docs/api/storefront/unstable/input-objects/MetaobjectHandleInput) The handle and type of the metaobject. *** * metaobjects [Metaobject​Connection!](https://shopify.dev/docs/api/storefront/unstable/connections/MetaobjectConnection) non-null Token access required All active metaobjects for the shop. * type [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required ### Arguments The type of metaobject to retrieve. * sort​Key [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) The key of a field to sort with. Supports "id" and "updated\_at". * first [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) Returns up to the first `n` elements from the list. * after [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come after the specified cursor. * last [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) Returns up to the last `n` elements from the list. * before [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come before the specified cursor. * reverse [Boolean](https://shopify.dev/docs/api/storefront/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. *** * node [Node](https://shopify.dev/docs/api/storefront/unstable/interfaces/Node) Returns a specific node by ID. * id [ID!](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) required ### Arguments The ID of the Node to return. *** * nodes [\[Node\]!](https://shopify.dev/docs/api/storefront/unstable/interfaces/Node) non-null Returns the list of nodes with the given IDs. * ids [\[ID!\]!](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) required ### Arguments The IDs of the Nodes to return. The input must not contain more than `250` values. *** * page [Page](https://shopify.dev/docs/api/storefront/unstable/objects/Page) Fetch a specific `Page` by one of its unique attributes. * handle [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) ### Arguments The handle of the `Page`. * id [ID](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) The ID of the `Page`. *** * pages [Page​Connection!](https://shopify.dev/docs/api/storefront/unstable/connections/PageConnection) non-null List of the shop's pages. * first [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) ### Arguments Returns up to the first `n` elements from the list. * after [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come after the specified cursor. * last [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) Returns up to the last `n` elements from the list. * before [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come before the specified cursor. * reverse [Boolean](https://shopify.dev/docs/api/storefront/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Page​Sort​Keys](https://shopify.dev/docs/api/storefront/unstable/enums/PageSortKeys) Default:ID Sort the underlying list by the given key. * query [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Apply one or multiple filters to the query. Refer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters. * created\_at * handle * title * updated\_at *** * payment​Settings [Payment​Settings!](https://shopify.dev/docs/api/storefront/unstable/objects/PaymentSettings) non-null Settings related to payments. * predictive​Search [Predictive​Search​Result](https://shopify.dev/docs/api/storefront/unstable/objects/PredictiveSearchResult) List of the predictive search results. * limit [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) ### Arguments Limits the number of results based on `limit_scope`. The value can range from 1 to 10, and the default is 10. * limit​Scope [Predictive​Search​Limit​Scope](https://shopify.dev/docs/api/storefront/unstable/enums/PredictiveSearchLimitScope) Decides the distribution of results. * query [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) required The search query. * searchable​Fields [\[Searchable​Field!\]](https://shopify.dev/docs/api/storefront/unstable/enums/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. * types [\[Predictive​Search​Type!\]](https://shopify.dev/docs/api/storefront/unstable/enums/PredictiveSearchType) The types of resources to search for. The input must not contain more than `250` values. * unavailable​Products [Search​Unavailable​Products​Type](https://shopify.dev/docs/api/storefront/unstable/enums/SearchUnavailableProductsType) Specifies how unavailable products are displayed in the search results. *** * product [Product](https://shopify.dev/docs/api/storefront/unstable/objects/Product) Fetch a specific `Product` by one of its unique attributes. * id [ID](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) ### Arguments The ID of the `Product`. * handle [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) The handle of the `Product`. *** * product​Recommendations [\[Product!\]](https://shopify.dev/docs/api/storefront/unstable/objects/Product) Find recommended products related to a given `product_id`. To learn more about how recommendations are generated, see [*Showing product recommendations on product pages*](https://help.shopify.com/themes/development/recommended-products). * product​Id [ID](https://shopify.dev/docs/api/storefront/unstable/scalars/ID) ### Arguments The id of the product. * product​Handle [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) The handle of the product. * intent [Product​Recommendation​Intent](https://shopify.dev/docs/api/storefront/unstable/enums/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. *** * products [Product​Connection!](https://shopify.dev/docs/api/storefront/unstable/connections/ProductConnection) non-null Returns a list of the shop's products. For storefront search, use the [`search`](https://shopify.dev/docs/api/storefront/latest/queries/search) query. * first [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) ### Arguments Returns up to the first `n` elements from the list. * after [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come after the specified cursor. * last [Int](https://shopify.dev/docs/api/storefront/unstable/scalars/Int) Returns up to the last `n` elements from the list. * before [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) Returns the elements that come before the specified cursor. * reverse [Boolean](https://shopify.dev/docs/api/storefront/unstable/scalars/Boolean) Default:false Reverse the order of the underlying list. * sort​Key [Product​Sort​Keys](https://shopify.dev/docs/api/storefront/unstable/enums/ProductSortKeys) Default:ID Sort the underlying list by the given key. * query [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) You can apply one or multiple filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * available\_for\_sale Filter by products that have at least one product variant available for sale. * * created\_at * product\_type * tag * tag\_not * title * updated\_at * variants.price - Filter by the date and time when the product was created. - Example: * `created_at:>'2020-10-21T23:39:20Z'` * `created_at:'2020-10-21T23:39:20Z'` * `updated_at: