SellerMagnetAPI Python Competitor Review Benchmarking Tool

Building a Python Tool for Amazon Competitor Review Benchmarking with SellerMagnetAPI

By John Smith | September 16, 2025

Introduction

In today's dynamic e-commerce landscape, staying ahead of the competition on Amazon requires more than just intuition. Market analysts and Amazon businesses need concrete data to understand competitor strategies, product performance, and customer sentiment. This blog post demonstrates how to build a Python tool leveraging the power of SellerMagnetAPI (https://sellermagnet-api.com) to benchmark competitor reviews, providing actionable insights for competitive analysis, inventory management, and market research.

SellerMagnetAPI offers an enterprise-grade Amazon data API, providing access to a wealth of real-time data. This post explores how to harness this data using Python to create a custom competitor review benchmarking tool, enabling informed decision-making for your Amazon business.

Why Competitor Review Benchmarking Matters

Understanding what customers are saying about your competitors' products is crucial. It helps you:

  • Identify product strengths and weaknesses
  • Uncover unmet customer needs
  • Discover opportunities for product differentiation
  • Monitor competitor performance and adapt your strategies

By automating this process with a Python tool powered by SellerMagnetAPI, you can gain a significant competitive edge.

Setting Up Your Python Environment

Before diving into the code, ensure you have Python installed. It is recommended that you utilize a virtual environment.

python3 -m venv venv
source venv/bin/activate  # On Linux/macOS
.\venv\Scripts\activate  # On Windows

Next, install the requests library for making HTTP requests:

pip install requests

Accessing Amazon Seller Reviews with SellerMagnetAPI

SellerMagnetAPI's Amazon Seller Review endpoint allows you to retrieve detailed feedback for any Amazon seller. Here's how to use it in Python:

Retrieving Seller Reviews

Use the following code snippet to fetch seller reviews:

import requests

API_KEY = "YOUR_API_KEY" # Replace with your SellerMagnetAPI key
SELLER_ID = "A1B2C3D4E5F6G7" # Example Seller ID
MARKETPLACE_ID = "ATVPDKIKX0DER" # US Marketplace

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()
    print(data)
else:
    print(f"Error: {response.status_code}, {response.text}")

Remember to replace YOUR_API_KEY with your actual SellerMagnetAPI key. You can find a list of supported marketplace IDs using the Get Amazon Marketplaces API.

Example Response

The API returns a JSON response containing seller feedback, including recent reviews and ratings over different time periods:

{
  "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
}

Benchmarking Competitor Product Statistics

Gaining insight into competitor product performance is crucial. The Amazon Product Statistics endpoint offers detailed information, including sales rank and review counts. This allows a comparative analysis of product performance.

Fetching Product Statistics

The following code shows how to fetch product statistics:

import requests

API_KEY = "YOUR_API_KEY" # Replace with your SellerMagnetAPI key
ASIN = "B0CLTBHXWQ" # Example ASIN
MARKETPLACE_ID = "APJ6JRA9NG5V4" # Italian Marketplace

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()
    print(data)
else:
    print(f"Error: {response.status_code}, {response.text}")

Example Response

The API returns detailed product statistics:

{
  "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
}

Building Your Benchmarking Tool

Now, we will combine the above API requests to create a benchmarking tool. This will allow us to collect all the required data points for review comparison.

import requests

API_KEY = "YOUR_API_KEY"  # Replace with your SellerMagnetAPI key
COMPETITOR_SELLER_IDS = ["A1B2C3D4E5F6G7", "A7B8C9D0E1F2G3"]  # Example Seller IDs
ASINS = ["B0CLTBHXWQ", "B0CL61F39H"]  # Example ASINs
MARKETPLACE_ID = "ATVPDKIKX0DER"  # US Marketplace

def get_seller_reviews(seller_id, marketplace_id, api_key):
    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:
        return response.json()
    else:
        print(f"Error fetching seller reviews for {seller_id}: {response.status_code}, {response.text}")
        return None

def get_product_statistics(asin, marketplace_id, api_key):
    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:
        return response.json()
    else:
        print(f"Error fetching product statistics for {asin}: {response.status_code}, {response.text}")
        return None


def benchmark_competitors():
    benchmarking_data = {}

    for seller_id in COMPETITOR_SELLER_IDS:
        seller_reviews = get_seller_reviews(seller_id, MARKETPLACE_ID, API_KEY)
        if seller_reviews and seller_reviews["success"]:
            benchmarking_data[seller_id] = {"seller_reviews": seller_reviews["data"]}

    for asin in ASINS:
        product_stats = get_product_statistics(asin, MARKETPLACE_ID, API_KEY)
        if product_stats and product_stats["success"]:
            if asin not in benchmarking_data:
                benchmarking_data[asin] = {}
            benchmarking_data[asin]["product_statistics"] = product_stats["data"]

    return benchmarking_data


if __name__ == "__main__":
    results = benchmark_competitors()
    print(results)

Additional SellerMagnetAPI Endpoints for Enhanced Analysis

SellerMagnetAPI offers a range of endpoints to enrich your competitor analysis:

Conclusion

By building a Python tool using SellerMagnetAPI, Amazon businesses and market analysts can gain a significant advantage in competitor review benchmarking. This allows for in-depth analysis of product performance, customer sentiment, and competitor strategies.

Enhance your market research and inventory management using SellerMagnetAPI. Explore our Pricing and Try Free today!

For more information, visit our Documentation or Contact us with any questions.

Back to Blog