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

nest-paapi-5

v1.0.0

Published

A NestJS module for Amazon's Product Advertising API 5.0 (PAAPI5)

Downloads

8

Readme

nest-paapi-5

A NestJS module for Amazon's Product Advertising API 5.0 (PAAPI5)

Description

This package provides a simple way to integrate Amazon's Product Advertising API 5.0 with your NestJS application. It includes a service and module that handles authentication, request signing, and API interactions with Amazon's Product Advertising platform.

Installation

npm install nest-paapi-5
# or
yarn add nest-paapi-5

Prerequisites

Before using this package, you'll need:

  • Amazon Associate Account
  • Access Key ID and Secret Access Key from Amazon Product Advertising API
  • Partner Tag (Associate Tag)

Usage

Module Import

Import the PaAPI5Module into your NestJS application:

import { Module } from '@nestjs/common';
import { PaAPI5Module } from 'nest-paapi-5';

@Module({
  imports: [
    PaAPI5Module.forRoot({
      accessKey: 'YOUR_ACCESS_KEY',
      secretKey: 'YOUR_SECRET_KEY',
      countryCode: 'US', // Optional, defaults to 'US'
    }),
  ],
})
export class AppModule {}

Using the Service

Inject and use the PaAPI5Service in your controllers or services:

import { Injectable } from '@nestjs/common';
import { PaAPI5Service } from 'nest-paapi-5';

@Injectable()
export class ProductService {
  constructor(private readonly paapi5Service: PaAPI5Service) {}

  async searchProducts(keyword: string) {
    const params = {
      PartnerType: PartnerType.Associates,
      PartnerTag: '<TAG>',
      Keywords: 'Harry Potter',
      SearchIndex: 'Books',
      ItemCount: 2,
      Resources: [
        SearchItemsResource.ImagesPrimaryLarge,
        SearchItemsResource.ItemInfoTitle,
        SearchItemsResource.OffersListingsPrice,
      ],
    };
    };

    return await this.paapi5Service.searchItems(params);
  }

  async getProductDetails(asin: string) {
    const params = {
      PartnerType: PartnerType.Associates,
      PartnerTag: '<TAG>',
      ItemIds: ['059035342X', 'B00X4WHP5E', 'B00ZV9RDKK'],
      Condition: Condition.New,
      Resources: [
        GetItemsResource.ImagesPrimaryLarge,
        GetItemsResource.ItemInfoTitle,
        GetItemsResource.OffersListingsPrice,
      ],
    };

    return await this.paapi5Service.getItems(params);
  }
}

Available Methods

The PaAPI5Service provides the following methods:

  • searchItems(params): Search for items using keywords
  • getItems(params): Get detailed information about specific items using ASINs
  • getBrowseNodes(params): Get information about browse nodes
  • getVariations(params): Get variation information for an ASIN

Configuration Options

| Option | Type | Required | Description | |--------|------|----------|-------------| | accessKey | string | Yes | Your Amazon Product Advertising API Access Key | | secretKey | string | Yes | Your Amazon Product Advertising API Secret Key | | countryCode | string | No | Region code (default: 'US') |

Supported Countries

  • US (United States)
  • CA (Canada)
  • FR (France)
  • DE (Germany)
  • IN (India)
  • IT (Italy)
  • JP (Japan)
  • ES (Spain)
  • UK (United Kingdom)
  • BR (Brazil)
  • MX (Mexico)
  • AU (Australia)
  • AE (United Arab Emirates)
  • SG (Singapore)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Support

For issues and feature requests, please use the GitHub issues page.

Acknowledgments

This package is built on top of Amazon's Product Advertising API 5.0 and is not officially associated with Amazon.