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) 5.0 to retrieve detailed product information from Amazon. Specifically, the Get Variations operation fetches all variations of a parent product identified by its ASIN (Amazon Standard Identification Number). This is useful for scenarios where you want to explore different versions or models of a product, such as different colors, sizes, or configurations.

Typical use cases include:

  • E-commerce analytics: Gathering all variations of a product to compare prices or availability.
  • Affiliate marketing: Displaying all product options under a single parent listing.
  • Inventory management: Tracking multiple variants of a product in one request.

For example, given a parent ASIN of a clothing item, this operation can return all size and color variations available on Amazon.

Properties

Name Meaning
Partner Tag Your Amazon Partner Tag used for affiliate tracking; overrides default if set
ASIN (for Get Variations) The parent ASIN whose variations you want to retrieve
Resources List of data resources to include in the response. Options include various product info fields like:
- BrowseNodeInfo.BrowseNodes
- Images.Primary.Small/Medium/Large
- ItemInfo.Title
- Offers.Listings.Price
and many more detailed attributes related to images, offers, item info, and availability. Default includes title, price, and medium primary image.
Use OffersV2 Boolean flag to use the newer OffersV2 resource instead of the original Offers resource (requires API version 1.2.2 or higher)
Additional Options Collection of optional parameters:
- Language of Preference: Preferred language for item info (e.g., English, Spanish)
Note: Other additional options mostly apply to other operations and are not relevant here.

Output

The output JSON contains the result of the Get Variations API call structured as follows:

  • success: Boolean indicating if the request was successful.
  • If successful, the response includes detailed variation data according to the requested resources, such as:
    • Variation ASINs and their attributes.
    • Images in requested sizes.
    • Pricing and offer details.
    • Item information like title, features, classifications, etc.
  • If errors occur, the output includes:
    • errors: Array of error objects returned by the API.
    • errorMessage: Concatenated string of error codes and messages.
    • originalResponse: Raw API response containing errors.
  • In case of exceptions during execution, the output contains:
    • success: false
    • errorMessage: Error message string.
    • errorDetail: Stack trace or additional error details if available.

The node does not output binary data.

Dependencies

  • Requires an active Amazon Product Advertising API account with valid credentials including Access Key, Secret Key, Partner Tag, and Marketplace.
  • The node expects these credentials to be configured in n8n and accessible at runtime.
  • Uses the external amazon-paapi library to interact with the Amazon PAAPI endpoints.
  • For the "Use OffersV2" option, the API version must be 1.2.2 or higher.

Troubleshooting

  • Missing Partner Tag: The node throws an error if no Partner Tag is provided either in the node parameter or credentials. Ensure your affiliate tag is correctly set.
  • Missing ASIN for Get Variations: An error is thrown if the ASIN parameter is empty. Provide a valid parent ASIN.
  • API Errors: If the Amazon API returns errors (e.g., invalid ASIN, quota exceeded), they will appear in the output's errors array with detailed messages. Review these messages to adjust input or check API usage limits.
  • Network or Credential Issues: Errors during the API request phase will be caught and reported with stack traces. Verify network connectivity and that credentials are correct and have necessary permissions.
  • OffersV2 Usage: Using the OffersV2 resource requires API version 1.2.2+. If you encounter issues, confirm your API version supports this feature.

Links and References

Discussion