{"id":31673686,"url":"https://github.com/robot-inventor/paapi5-nodejs-sdk","last_synced_at":"2025-10-08T04:02:46.009Z","repository":{"id":313505523,"uuid":"1050486629","full_name":"Robot-Inventor/paapi5-nodejs-sdk","owner":"Robot-Inventor","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-25T14:57:41.000Z","size":205,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-25T16:41:35.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Robot-Inventor.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.txt","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-04T13:54:35.000Z","updated_at":"2025-09-07T08:15:31.000Z","dependencies_parsed_at":"2025-09-06T15:15:18.393Z","dependency_job_id":"8eda61ba-8be3-4b1d-b31b-8b439ed5c477","html_url":"https://github.com/Robot-Inventor/paapi5-nodejs-sdk","commit_stats":null,"previous_names":["robot-inventor/paapi5-nodejs-sdk"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Robot-Inventor/paapi5-nodejs-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fpaapi5-nodejs-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fpaapi5-nodejs-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fpaapi5-nodejs-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fpaapi5-nodejs-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Robot-Inventor","download_url":"https://codeload.github.com/Robot-Inventor/paapi5-nodejs-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robot-Inventor%2Fpaapi5-nodejs-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278886423,"owners_count":26062975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-08T04:00:52.619Z","updated_at":"2025-10-08T04:02:45.994Z","avatar_url":"https://github.com/Robot-Inventor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Product Advertising API 5.0 SDK for NodeJS\n\n[![NPM](https://nodei.co/npm/@robot-inventor/paapi5-nodejs-sdk.svg?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/@robot-inventor/paapi5-nodejs-sdk/)\n\n[![Version](https://badge.fury.io/js/@robot-inventor/paapi5-nodejs-sdk.svg)](http://badge.fury.io/js/@robot-inventor/paapi5-nodejs-sdk) [![npm](https://img.shields.io/npm/dt/@robot-inventor/paapi5-nodejs-sdk.svg)](https://www.npmjs.com/package/@robot-inventor/paapi5-nodejs-sdk)\n\n\u003e [!IMPORTANT]\n\u003e This package is an unofficial distribution of the Product Advertising API 5.0 SDK for NodeJS. The sample code has been removed and TypeScript support has been added.\n\u003e\n\u003e Current base version: v1.1.0\n\n## Installation\n\n### For [Node.js](https://nodejs.org/)\n\nThe Product Advertising API NodeJS SDK can be installed via [npm](https://www.npmjs.com/package/@robot-inventor/paapi5-nodejs-sdk):\n\n```shell\nnpm install @robot-inventor/paapi5-nodejs-sdk --save\n```\n\nYou should now be able to `require('paapi5-nodejs-sdk')` in javascript files.\n\n### For browser\n\nThe library also works in the browser environment via npm and [browserify](http://browserify.org/). After following\nthe above steps with Node.js and installing browserify with `npm install -g browserify`,\nperform the following (assuming *main.js* is your entry file, that's to say your javascript file where you actually\nuse this library):\n\n```shell\nbrowserify main.js \u003e bundle.js\n```\n\nThen include *bundle.js* in the HTML pages.\n\n### Webpack Configuration\n\nUsing Webpack you may encounter the following error: \"Module not found: Error:\nCannot resolve module\", most certainly you should disable AMD loader. Add/merge\nthe following section to your webpack config:\n\n```javascript\nmodule: {\n  rules: [\n    {\n      parser: {\n        amd: false\n      }\n    }\n  ]\n}\n```\n\n## Getting Started\n\nPlease follow the [installation](#installation) instruction and execute the following JS code:\n\nSimple example for [SearchItems](https://webservices.amazon.com/paapi5/documentation/search-items.html) to discover Amazon products with the keyword 'Harry Potter' in Books category:\n\n```javascript\nvar ProductAdvertisingAPIv1 = require('paapi5-nodejs-sdk');\n\nvar defaultClient = ProductAdvertisingAPIv1.ApiClient.instance;\n\n// Specify your credentials here. These are used to create and sign the request.\ndefaultClient.accessKey = '\u003cYOUR ACCESS KEY\u003e';\ndefaultClient.secretKey = '\u003cYOUR SECRET KEY\u003e';\n\n/**\n * PAAPI Host and Region to which you want to send request.\n * For more details refer: https://webservices.amazon.com/paapi5/documentation/common-request-parameters.html#host-and-region\n */\ndefaultClient.host = 'webservices.amazon.com';\ndefaultClient.region = 'us-east-1';\n\nvar api = new ProductAdvertisingAPIv1.DefaultApi();\n\n// Request Initialization\n\nvar searchItemsRequest = new ProductAdvertisingAPIv1.SearchItemsRequest();\n\n/** Enter your partner tag (store/tracking id) and partner type */\nsearchItemsRequest['PartnerTag'] = '\u003cYOUR PARTNER TAG\u003e';\nsearchItemsRequest['PartnerType'] = 'Associates';\n\n/** Specify Keywords */\nsearchItemsRequest['Keywords'] = 'Harry Potter';\n\n/**\n * Specify the category in which search request is to be made\n * For more details, refer: https://webservices.amazon.com/paapi5/documentation/use-cases/organization-of-items-on-amazon/search-index.html\n */\nsearchItemsRequest['SearchIndex'] = 'Books';\n\n/** Specify item count to be returned in search result */\nsearchItemsRequest['ItemCount'] = 2;\n\n/**\n * Choose resources you want from SearchItemsResource enum\n * For more details, refer: https://webservices.amazon.com/paapi5/documentation/search-items.html#resources-parameter\n */\nsearchItemsRequest['Resources'] = ['Images.Primary.Medium', 'ItemInfo.Title', 'Offers.Listings.Price'];\n\nfunction onSuccess(data) {\n  console.log('API called successfully.');\n  var searchItemsResponse = ProductAdvertisingAPIv1.SearchItemsResponse.constructFromObject(data);\n  console.log('Complete Response: \\n' + JSON.stringify(searchItemsResponse, null, 1));\n  if (searchItemsResponse['SearchResult'] !== undefined) {\n    console.log('Printing First Item Information in SearchResult:');\n    var item_0 = searchItemsResponse['SearchResult']['Items'][0];\n    if (item_0 !== undefined) {\n      if (item_0['ASIN'] !== undefined) {\n        console.log('ASIN: ' + item_0['ASIN']);\n      }\n      if (item_0['DetailPageURL'] !== undefined) {\n        console.log('DetailPageURL: ' + item_0['DetailPageURL']);\n      }\n      if (\n        item_0['ItemInfo'] !== undefined \u0026\u0026\n        item_0['ItemInfo']['Title'] !== undefined \u0026\u0026\n        item_0['ItemInfo']['Title']['DisplayValue'] !== undefined\n      ) {\n        console.log('Title: ' + item_0['ItemInfo']['Title']['DisplayValue']);\n      }\n      if (\n        item_0['Offers'] !== undefined \u0026\u0026\n        item_0['Offers']['Listings'] !== undefined \u0026\u0026\n        item_0['Offers']['Listings'][0]['Price'] !== undefined \u0026\u0026\n        item_0['Offers']['Listings'][0]['Price']['DisplayAmount'] !== undefined\n      ) {\n        console.log('Buying Price: ' + item_0['Offers']['Listings'][0]['Price']['DisplayAmount']);\n      }\n    }\n  }\n  if (searchItemsResponse['Errors'] !== undefined) {\n    console.log('Errors:');\n    console.log('Complete Error Response: ' + JSON.stringify(searchItemsResponse['Errors'], null, 1));\n    console.log('Printing 1st Error:');\n    var error_0 = searchItemsResponse['Errors'][0];\n    console.log('Error Code: ' + error_0['Code']);\n    console.log('Error Message: ' + error_0['Message']);\n  }\n}\n\nfunction onError(error) {\n  console.log('Error calling PA-API 5.0!');\n  console.log('Printing Full Error Object:\\n' + JSON.stringify(error, null, 1));\n  console.log('Status Code: ' + error['status']);\n  if (error['response'] !== undefined \u0026\u0026 error['response']['text'] !== undefined) {\n    console.log('Error Object: ' + JSON.stringify(error['response']['text'], null, 1));\n  }\n}\n\napi.searchItems(searchItemsRequest).then(\n  function(data) {\n    onSuccess(data);\n  },\n  function(error) {\n    onError(error);\n  }\n);\n```\n\nComplete documentation, installation instructions, and examples are available [here](https://webservices.amazon.com/paapi5/documentation/index.html).\n\n## License\nThis SDK is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0), see LICENSE.txt and NOTICE.txt for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobot-inventor%2Fpaapi5-nodejs-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobot-inventor%2Fpaapi5-nodejs-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobot-inventor%2Fpaapi5-nodejs-sdk/lists"}