how can i access best selling through the public api

New Member
1 0 0


guys i have a simple react app and i want to access the last 5 best selling product through json request without using the admin api , after researching i found this enpoint it gave me the last product, the question is how can i sort it by best selling or by price .

thank you

Reply 1 (1)
Shopify Partner
67 12 20

I don't know if you can do it with just /products.json but the Storefront API can do it:

  products(first: 5, sortKey: BEST_SELLING) {
    edges {
      node {


ProductSortKeys docs.