Shopify Storefront Query Products Example
Example of querying products from the Shopify Storefront GraphQL API
Shopify Storefront Query Products Example is an example object payload from Shopify Storefront API, with 4 top-level fields. It illustrates the shape of data this provider's APIs accept or return.
Top-level fields
Example Payload
{
"summary": "Query Products - GraphQL Example",
"description": "Example of querying products from the Shopify Storefront GraphQL API",
"request": {
"method": "POST",
"url": "https://mystore.myshopify.com/api/2024-10/graphql.json",
"headers": {
"X-Shopify-Storefront-Access-Token": "your-storefront-access-token",
"Content-Type": "application/json"
},
"body": {
"query": "{\n products(first: 3) {\n edges {\n node {\n id\n title\n handle\n description\n availableForSale\n priceRange {\n minVariantPrice {\n amount\n currencyCode\n }\n maxVariantPrice {\n amount\n currencyCode\n }\n }\n variants(first: 5) {\n edges {\n node {\n id\n title\n price {\n amount\n currencyCode\n }\n availableForSale\n sku\n }\n }\n }\n featuredImage {\n url\n altText\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n}"
}
},
"response": {
"status": 200,
"body": {
"data": {
"products": {
"edges": [
{
"node": {
"id": "gid://shopify/Product/632910392",
"title": "Classic Cotton T-Shirt",
"handle": "classic-cotton-t-shirt",
"description": "A comfortable, everyday cotton t-shirt available in multiple colors.",
"availableForSale": true,
"priceRange": {
"minVariantPrice": {
"amount": "29.99",
"currencyCode": "USD"
},
"maxVariantPrice": {
"amount": "34.99",
"currencyCode": "USD"
}
},
"variants": {
"edges": [
{
"node": {
"id": "gid://shopify/ProductVariant/808950810",
"title": "Small / Blue",
"price": {
"amount": "29.99",
"currencyCode": "USD"
},
"availableForSale": true,
"sku": "CCT-S-BLU"
}
}
]
},
"featuredImage": {
"url": "https://cdn.shopify.com/s/files/1/0001/classic-cotton-tshirt.jpg",
"altText": "Classic Cotton T-Shirt"
}
}
}
],
"pageInfo": {
"hasNextPage": true,
"endCursor": "eyJsYXN0X2lkIjo2MzI5MTAzOTIsImxhc3RfdmFsdWUiOiI2MzI5MTAzOTIifQ=="
}
}
}
}
}
}
Work with this as data
Every example here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for examples
4 MCP tools reach this
find_examplesBrowse and filter every example in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/examples/shopify-storefront-query-products-example"
curl "https://apis.io/api/v1/examples?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.