![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
amazon-paapi
Advanced tools
Amazon Associate Product Advertising API for NodeJs. A PAAPI 5.0 Extension.
Amazon Associate Product Advertising API for NodeJs. A PAAPI 5.0 Extension.
A clean wrapper for amazon's NodeJs SDK. Main purpose of this module is to jumpstart development with easy to understand and clean syntax inspired with the amazon scratchpad-like operation.
npm install amazon-paapi --save
const amazonPaapi = require('amazon-paapi');
const commonParameters = {
AccessKey: '<YOUR ACCESS KEY>',
SecretKey: '<YOUR SECRET KEY>',
PartnerTag: '<YOUR PARTNER TAG>', // yourtag-20
PartnerType: 'Associates', // Default value is Associates.
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.
};
const requestParameters = {
ASIN: 'B07H65KP63',
Resources: [
'ItemInfo.Title',
'Offers.Listings.Price',
'VariationSummary.VariationDimension',
],
};
/** Promise */
amazonPaapi
.GetVariations(commonParameters, requestParameters)
.then((data) => {
// do something with the success response.
console.log(data);
})
.catch((error) => {
// catch an error.
console.log(error);
});
const amazonPaapi = require('amazon-paapi');
const commonParameters = {
AccessKey: '<YOUR ACCESS KEY>',
SecretKey: '<YOUR SECRET KEY>',
PartnerTag: '<YOUR PARTNER TAG>', // yourtag-20
PartnerType: 'Associates', // Default value is Associates.
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.
};
Lookup information for a Browse Node. Please see sample script here.
const requestParameters = {
BrowseNodeIds: ['3040', '3045'],
LanguagesOfPreference: ['es_US'],
Resources: ['BrowseNodes.Ancestor', 'BrowseNodes.Children'],
};
/** Promise */
amazonPaapi
.GetBrowseNodes(commonParameters, requestParameters)
.then((data) => {
// do something with the success response.
console.log(data);
})
.catch((error) => {
// catch an error.
console.log(error);
});
Lookup item information for an item. Please see sample script here.
Note: This operation only supports ASIN as id Type. If you need to lookup using UPC or EAN, you can do so under
SearchItems
operation.
const requestParameters = {
ItemIds: ['B00X4WHP5E', 'B00ZV9RDKK'],
ItemIdType: 'ASIN',
Condition: 'New',
Resources: [
'Images.Primary.Medium',
'ItemInfo.Title',
'Offers.Listings.Price',
],
};
/** Promise */
amazonPaapi
.GetItems(commonParameters, requestParameters)
.then((data) => {
// do something with the success response.
console.log(data);
})
.catch((error) => {
// catch an error.
console.log(error);
});
Lookup information for variations. Please see sample script here.
const requestParameters = {
ASIN: 'B07H65KP63',
Resources: [
'Images.Primary.Medium',
'ItemInfo.Title',
'Offers.Listings.Price',
'VariationSummary.VariationDimension',
],
};
/** Promise */
amazonPaapi
.GetVariations(commonParameters, requestParameters)
.then((data) => {
// do something with the success response.
console.log(data);
})
.catch((error) => {
// catch an error.
console.log(error);
});
Searches for items on Amazon. Please see sample script here.
const requestParameters = {
Keywords: 'Harry Potter',
SearchIndex: 'Books',
ItemCount: 2,
Resources: [
'Images.Primary.Medium',
'ItemInfo.Title',
'Offers.Listings.Price',
],
};
/** Promise */
amazonPaapi
.SearchItems(commonParameters, requestParameters)
.then((data) => {
// do something with the success response.
console.log(data);
})
.catch((error) => {
// catch an error.
console.log(error);
});
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.Due 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.
We're currently working on mapping some commonly used operations from the V4.0 and make it available soon to work with the V5.0.
In the mean time, please check amazon documentation on how to map.
What are the available resources I can add in the parameter? Please refer to this page.
How can I do itemLookup using a UPC or EAN? You can lookup using searchItems operation. Add your UPC or EAN under the keyword parameter. More details here.
What if I included an invalid ASIN value in ASIN array parameter? 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.
Is the addCart Operation still supported in V5.0? It is deprecated, But you can use Add to Cart form to integrate cart on your websites.
If this somehow makes your job a bit easier, please consider dropping few bucks. Your contribution allows me to spend more time improving features of this project.
FAQs
Amazon Associate Product Advertising API for NodeJs. A PAAPI 5.0 Extension.
The npm package amazon-paapi receives a total of 676 weekly downloads. As such, amazon-paapi popularity was classified as not popular.
We found that amazon-paapi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.