# products - storefront - QUERY Version: 2025-01 ## Description Returns a list of the shop's products. For storefront search, use the [`search`](https://shopify.dev/docs/api/storefront/latest/queries/search) query. ### Access Scopes ## Arguments * [after](/docs/api/storefront/2025-01/scalars/String): String - Returns the elements that come after the specified cursor. * [before](/docs/api/storefront/2025-01/scalars/String): String - Returns the elements that come before the specified cursor. * [first](/docs/api/storefront/2025-01/scalars/Int): Int - Returns up to the first `n` elements from the list. * [last](/docs/api/storefront/2025-01/scalars/Int): Int - Returns up to the last `n` elements from the list. * [query](/docs/api/storefront/2025-01/scalars/String): String - You can apply one or multiple filters to a query. | name | description | acceptable_values | default_value | example_use | | ---- | ---- | ---- | ---- | ---- | | available_for_sale | Filter by products that have at least one product variant available for sale. | | created_at | Filter by the date and time when the product was created. | | | - `created_at:>'2020-10-21T23:39:20Z'`<br/> - `created_at:<now`<br/> - `created_at:<=2024` | | product_type | Filter by a comma-separated list of [product types](https://help.shopify.com/en/manual/products/details/product-type). | | | `product_type:snowboard` | | tag | Filter products by the product [`tags`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-tags) field. | | | `tag:my_tag` | | tag_not | Filter by products that don't have the specified product [tags](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-tags). | | | `tag_not:my_tag` | | title | Filter by the product [`title`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-title) field. | | | `title:The Minimal Snowboard` | | updated_at | Filter by the date and time when the product was last updated. | | | - `updated_at:>'2020-10-21T23:39:20Z'`<br/> - `updated_at:<now`<br/> - `updated_at:<=2024` | | variants.price | Filter by the price of the product's variants. | | vendor | Filter by the product [`vendor`](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-vendor) field. | | | - `vendor:Snowdevil`<br/> - `vendor:Snowdevil OR vendor:Icedevil` | Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax). * [reverse](/docs/api/storefront/2025-01/scalars/Boolean): Boolean - Reverse the order of the underlying list. * [sortKey](/docs/api/storefront/2025-01/enums/ProductSortKeys): ProductSortKeys - Sort the underlying list by the given key. ## Returns * [edges](/docs/api/storefront/2025-01/objects/ProductEdge): ProductEdge! A list of edges. * [filters](/docs/api/storefront/2025-01/objects/Filter): Filter! A list of available filters. * [nodes](/docs/api/storefront/2025-01/objects/Product): Product! A list of the nodes contained in ProductEdge. * [pageInfo](/docs/api/storefront/2025-01/objects/PageInfo): PageInfo! Information to aid in pagination. ## Examples ### Retrieve first three products Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Storefront-Access-Token: {storefront_access_token}' \\\n-d '{\n\"query\": \"query getProducts($first: Int) { products(first: $first) { edges { cursor node { title } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Storefront({\n domain: 'your-development-store.myshopify.com',\n storefrontAccessToken,\n});\nconst data = await client.query({\n data: `query getProducts($first: Int) {\n products(first: $first) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n});\n" Ruby example: null Remix example: "const { storefront } = await unauthenticated.storefront(\n 'your-development-store.myshopify.com'\n);\n\nconst response = await storefront.graphql(\n `#graphql\n query getProducts($first: Int) {\n products(first: $first) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query getProducts($first: Int) {\n products(first: $first) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "edges": [ { "cursor": "eyJsYXN0X2lkIjo2NTcyMTE2NSwibGFzdF92YWx1ZSI6IjY1NzIxMTY1In0=", "node": { "title": "Storefront Spoon" } }, { "cursor": "eyJsYXN0X2lkIjoyNjMwNzE4NTYsImxhc3RfdmFsdWUiOiIyNjMwNzE4NTYifQ==", "node": { "title": "Storefront Shoes" } }, { "cursor": "eyJsYXN0X2lkIjo1Mzg4MjUyNjEsImxhc3RfdmFsdWUiOiI1Mzg4MjUyNjEifQ==", "node": { "title": "Guitar" } } ] } } } ### Retrieve first three products in reverse order Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Storefront-Access-Token: {storefront_access_token}' \\\n-d '{\n\"query\": \"query getProducts($first: Int, $reverse: Boolean) { products(first: $first, reverse: $reverse) { edges { cursor node { title } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Storefront({\n domain: 'your-development-store.myshopify.com',\n storefrontAccessToken,\n});\nconst data = await client.query({\n data: `query getProducts($first: Int, $reverse: Boolean) {\n products(first: $first, reverse: $reverse) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n});\n" Ruby example: null Remix example: "const { storefront } = await unauthenticated.storefront(\n 'your-development-store.myshopify.com'\n);\n\nconst response = await storefront.graphql(\n `#graphql\n query getProducts($first: Int, $reverse: Boolean) {\n products(first: $first, reverse: $reverse) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query getProducts($first: Int, $reverse: Boolean) {\n products(first: $first, reverse: $reverse) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "edges": [ { "cursor": "eyJsYXN0X2lkIjo5Mjk4OTg0NjUsImxhc3RfdmFsdWUiOiI5Mjk4OTg0NjUifQ==", "node": { "title": "Camper Van" } }, { "cursor": "eyJsYXN0X2lkIjo1Mzg4MjUyNjEsImxhc3RfdmFsdWUiOiI1Mzg4MjUyNjEifQ==", "node": { "title": "Guitar" } }, { "cursor": "eyJsYXN0X2lkIjoyNjMwNzE4NTYsImxhc3RfdmFsdWUiOiIyNjMwNzE4NTYifQ==", "node": { "title": "Storefront Shoes" } } ] } } } ### Retrieve first two products after cursor Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Storefront-Access-Token: {storefront_access_token}' \\\n-d '{\n\"query\": \"query getProducts($first: Int, $after: String) { products(first: $first, after: $after) { edges { cursor node { title } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Storefront({\n domain: 'your-development-store.myshopify.com',\n storefrontAccessToken,\n});\nconst data = await client.query({\n data: `query getProducts($first: Int, $after: String) {\n products(first: $first, after: $after) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n});\n" Ruby example: null Remix example: "const { storefront } = await unauthenticated.storefront(\n 'your-development-store.myshopify.com'\n);\n\nconst response = await storefront.graphql(\n `#graphql\n query getProducts($first: Int, $after: String) {\n products(first: $first, after: $after) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query getProducts($first: Int, $after: String) {\n products(first: $first, after: $after) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "edges": [ { "cursor": "eyJsYXN0X2lkIjoyNjMwNzE4NTYsImxhc3RfdmFsdWUiOiIyNjMwNzE4NTYifQ==", "node": { "title": "Storefront Shoes" } }, { "cursor": "eyJsYXN0X2lkIjo1Mzg4MjUyNjEsImxhc3RfdmFsdWUiOiI1Mzg4MjUyNjEifQ==", "node": { "title": "Guitar" } } ] } } } ### Retrieve last two products before cursor Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Storefront-Access-Token: {storefront_access_token}' \\\n-d '{\n\"query\": \"query getProducts($last: Int, $before: String) { products(last: $last, before: $before) { edges { cursor node { title } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Storefront({\n domain: 'your-development-store.myshopify.com',\n storefrontAccessToken,\n});\nconst data = await client.query({\n data: `query getProducts($last: Int, $before: String) {\n products(last: $last, before: $before) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n});\n" Ruby example: null Remix example: "const { storefront } = await unauthenticated.storefront(\n 'your-development-store.myshopify.com'\n);\n\nconst response = await storefront.graphql(\n `#graphql\n query getProducts($last: Int, $before: String) {\n products(last: $last, before: $before) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query getProducts($last: Int, $before: String) {\n products(last: $last, before: $before) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "edges": [ { "cursor": "eyJsYXN0X2lkIjo2NTcyMTE2NSwibGFzdF92YWx1ZSI6IjY1NzIxMTY1In0=", "node": { "title": "Storefront Spoon" } }, { "cursor": "eyJsYXN0X2lkIjoyNjMwNzE4NTYsImxhc3RfdmFsdWUiOiIyNjMwNzE4NTYifQ==", "node": { "title": "Storefront Shoes" } } ] } } } ### Retrieve product that matches the query Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Storefront-Access-Token: {storefront_access_token}' \\\n-d '{\n\"query\": \"query getProducts($first: Int, $query: String) { products(first: $first, query: $query) { edges { cursor node { title } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Storefront({\n domain: 'your-development-store.myshopify.com',\n storefrontAccessToken,\n});\nconst data = await client.query({\n data: `query getProducts($first: Int, $query: String) {\n products(first: $first, query: $query) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n});\n" Ruby example: null Remix example: "const { storefront } = await unauthenticated.storefront(\n 'your-development-store.myshopify.com'\n);\n\nconst response = await storefront.graphql(\n `#graphql\n query getProducts($first: Int, $query: String) {\n products(first: $first, query: $query) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query getProducts($first: Int, $query: String) {\n products(first: $first, query: $query) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "edges": [ { "cursor": "eyJsYXN0X2lkIjo1Mzg4MjUyNjEsImxhc3RfdmFsdWUiOiI1Mzg4MjUyNjEifQ==", "node": { "title": "Guitar" } } ] } } } ### Retrieve products after sorting by a key Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Storefront-Access-Token: {storefront_access_token}' \\\n-d '{\n\"query\": \"query getProducts($first: Int, $sortKey: ProductSortKeys) { products(first: $first, sortKey: $sortKey) { edges { cursor node { title } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Storefront({\n domain: 'your-development-store.myshopify.com',\n storefrontAccessToken,\n});\nconst data = await client.query({\n data: `query getProducts($first: Int, $sortKey: ProductSortKeys) {\n products(first: $first, sortKey: $sortKey) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n});\n" Ruby example: null Remix example: "const { storefront } = await unauthenticated.storefront(\n 'your-development-store.myshopify.com'\n);\n\nconst response = await storefront.graphql(\n `#graphql\n query getProducts($first: Int, $sortKey: ProductSortKeys) {\n products(first: $first, sortKey: $sortKey) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query getProducts($first: Int, $sortKey: ProductSortKeys) {\n products(first: $first, sortKey: $sortKey) {\n edges {\n cursor\n node {\n title\n }\n }\n }\n}" #### Graphql Input null #### Graphql Response { "data": { "products": { "edges": [ { "cursor": "eyJsYXN0X2lkIjo5Mjk4OTg0NjUsImxhc3RfdmFsdWUiOiJDYW1wZXIgVmFuIn0=", "node": { "title": "Camper Van" } }, { "cursor": "eyJsYXN0X2lkIjo1Mzg4MjUyNjEsImxhc3RfdmFsdWUiOiJHdWl0YXIifQ==", "node": { "title": "Guitar" } }, { "cursor": "eyJsYXN0X2lkIjoyNjMwNzE4NTYsImxhc3RfdmFsdWUiOiJTdG9yZWZyb250IFNob2VzIn0=", "node": { "title": "Storefront Shoes" } }, { "cursor": "eyJsYXN0X2lkIjo2NTcyMTE2NSwibGFzdF92YWx1ZSI6IlN0b3JlZnJvbnQgU3Bvb24ifQ==", "node": { "title": "Storefront Spoon" } } ] } } }