npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shopstyle-sdk

v1.1.1

Published

Node access to the Shopstyle API

Readme

Build Status codecov

shopstyle-sdk

A lightweight, caching wrapper for the ShopStyle API. Note that while originally anticipated for node only, this lib has now been used in browser, so if you try it in browser and have any problems, please open an issue so it can be addressed.

npm install --save shopstyle-sdk

To use:

const ShopStyle = require('shopstyle-sdk');

// Create a shopstyle object using a 'test' api key.
const shopstyle = new ShopStyle('test');
shopstyle.product(359131344).then(result => console.log(response.name));

> Matthew Williamson Jungle Whispers Gown

// passing arguments to the api
const options = {
  fts: 'red dress',
  offset: 2,
  limit: 1,
  fl: ['b171', 'b28080', 'c7', 'd0', 'p31:40', 's85', 's87', 's89', 't0'],
  sort: 'PriceLoHi',
};
shopstyle.products(options).then(response => console.log(response));

> { metadata:
   { offset: 2,
     limit: 1,
     total: 4,
     category:
      { id: 'dresses',
        name: 'Dresses',
        shortName: 'Dresses',
...

Caching:

// override the default 12 hour cache to a one hour cache:
const shopstyle = new ShopStyle('test', 'US', { stdTTL: 3600});
// disable the cache
const shopstyle = new ShopStyle('test', 'US', false);

Selecting a locale:

const shopstyle = new ShopStyle('test', 'JP');
shopstyle.categories({ depth: 1 })
  .then(result => console.log(result.categories[0].name));

> レディース ファッション

The sdk defaults to the US locale. You can instantiate the ShopStyle object with another supported locale. See the official ShopsStyle API documentation for details on using the API.

Caching:

shopstyle-sdk uses node-cache to cache results from the api. The default ttl is twelve hours. All options for configuring the cache can be passed through to node-cache. The cache can also be disabled by passing false as the cache options during construction of the ShopStyle object.

Supported Locales:

The locale can be selected when constructing the ShopStyle object. The following locales are supported:

  • Australia (AU)
  • Canada (CA)
  • France (FR)
  • Germany (DE)
  • Japan (JP)
  • United Kingdom (UK)
  • United States (US)

Node Support:

This library uses features of node 6+. For support on older versions see Shopsense API nodejs client