products
products is a Magento 2 GraphQL query in the Catalog module. Search for products that match the criteria specified in the search and filter attributes. It returns Products and is callable anonymously.
Last verified: against Magento 2.4.9.
Returns
Resolver class
Magento\CatalogGraphQl\Model\Resolver\Products
Cache
identity: Magento\CatalogGraphQl\Model\Resolver\Product\Identity
Arguments
One or more keywords to use in a full-text search.
The product attributes to search for and return.
The maximum number of results to return at once. The default value is 20.
The page of results to return. The default value is 1.
Specifies which attributes to sort on, and whether to return the results in ascending or descending order.
Example request
Auto-generated from the SDL — paste-ready against your store's /graphql endpoint. Replace the host, store code, and any required values before running.
Headers
Query
query {
products {
items {
id
uid
name
sku
description {
html
}
short_description {
html
}
special_price
special_from_date
special_to_date
attribute_set_id
meta_title
meta_keyword
meta_description
image { ... }
small_image { ... }
thumbnail { ... }
new_from_date
new_to_date
tier_price
options_container
created_at
updated_at
country_of_manufacture
type_id
websites {
id
name
code
sort_order
default_group_id
is_default
}
product_links {
sku
link_type
linked_product_sku
linked_product_type
position
}
media_gallery_entries {
id
uid
media_type
label
position
disabled
types
file
content { ... }
video_content { ... }
}
price {
minimalPrice { ... }
maximalPrice { ... }
regularPrice { ... }
}
price_range {
minimum_price { ... }
maximum_price { ... }
}
gift_message_available
manufacturer
categories {
id
uid
description
name
path
path_in_store
url_key
url_path
canonical_url
position
level
created_at
updated_at
product_count
default_sort_by
products { ... }
breadcrumbs { ... }
cms_block { ... }
url_suffix
}
canonical_url
media_gallery {
url
label
position
disabled
types
}
custom_attributesV2 {
items { ... }
errors { ... }
}
tier_prices {
customer_group_id
qty
value
percentage_value
website_id
}
price_tiers {
final_price { ... }
quantity
discount { ... }
}
only_x_left_in_stock
stock_status
quantity
min_sale_qty
max_sale_qty
url_key
url_suffix
url_path
url_rewrites {
url
parameters { ... }
}
related_products { ... }
upsell_products { ... }
crosssell_products { ... }
rating_summary
review_count
reviews {
items { ... }
page_info { ... }
}
swatch_image
}
page_info {
page_size
current_page
total_pages
}
total_count
filters {
name
request_var
filter_items_count
filter_items {
label
value_string
items_count
}
}
aggregations {
count
label
attribute_code
options { ... }
position
}
sort_fields {
default
options {
value
label
}
}
suggestions {
search
}
}
}Variables
{}Related in CatalogGraphQl
Other fields shipped by the same module.
categories
Return a list of categories that match the specified filter.
Catalog · returns CategoryResult
category
DeprecatedSearch for categories that match the criteria specified in the `search` and `filter` attributes.
Catalog · returns CategoryTree
categoryList
DeprecatedReturn an array of categories based on the specified filters.
Catalog · returns [CategoryTree]
Every Magento dev tool, in one hosted workspace.
Free to sign up. Nothing to install. Drafts, audits, and projects saved across every tool.