Install sneaks-api via npm
masterTo use this API, ensure you have Node.js installed. Install the package within your Node.js project directory using npm.
npm install sneaks-apirepository·master·Indexed 19 days ago
https://github.com/druv5319/sneaks-apiA Node.js-based RESTful API aggregator that collects sneaker data from resell platforms including StockX, FlightClub, Goat, and Stadium Goods. It provides functionality to search for products via getProducts(), retrieve detailed pricing and product information using getProductPrices(), and fetch popular products through getMostPopular().
To use this API, ensure you have Node.js installed. Install the package within your Node.js project directory using npm.
npm install sneaks-apiUse getProductPrices(styleID, callback) to retrieve comprehensive information for a specific sneaker. It requires a styleID (string) and returns a detailed product object via a callback.
The returned object includes:
const SneaksAPI = require('sneaks-api');
const sneaks = new SneaksAPI();
// getProductPrices(styleID, callback) returns sneaker info including a price map and more images
sneaks.getProductPrices("FY2903", function(err, product){
console.log(product)
})Use getMostPopular(limit, callback) to get an array of currently popular products curated by StockX. It takes a limit (number) and returns the products via a callback function.
const SneaksAPI = require('sneaks-api');
const sneaks = new SneaksAPI();
// getMostPopular(limit, callback) returns an array of popular products
sneaks.getMostPopular(10, function(err, products){
console.log(products)
})Use getProducts(keyword, limit, callback) to search for sneakers. It takes a search keyword (string) and a limit (number) and returns an array of product objects via a callback function. Each product object contains a styleID which can be used for more detailed price lookups.
const SneaksAPI = require('sneaks-api');
const sneaks = new SneaksAPI();
// getProducts(keyword, limit, callback) returns a product array
sneaks.getProducts("Yeezy Cinder", 10, function(err, products){
console.log(products)
})The SneaksAPI class is the primary entrypoint for interacting with sneaker data from various resell sites. It is exported from the main module and serves as the controller for sneaker-related operations.
const SneaksAPI = require('./controllers/sneaks.controllers.js');