Amazon PA API icon

Amazon PA API

Interact with Amazon Product Advertising API 5.0 (PAAPI)

Overview

This node integrates with the Amazon Product Advertising API (PAAPI) to retrieve detailed product information from Amazon. Specifically, the "Get Items" operation allows users to fetch data about one or more products by their ASINs (Amazon Standard Identification Numbers). This is useful for scenarios such as price comparison, affiliate marketing, inventory management, or enriching product catalogs with up-to-date Amazon data.

For example, a user can input a list of ASINs and receive comprehensive details including titles, images, pricing, availability, and other metadata. The node supports selecting specific resource fields to tailor the response to the user's needs.

Properties

Name Meaning
Partner Tag Amazon Partner Tag used for affiliate tracking; overrides default if set.
Item IDs (for Get Items) Comma-separated list of ASINs identifying the items to retrieve information for.
Resources List of resource fields to include in the response, e.g., item titles, prices, images, offers, etc.
Use OffersV2 Boolean flag to use the newer OffersV2 resource format (requires API version 1.2.2 or higher).
Additional Options Collection of optional parameters:
- Language of Preference Preferred language for item information (e.g., English, Spanish, French, German, Italian, Japanese).
(Other options shown are for Search Items operation and not applicable here.)

The Resources property includes many selectable options such as:

  • BrowseNodeInfo.BrowseNodes
  • Images.Primary.Small / Medium / Large
  • ItemInfo.Title, ItemInfo.ByLineInfo, ItemInfo.Features, etc.
  • Offers.Listings.Price, Offers.Listings.Condition, Offers.Summaries.LowestPrice, etc.
  • OffersV2 equivalents if Use OffersV2 is enabled

Output

The node outputs an array of JSON objects, each representing the result of a request for one or more items. Each output object contains:

  • success: Boolean indicating if the request was successful.
  • If successful, the response includes detailed Amazon PAAPI data structured according to requested resources, such as item metadata, images, pricing, availability, and offers.
  • If errors occur, the output includes:
    • errors: Array of error objects returned by the API.
    • errorMessage: Concatenated string of error codes and messages.
    • originalResponse: The full original API response for debugging.
  • In case of exceptions during execution, the output contains:
    • success: false
    • errorMessage: Error message string
    • errorDetail: Stack trace or additional error details

The node does not output binary data.

Dependencies

  • Requires valid credentials for the Amazon Product Advertising API, including access key, secret key, partner tag, and marketplace.
  • The node uses the external amazon-paapi library to interact with the Amazon PAAPI.
  • The "Use OffersV2" option requires API version 1.2.2 or higher.
  • Proper configuration of the Amazon PAAPI credentials in n8n is necessary.

Troubleshooting

  • Missing Partner Tag: The node throws an error if no partner tag is provided either in the node parameter or credentials. Ensure this is set correctly.
  • Missing Item IDs: For the "Get Items" operation, providing ASINs is mandatory. An error will be thrown if none are supplied.
  • API Errors: If the Amazon PAAPI returns errors (e.g., invalid ASIN, quota exceeded), these are logged and included in the output under errors and errorMessage.
  • Credential Issues: Invalid or expired API keys will cause authentication failures.
  • Version Compatibility: Using the "Use OffersV2" option without the required API version may lead to unexpected errors.
  • Network or Timeout Issues: Network problems or slow responses from Amazon's API can cause request failures.

To resolve issues:

  • Verify all required parameters are set.
  • Check that credentials are valid and have appropriate permissions.
  • Review error messages returned in the output for specific API error codes.
  • Ensure the API version supports selected features.

Links and References

Discussion