The `paapi5-typescript-sdk` is an unofficial TypeScript SDK designed for interacting with Amazon's Product Advertising API 5.0. As of its latest release, v0.2.0, it provides a comprehensive set of classes and types for constructing and sending requests such as `SearchItemsRequest`, `GetItemsRequest`, and `GetBrowseNodesRequest`. The library internally handles the AWS V4 signing process via the `SignHelper` class, abstracting away much of the authentication complexity. Being unofficial, its development and alignment with Amazon's API updates are dependent on the maintainer. It ships with full TypeScript types, making it ideal for type-safe Node.js environments. This SDK simplifies interaction with PAAPI 5.0, which migrated from XML to JSON responses and deprecated PAAPI 4.0 in 2020. While Amazon provides official SDKs for other languages like Python, this TypeScript version fills a gap for Node.js developers seeking a type-safe interface.
npm install paapi5-typescript-sdkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to instantiate and send a `GetItemsRequest` to Amazon's Product Advertising API 5.0, fetching product details by ASIN.
Be prepared to manually update the SDK or fork it if Amazon introduces breaking changes to PAAPI 5.0 that are not promptly addressed by this library's maintainer.
Always review the release notes or GitHub commit history when upgrading to new versions, even minor ones. Thorough testing after upgrades is recommended.
If authentication errors persist, verify the custom `SignHelper` implementation against the official AWS V4 signing documentation. Consider using AWS's own signing libraries if you encounter persistent issues.
Always ensure the `Host` and `Region` enums passed to request constructors (or `CommonRequest`) accurately reflect the Amazon locale (e.g., `Host.UnitedStates` for `amazon.com`) and your AWS credentials' region.
Implement proper error handling with exponential backoff and retry mechanisms for API requests. Review Amazon's PAAPI 5.0 documentation on request limits and best practices for making API calls.
Double-check your `accessKey`, `secretKey`, `partnerTag`, `Host`, and `Region` values. Ensure they are correct for the Amazon marketplace you are targeting and that your keys are active and valid for PAAPI 5.0. Use the official PAAPI 5.0 Scratchpad to validate your credentials and parameters outside of the SDK.
Verify that `SignHelper` is instantiated with the correct credentials and that its output, specifically the `Authorization` header, is properly incorporated into the outgoing request. Ensure all required headers like `x-amz-date`, `host`, `x-amz-target`, and `content-type` are present and correctly formatted.
Consult the official Amazon Product Advertising API 5.0 documentation for the exact request type (e.g., `GetItems`, `SearchItems`) and its required parameters. Ensure all fields are correctly named, have valid values, and that required fields are not missing. Pay attention to case sensitivity and expected data types.
No dependency data recorded yet.