{"_id":"@alonseg/amazon-paapi","name":"@alonseg/amazon-paapi","dist-tags":{"latest":"1.0.8"},"versions":{"1.0.8":{"name":"@alonseg/amazon-paapi","version":"1.0.8","description":"Amazon Associate Product Advertising API for NodeJs. A maintained fork of the original PAAPI 5.0 Extension since the original is no longer maintained.","main":"app.js","repository":{"type":"git","url":"git+https://github.com/alonseg/amazon-paapi.git"},"author":{"name":"Alonseg","email":"alonseg@example.com"},"license":"MIT","bugs":{"url":"https://github.com/alonseg/amazon-paapi/issues"},"homepage":"https://github.com/alonseg/amazon-paapi#readme","keywords":["paapi5","PA-API 5.0","aws associate","product advertising api","amazon paapi sdk nodejs","amazon itemlookup","amazon getItems","amazon searchItems","amazon browseNodeRequest","amazon getVariation","fork","maintained"],"dependencies":{"crypto-js":"^4.0.0","querystring":"^0.2.1","superagent":"^5.2.2"},"publishConfig":{"access":"public"},"_id":"@alonseg/amazon-paapi@1.0.8","gitHead":"018638d84f0919e4af8ccc477f3b8909999ba52c","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-863e2ENDdK+quJ+BkfoH8jK2lFCVxJaBSU9R8B9wekof7xrswAOshEssHPIGUZaTgUBk+Ds2DYGFksEJJmWCbg==","shasum":"eb98234c87d2bc7c14580d31ebbe1bb36ec87c2a","tarball":"https://registry.npmjs.org/@alonseg/amazon-paapi/-/amazon-paapi-1.0.8.tgz","fileCount":133,"unpackedSize":618081,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQChYuCdsHTNszVlhzX2uH1B3r7vvFBQQs2pd91qe7wEPwIgJwQSBraLtBReGlopzgcbG2ySTLSyqF27+BxSqKEM/dc="}]},"_npmUser":{"name":"alonseg","email":"anialonsegal@gmail.com"},"directories":{},"maintainers":[{"name":"alonseg","email":"anialonsegal@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/amazon-paapi_1.0.8_1759837011537_0.22515464513813477"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-07T11:36:51.429Z","1.0.8":"2025-10-07T11:36:51.752Z","modified":"2025-10-07T11:36:52.042Z"},"maintainers":[{"name":"alonseg","email":"anialonsegal@gmail.com"}],"description":"Amazon Associate Product Advertising API for NodeJs. A maintained fork of the original PAAPI 5.0 Extension since the original is no longer maintained.","homepage":"https://github.com/alonseg/amazon-paapi#readme","keywords":["paapi5","PA-API 5.0","aws associate","product advertising api","amazon paapi sdk nodejs","amazon itemlookup","amazon getItems","amazon searchItems","amazon browseNodeRequest","amazon getVariation","fork","maintained"],"repository":{"type":"git","url":"git+https://github.com/alonseg/amazon-paapi.git"},"author":{"name":"Alonseg","email":"alonseg@example.com"},"bugs":{"url":"https://github.com/alonseg/amazon-paapi/issues"},"license":"MIT","readme":"# amazon-paapi\r\n\r\n[![npm version](https://badge.fury.io/js/amazon-paapi.svg)](https://badge.fury.io/js/amazon-paapi)\r\n[![NPM](https://nodei.co/npm/amazon-paapi.png)](https://nodei.co/npm/amazon-paapi/)\r\n\r\nAmazon Associate Product Advertising API for NodeJs. A PAAPI 5.0 Extension.\r\n\r\nA **clean** wrapper for amazon's [NodeJs SDK.](https://webservices.amazon.com/paapi5/documentation/with-sdk.html#nodejs) Main purpose of this module is to jumpstart development with easy to understand and clean syntax inspired with the amazon [scratchpad](https://webservices.amazon.com/paapi5/scratchpad/index.html)-like operation.\r\n\r\n[![Amazon Product API](https://d15ljbth6loks9.cloudfront.net/assets/logos/paapi5_documentation_logo.png)](https://webservices.amazon.com/paapi5/documentation/)\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install amazon-paapi --save\r\n```\r\n\r\n## Quickstart\r\n\r\n```js\r\nconst amazonPaapi = require('amazon-paapi');\r\n\r\nconst commonParameters = {\r\n  AccessKey: '<YOUR  ACCESS  KEY>',\r\n  SecretKey: '<YOUR  SECRET  KEY>',\r\n  PartnerTag: '<YOUR  PARTNER  TAG>', // yourtag-20\r\n  PartnerType: 'Associates', // Default value is Associates.\r\n  Marketplace: 'www.amazon.com', // Default value is US. Note: Host and Region are predetermined based on the marketplace value. There is no need for you to add Host and Region as soon as you specify the correct Marketplace value. If your region is not US or .com, please make sure you add the correct Marketplace value.\r\n};\r\n\r\nconst requestParameters = {\r\n  ASIN: 'B07H65KP63',\r\n  Resources: [\r\n    'ItemInfo.Title',\r\n    'Offers.Listings.Price',\r\n    'VariationSummary.VariationDimension',\r\n  ],\r\n};\r\n\r\n/** Promise */\r\namazonPaapi\r\n  .GetVariations(commonParameters, requestParameters)\r\n  .then((data) => {\r\n    // do something with the success response.\r\n    console.log(data);\r\n  })\r\n  .catch((error) => {\r\n    // catch an error.\r\n    console.log(error);\r\n  });\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\nconst amazonPaapi = require('amazon-paapi');\r\n\r\nconst commonParameters = {\r\n  AccessKey: '<YOUR  ACCESS  KEY>',\r\n  SecretKey: '<YOUR  SECRET  KEY>',\r\n  PartnerTag: '<YOUR  PARTNER  TAG>', // yourtag-20\r\n  PartnerType: 'Associates', // Default value is Associates.\r\n  Marketplace: 'www.amazon.com', // Default value is US. Note: Host and Region are predetermined based on the marketplace value. There is no need for you to add Host and Region as soon as you specify the correct Marketplace value. If your region is not US or .com, please make sure you add the correct Marketplace value.\r\n};\r\n```\r\n\r\n### [GetBrowseNodes](https://webservices.amazon.com/paapi5/documentation/getbrowsenodes.html)\r\n\r\nLookup information for a Browse Node. Please see sample script [here](https://github.com/jorgerosal/amazon-paapi/blob/master/sample/getBrowseNodes.js).\r\n\r\n```js\r\nconst requestParameters = {\r\n  BrowseNodeIds: ['3040', '3045'],\r\n  LanguagesOfPreference: ['es_US'],\r\n  Resources: ['BrowseNodes.Ancestor', 'BrowseNodes.Children'],\r\n};\r\n\r\n/** Promise */\r\namazonPaapi\r\n  .GetBrowseNodes(commonParameters, requestParameters)\r\n  .then((data) => {\r\n    // do something with the success response.\r\n    console.log(data);\r\n  })\r\n  .catch((error) => {\r\n    // catch an error.\r\n    console.log(error);\r\n  });\r\n```\r\n\r\n### [GetItems](https://webservices.amazon.com/paapi5/documentation/get-items.html)\r\n\r\nLookup item information for an item. Please see sample script [here](https://github.com/jorgerosal/amazon-paapi/blob/master/sample/getItems.js).\r\n\r\n> Note: This operation only supports ASIN as id Type. If you need to\r\n> lookup using UPC or EAN, you can do so under `SearchItems` operation.\r\n\r\n```js\r\nconst requestParameters = {\r\n  ItemIds: ['B00X4WHP5E', 'B00ZV9RDKK'],\r\n  ItemIdType: 'ASIN',\r\n  Condition: 'New',\r\n  Resources: [\r\n    'Images.Primary.Medium',\r\n    'ItemInfo.Title',\r\n    'Offers.Listings.Price',\r\n  ],\r\n};\r\n\r\n/** Promise */\r\namazonPaapi\r\n  .GetItems(commonParameters, requestParameters)\r\n  .then((data) => {\r\n    // do something with the success response.\r\n    console.log(data);\r\n  })\r\n  .catch((error) => {\r\n    // catch an error.\r\n    console.log(error);\r\n  });\r\n```\r\n\r\n### [GetVariations](https://webservices.amazon.com/paapi5/documentation/get-variations.html)\r\n\r\nLookup information for variations. Please see sample script [here](https://github.com/jorgerosal/amazon-paapi/blob/master/sample/getVariations.js).\r\n\r\n```js\r\nconst requestParameters = {\r\n  ASIN: 'B07H65KP63',\r\n  Resources: [\r\n    'Images.Primary.Medium',\r\n    'ItemInfo.Title',\r\n    'Offers.Listings.Price',\r\n    'VariationSummary.VariationDimension',\r\n  ],\r\n};\r\n\r\n/** Promise */\r\namazonPaapi\r\n  .GetVariations(commonParameters, requestParameters)\r\n  .then((data) => {\r\n    // do something with the success response.\r\n    console.log(data);\r\n  })\r\n  .catch((error) => {\r\n    // catch an error.\r\n    console.log(error);\r\n  });\r\n```\r\n\r\n### [SearchItems](https://webservices.amazon.com/paapi5/documentation/search-items.html)\r\n\r\nSearches for items on Amazon. Please see sample script [here](https://github.com/jorgerosal/amazon-paapi/blob/master/sample/searchItems.js).\r\n\r\n```js\r\nconst requestParameters = {\r\n  Keywords: 'Harry Potter',\r\n  SearchIndex: 'Books',\r\n  ItemCount: 2,\r\n  Resources: [\r\n    'Images.Primary.Medium',\r\n    'ItemInfo.Title',\r\n    'Offers.Listings.Price',\r\n  ],\r\n};\r\n\r\n/** Promise */\r\namazonPaapi\r\n  .SearchItems(commonParameters, requestParameters)\r\n  .then((data) => {\r\n    // do something with the success response.\r\n    console.log(data);\r\n  })\r\n  .catch((error) => {\r\n    // catch an error.\r\n    console.log(error);\r\n  });\r\n```\r\n\r\n### [Common Request Parameters](https://webservices.amazon.com/paapi5/documentation/common-request-parameters.html)\r\n\r\n- **AccessKey** - An alphanumeric token that uniquely identifies you. For information about getting an Access Key, see [Register for Product Advertising API](https://webservices.amazon.com/paapi5/documentation/register-for-pa-api.html).\r\n- **SecretKey** - A key that is used in conjunction with the Access Key to cryptographically sign an API request. To retrieve your Access Key or Secret Access Key, refer [Register for Product Advertising API](https://webservices.amazon.com/paapi5/documentation/register-for-pa-api.html).\r\n- **PartnerTag** - An alphanumeric token that uniquely identifies a partner. In case of an associate, this token is the means by which Amazon identifies the Associate to credit for a sale. If the value for `PartnerType` is `Associate`, specify the `store ID` or `tracking ID` of a valid associate store from the requested marketplace as the value for `PartnerTag`. For example, If `store-20` and `store-21` are store id or tracking id of customer in United States and United Kingdom marketplaces respectively, then customer needs to pass `store-20` as `PartnerTag` in all PAAPI requests for United States marketplace and `store-21` as `PartnerTag` in all PAAPI requests for United Kingdom marketplace. To obtain an Partner Tag, see [Sign up as an Amazon Associate](https://webservices.amazon.com/paapi5/documentation/troubleshooting/sign-up-as-an-associate.html).\r\n- **PartnerType** - The type of Amazon program. For more information on valid values, refer [PartnerType Parameter](https://webservices.amazon.com/paapi5/documentation/common-request-parameters.html#partnertype).\r\n- **Marketplace** - Default value is US. Note: Host and Region are predetermined based on the marketplace value. There's is no need for you to add Host and Region as soon as you specify correct Marketplace value. If your region is not US or .com, please make sure you add the correct Marketplace value.\r\n\r\n### [V4.0 to V5.0 Mapping](%28https://webservices.amazon.com/paapi5/documentation/migration-guide/pa-api-40-to-50-mapping.html)\r\n\r\nDue to major change from V4.0 to V5.0, most of the legacy application may not work properly since V4.0 is not supported anymore.\r\n\r\nWe're currently working on mapping some commonly used operations from the V4.0 and make it available soon to work with the V5.0.\r\n\r\nIn the mean time, please check amazon [documentation](https://webservices.amazon.com/paapi5/documentation/migration-guide/pa-api-40-to-50-mapping.html) on how to map.\r\n\r\n### FAQ\r\n\r\n- What are the available resources I can add in the parameter?\r\n  _Please refer to this [page](https://webservices.amazon.com/paapi5/documentation/resources.html)._\r\n\r\n- How can I do itemLookup using a UPC or EAN?\r\n  _You can lookup using searchItems operation. Add your UPC or EAN under the keyword parameter. More details [here](https://webservices.amazon.com/paapi5/documentation/use-cases/search-with-external-identifiers.html)._\r\n\r\n- What if I included an invalid ASIN value in ASIN array parameter?\r\n  _You will get an error response but the result of the valid ASINs are still included in the response data. Please refer to the last portion of this [page](https://webservices.amazon.com/paapi5/documentation/troubleshooting/processing-of-errors.html)._\r\n\r\n- Is the addCart Operation still supported in V5.0?\r\n  _It is deprecated, But you can use [Add to Cart form](https://webservices.amazon.com/paapi5/documentation/add-to-cart-form.html) to integrate cart on your websites._\r\n\r\n### Donation\r\n\r\nIf this somehow makes your job a bit easier, please consider dropping few bucks.\r\nYour contribution allows me to spend more time improving features of this project.\r\n\r\n[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2N243HNZCXY7J&source=url)\r\n\r\n### License\r\n\r\n[MIT](https://github.com/jorgerosal/amazon-paapi/blob/master/LICENSE)\r\n","readmeFilename":"README.md","_rev":"1-2a2d6e2155762da24da0f400aa94d4c6"}