Skip to main content

What is Shoppy?

A minimal, type-safe client for Shopify’s Storefront API. Built for modern JavaScript with a chainable query builder pattern.
const { items } = await shoppy.products
    .collection('sale')
    .limit(12)
    .select(['title', 'priceRange', 'featuredImage'])
    .list()

Features

TypeScript First

Full type inference and autocompletion

Chainable API

Intuitive query builder pattern

Zero Dependencies

Single file, no runtime deps

Field Selection

Request only what you need

Quick Look

// Initialize
shoppy.init({
    token: 'your-storefront-token',
    storeDomain: 'store.myshopify.com'
})

// Collections
const collections = await shoppy.collections.list()
const collection = await shoppy.collections.get('summer-sale')

// Products
const products = await shoppy.products.list()
const product = await shoppy.products.get('blue-shirt')

// Products by collection
const { items } = await shoppy.products.collection('sale').list()

// With options
const result = await shoppy.products
    .collection('new')
    .limit(6)
    .select(['title', 'handle', 'priceRange'])
    .list()

// Cart
await shoppy.cart.init()
await shoppy.cart.add('gid://shopify/ProductVariant/123', 2)
shoppy.cart.checkout()

// Customer Authentication
const customer = await shoppy.customer.login('[email protected]', 'password')
const { orders } = await shoppy.customer.orders()
await shoppy.customer.logout()

API Reference