New Shopify Certification now available: Liquid Storefronts for Theme Developers

How can an app find the best selling products?

Shopify Partner
9 0 3

We have a (eventually public) app which needs information about which products/variants are most popular, preferably with total numbers sold or at least a ranking of the top N products or variants. It seems to be surprisingly hard to get this information through the API. Here are the options I see:


  1. Use the Storefront API, which lets you retrieve a list of products sorted by BEST_SELLING. Unfortunately a public app can't use the Storefront API unless it's a "sales channel", and it really doesn't make sense for our app to be a sales channel.
  2. Use the Admin API. It does not let you sort products by BEST_SELLING, but we could potentially fetch all orders from the last 60 days and compile the sales numbers from that. The problems with this are
    1. Orders are "protected data", which sounds like a pain, and we shouldn't really need access to any data about individual orders.
    2. It would be a lot of data to fetch just to compile a short list of numbers. The data we need appears to already exist, so recreating it in this way feels really inefficient.
  3. Possibly something with ShopifyQL, but that appears to be only in the "unstable" version of the API, and it is indeed unstable (I got an "Internal error" error on the example query). Also it's not clear to me whether it will be available on all stores, or only Shopify Plus. It seems to require the "read_reports" scope, and it seems like reports are normally only for Plus and/or Advanced.

Do I have any good options here?

Replies 0 (0)