Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stellarscrape

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stellarscrape

The apiWrapper for the StellarScrape API

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-93.22%
Maintainers
0
Weekly downloads
 
Created
Source

Stellarscrape ApiClient

The Stellarscrape ApiClient is an npm package designed to interact with the Stellarscrape API, allowing you to search for Amazon products and retrieve detailed product information across supported Amazon marketplaces. To use this package, obtain an API key by subscribing at StellarScrape.com.

Installation

Install the Stellarscrape client via npm:

npm install stellarscrape

Getting Started

To start using the Stellarscrape client, import the StellarScrape class, initialize it with your API key, and use the methods provided to search for products or fetch product details.

const { StellarScrape } = require('stellarscrape');

const stellarScrape = new StellarScrape("YOUR_API_KEY");

API Methods

1. Get Amazon Product Data

Retrieve details for a specific product based on its Amazon Standard Identification Number (ASIN).

stellarScrape.getAmazonProduct("B0DGHN7913", ["fr"], "fr")
  .then((data) => {
    console.log(data);
  })
  .catch((err) => {
    console.log(err);
  });

Parameters:

  • asin (string): The ASIN of the product.
  • countries (array of supportedCountry): List of country codes to fetch data from (e.g., ["fr"]).
  • userCountry (supportedCountry): The country code for the user.
2. Search Amazon Products

Search for products on Amazon across multiple supported locales using a query string.

stellarScrape.searchAmazonProducts("iphones", ["fr", "it", "es", "de"], "fr", 10, 0)
  .then((data) => {
    data.data.searchData.productsData.forEach((product) => console.log(product));
  })
  .catch((err) => {
    console.log(err);
  });

Parameters:

  • query (string): Search term (e.g., "iphones").
  • countries (array of supportedCountry): List of countries to search in (e.g., ["fr", "it", "es", "de"]).
  • userCountry (supportedCountry): The primary country for the user.
  • amount (number, optional): Number of results per page (default is 10).
  • startAt (number, optional): The starting index of the results (default is 0).
3. Get Multiple Amazon Products

Retrieve details for multiple products in one request by providing an array of ASINs.

stellarScrape.getAmazonMultipleProducts(["B09G9HWQYT", "B07F81WWKP"], ["fr"], "fr")
  .then((data) => {
    console.log(data.data);
  })
  .catch((err) => {
    console.log(err);
  });

Parameters:

  • asinArray (array of strings): Array of ASINs (up to 100 per request).
  • countries (array of supportedCountry): List of country codes (e.g., ["fr"]).
  • userCountry (supportedCountry): The user's country code.

Notes

  • Obtain your API key by subscribing at StellarScrape.com.
  • Manage errors with .catch() to handle potential API request issues.

Keywords

FAQs

Package last updated on 12 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc