NativePort
← All use cases

Collect Amazon customer reviews

Give your agent review text and ratings from a product page to identify recurring customer feedback.

The problem

A product’s star rating does not explain why customers like it or return it. An agent needs the written reviews to answer that question. Those reviews sit behind a separate interface with sorting, pagination, and access limits that a plain text prompt cannot operate.

How NativePort helps

NativePort lets your agent use an Amazon review collector through Apify. Supply a product URL and a small review limit. The returned records give your agent the customer feedback it needs to group complaints, compare experiences, or support a summary with examples.

Technical implementation

Use Python 3 with requests installed (python -m pip install requests). Set NATIVEPORT_API_KEY in your environment to your NativePort key. Run the snippets on your server, where your key stays private.

Set AMAZON_PRODUCT_URL to a public Amazon product URL. This example requests up to ten recent reviews in one synchronous run using the Actor’s documented inputs.

python
import json
import os
import requests

BASE = "https://api.nativeport.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['NATIVEPORT_API_KEY']}"}

response = requests.post(
    BASE + "/apify/v2/acts/junglee~amazon-reviews-scraper/run-sync-get-dataset-items",
    headers=HEADERS,
    json={"productUrls": [{"url": os.environ["AMAZON_PRODUCT_URL"]}],
          "maxReviews": 10, "sort": "recent",
          "includeGdprSensitive": False},
    timeout=180,
)
response.raise_for_status()
reviews = response.json()
if not isinstance(reviews, list):
    raise RuntimeError("Expected a dataset of review records")
print(json.dumps(reviews, indent=2, ensure_ascii=False))

The limit is a requested maximum; the collector may return fewer reviews. Availability varies by product and marketplace, and the sample does not represent every buyer. Keep review dates and product identifiers with the text before passing it to your agent. For larger collections, follow the asynchronous Apify flow; the cost below applies to the synchronous call shown here.

Tool costs

Tool used in the examplePrice per call
Apify — Amazon Reviews Scraper, one bounded run $0.01055 / call

Prices in USD. Usage-based tools have no fixed per-call price. View pricing.

Let your agent build it

You don’t need to write this code yourself. Copy this page’s link and paste it into your agent. Ask it to follow the guide and implement the feature for you.