SellerMagnet Blog

Amazon Data Intelligence &
Web Scraping Insights

Tutorials, industry analysis, and best practices for ecommerce data extraction, API integration, and competitive intelligence.

255+
Articles
47+
Topics
Weekly
New Content
Free
Access
Expert Tutorials
Code Examples
Industry Analysis
Best Practices

Articles tagged "Python"

Terminal window with the check_seller_id function that rejects a bad seller ID before any request is sent

Validate an Amazon Seller ID Before You Call the Billing API

/amazon-seller-review only rejects a blank sellerId; every other bad value, from a Buy Box placeholder to Amazon's own ID, reaches the seller lookup as a billed 404. A client-side check against the real seller ID shape and Amazon's own first-party IDs catches those before they cost a credit, tested against a fake HTTP layer with the real helper modules.

Terminal window with Python functions that convert 3 Amazon API price formats to one decimal value

Amazon API Price Format: Cents vs Decimal Across 3 Endpoints

/amazon-product-statistics returns buyBoxPrice as an integer in cents, while /amazon-product-lookup and /amazon-product-offers return decimal currency units, and offers.buyBox.totalPrice is an unrounded float on top of that. A tested Python script normalises all 3 into one comparable price and flags a mismatch when the conversion is missed, the class of bug that makes a mixed-endpoint total 100 times too high.

Terminal window with the five-line Python function that formats an amount in a marketplace's own currency

Amazon Marketplace Currency Codes: A Lookup Table from the API

Amazon marketplace currency codes, names, symbols and default postcodes for all 23 marketplaces, straight from /amazon-get-marketplaces: 17 currencies, a shared dollar sign on two of them and the one marketplace with no decimal places. Includes a tested Python script that builds a cached lookup table and formats invoice lines correctly.

Terminal window with the Python function that checks category_id against the category tree before calling the Amazon Deals API

Amazon Deals API category_id: Why It Silently Returns Fewer Deals

The category_id parameter on /amazon-deals is never validated: an unknown department slug is not rejected, it is passed straight to Amazon's filter and just returns fewer or no deals, billed like any other answer. Check category_id against the real category tree before you call, the same way /amazon-bestsellers is checked, because here there is no error to catch a typo after the fact.

Power Your Business with Amazon Data

Join thousands of developers using SellerMagnet API for real-time Amazon product intelligence. Start extracting data in minutes.

150 free API credits • No credit card required • Cancel anytime