SellerMagnetAPI Python Tool for Amazon Competitor Review Analysis

Building a Python Tool for Amazon Competitor Review Analysis with SellerMagnetAPI

By John Smith | July 17, 2025

Building a Python Tool for Amazon Competitor Review Analysis with SellerMagnetAPI

In the competitive landscape of Amazon, understanding your competitors is crucial for success. Analyzing competitor reviews provides invaluable insights into product strengths, weaknesses, customer sentiment, and potential market gaps. This blog post guides you through building a Python tool that leverages the SellerMagnetAPI to efficiently analyze Amazon competitor reviews, enabling data-driven decisions for your business.

Why Analyze Competitor Reviews?

Competitor review analysis offers several strategic advantages:

  • Identify Product Strengths and Weaknesses: Understand what customers appreciate or dislike about competitor products.
  • Uncover Market Gaps: Discover unmet needs or areas where competitors underperform.
  • Improve Product Development: Use feedback to enhance your product offerings.
  • Enhance Customer Satisfaction: Address customer pain points identified in reviews.
  • Inform Marketing Strategies: Tailor your messaging to highlight advantages over competitors.

Getting Started with SellerMagnetAPI

The SellerMagnetAPI provides a powerful and efficient way to access Amazon data, including product and seller reviews. Before you begin, ensure you have:

  • A SellerMagnetAPI account and API key.
  • Python 3.6 or later installed.
  • The requests library installed: pip install requests

Use Case 1: Fetching Seller Reviews

Let's start by fetching the latest reviews for a specific Amazon seller. You can use the Amazon Seller Review endpoint to retrieve seller feedback and recent reviews.

Code Example:


import requests

api_key = 'YOUR_API_KEY'
seller_id = 'A1CWSGXIR635I6'  # Example Seller ID
marketplace_id = 'ATVPDKIKX0DER' # Example Marketplace ID (US)

url = f'https://sellermagnet-api.com/amazon-seller-review?sellerId={seller_id}&marketplaceId={marketplace_id}&api_key={api_key}'

response = requests.get(url)

if response.status_code == 200:
    data = response.json()
    if data['success']:
        reviews = data['data']['marketplace'][marketplace_id]['last5Reviews']
        for review in reviews:
            print(f"Date: {review['dateRated']}")
            print(f"Rating: {review['starRating']}")
            print(f"Review: {review['reviewText']}\n")
    else:
        print("Error fetching reviews.")
else:
    print(f"Request failed with status code: {response.status_code}")

Response Example:


{
  "data": {
    "marketplace": {
      "ATVPDKIKX0DER": {
        "last5Reviews": [
          {
            "dateRated": "By gary kraus on June 5, 2025.",
            "reviewText": "great",
            "starRating": "5 out of 5 stars"
          },
          {
            "dateRated": "By Amazon Customer on June 5, 2025.",
            "reviewText": "Ok",
            "starRating": "5 out of 5 stars"
          },
          {
            "dateRated": "By Graciela Casta\u00f1eda on May 21, 2025.",
            "reviewText": "Excelente",
            "starRating": "5 out of 5 stars"
          }
        ],
        "sellerFeedback": {
          "30": {
            "rating": "3.3",
            "reviewsCount": "7"
          },
          "90": {
            "rating": "3.6",
            "reviewsCount": "30"
          },
          "365": {
            "rating": "3.9",
            "reviewsCount": "114"
          },
          "lifetime": {
            "rating": "4.5",
            "reviewsCount": "1,535"
          }
        }
      }
    },
    "sellerId": "A1CWSGXIR635I6"
  },
  "success": true
}

Use Case 2: Analyzing Product Statistics

Analyzing product statistics, such as sales rank and review counts, provides a broader understanding of competitor performance. Use the Amazon Product Statistics endpoint to gather this data.

Code Example:


import requests

api_key = 'YOUR_API_KEY'
asin = 'B0CLTBHXWQ'  # Example ASIN
marketplace_id = 'APJ6JRA9NG5V4' # Example Marketplace ID (Italy)

url = f'https://sellermagnet-api.com/amazon-product-statistics?asin={asin}&marketplaceId={marketplace_id}&api_key={api_key}'

response = requests.get(url)

if response.status_code == 200:
    data = response.json()
    if data['success']:
        product_data = data['data']
        print(f"ASIN: {product_data['asin']}")
        print(f"Buy Box Price: {product_data['buyBoxPrice'] / 100}")
        print(f"Product Review Average: {product_data['productReviewAverage']}")
        print(f"Product Total Reviews: {product_data['productTotalReviews']}")
    else:
        print("Error fetching product statistics.")
else:
    print(f"Request failed with status code: {response.status_code}")

Response Example:


{
  "data": {
    "asin": "B0CLTBHXWQ",
    "productTitle": "Playstation 5 Console Edizione Digital Slim",
    "buyBoxPrice": 41800,
    "buyBoxFulfillment": "FBM",
    "buyBoxSellerIdHistory": [
      [
        "2025-06-14 17:08:00",
        "A2I59UVTUWUFH0"
      ]
    ],
    "categoryTree": [
      {
        "catId": 412603031,
        "name": "Videogiochi"
      },
      {
        "catId": 20904349031,
        "name": "PlayStation 5"
      },
      {
        "catId": 20904364031,
        "name": "Console"
      }
    ],
    "graphs": {
      "amazonAsSellerPriceHistory": "https://sellermagnet-api-webspace.s3.eu-central-1.amazonaws.com/amazon/api/charts/B0CLTBHXWQ/1749913774/B0CLTBHXWQ_amazon_price_1749913773.png",
      "lowestFBAPriceHistory": "https://sellermagnet-api-webspace.s3.eu-central-1.amazonaws.com/amazon/api/charts/B0CLTBHXWQ/1749913776/B0CLTBHXWQ_fba_price_1749913773.png",
      "lowestFBMPriceHistory": "https://sellermagnet-api-webspace.s3.eu-central-1.amazonaws.com/amazon/api/charts/B0CLTBHXWQ/1749913775/B0CLTBHXWQ_fbm_price_1749913773.png",
      "monthlySoldHistory": "https://sellermagnet-api-webspace.s3.eu-central-1.amazonaws.com/amazon/api/charts/B0CLTBHXWQ/1749913778/B0CLTBHXWQ_monthly_sold_1749913773.png",
      "productRatingHistory": "https://sellermagnet-api-webspace.s3.eu-central-1.amazonaws.com/amazon/api/charts/B0CLTBHXWQ/1749913777/B0CLTBHXWQ_rating_1749913773.png"
    },
    "listedSince": "2023-12-30 01:00:00",
    "lowestFBAPrice": 44999,
    "lowestFBMPrice": 41700,
    "marketplaceId": "APJ6JRA9NG5V4",
    "marketplaceNewPriceHistory": [
      [
        "2025-06-14",
        41700
      ]
    ],
    "offers": {
      "A11IL2PNWYJU7H": {
        "isFBA": true,
        "lastUpdated": "2025-06-14 17:08:00",
        "priceHistory": [
          [
            "2025-06-14 06:22:00",
            44999,
            0
          ]
        ],
        "stockHistory": [
          [
            "2025-05-29 11:32:00",
            1
          ]
        ]
      },
      "A12FLY25DT7QO0": {
        "isFBA": false,
        "lastUpdated": "2025-06-14 17:08:00",
        "priceHistory": [
          [
            "2025-06-09 15:32:00",
            41800,
            0
          ]
        ],
        "stockHistory": [
          [
            "2025-06-14 13:34:00",
            49
          ]
        ]
      },
      "A18KSDUE00UP6J": {
        "isFBA": false,
        "lastUpdated": "2025-06-14 17:08:00",
        "priceHistory": [
          [
            "2025-05-29 11:32:00",
            42890,
            0
          ]
        ],
        "stockHistory": [
          [
            "2025-05-30 18:30:00",
            3
          ]
        ]
      }
    },
    "productReviewAverage": 4.7,
    "productTotalReviews": 3129,
    "rootCategory": {
      "id": 412603031,
      "name": "Videogiochi"
    },
    "stats": {
      "amazonAsSellerPriceHistory": [
        [
          "2025-06-14",
          44999
        ]
      ],
      "buyBoxPriceHistory": [
        [
          "2025-06-13",
          41700
        ]
      ],
      "monthlySoldHistory": [
        [
          "2025-06",
          1000
        ]
      ],
      "productRatingCountHistory": [
        [
          "2025-06-14 15:28:00",
          3129
        ]
      ],
      "productRatingHistory": [
        [
          "2025-02-02 01:30:00",
          4.7
        ]
      ],
      "salesRankHistory": [
        [
          "2025-06-14 01:58:00",
          15
        ]
      ]
    }
  },
  "success": true
}

Use Case 3: Combining Seller and Product Data for Comprehensive Analysis

For a comprehensive competitive analysis, combine seller review data with product statistics. This integrated approach provides a holistic view of competitor performance.

Code Example:


import requests

api_key = 'YOUR_API_KEY'
seller_id = 'A1CWSGXIR635I6'
asin = 'B0CLTBHXWQ'
marketplace_id = 'ATVPDKIKX0DER'

# Fetch seller reviews
seller_url = f'https://sellermagnet-api.com/amazon-seller-review?sellerId={seller_id}&marketplaceId={marketplace_id}&api_key={api_key}'
seller_response = requests.get(seller_url)

# Fetch product statistics
product_url = f'https://sellermagnet-api.com/amazon-product-statistics?asin={asin}&marketplaceId={marketplace_id}&api_key={api_key}'
product_response = requests.get(product_url)

if seller_response.status_code == 200 and product_response.status_code == 200:
    seller_data = seller_response.json()
    product_data = product_response.json()

    if seller_data['success'] and product_data['success']:
        # Process seller reviews
        seller_reviews = seller_data['data']['marketplace'][marketplace_id]['last5Reviews']
        print("Seller Reviews:")
        for review in seller_reviews:
            print(f"  Date: {review['dateRated']}")
            print(f"  Rating: {review['starRating']}")
            print(f"  Review: {review['reviewText']}\n")

        # Process product statistics
        product_stats = product_data['data']
        print("\nProduct Statistics:")
        print(f"  ASIN: {product_stats['asin']}")
        print(f"  Buy Box Price: {product_stats['buyBoxPrice'] / 100}")
        print(f"  Product Review Average: {product_stats['productReviewAverage']}")
        print(f"  Product Total Reviews: {product_stats['productTotalReviews']}")

    else:
        print("Error fetching data.")
else:
    print(f"Request failed with status codes: Seller: {seller_response.status_code}, Product: {product_response.status_code}")

Additional SellerMagnetAPI Endpoints for Enhanced Analysis

Enhance your competitor analysis with these additional SellerMagnetAPI endpoints:

Conclusion

Building a Python tool for Amazon competitor review analysis with SellerMagnetAPI empowers businesses to gain a competitive edge through data-driven decision-making. By leveraging the API's capabilities, you can efficiently gather and analyze critical data, optimize product offerings, and enhance customer satisfaction.

Ready to take your Amazon competitive analysis to the next level? Explore SellerMagnetAPI pricing plans and start your free trial today!

Back to Blog