Walmart Reviews API

Scrape Walmart product reviews into structured JSON/CSV using ScraperAPI in Java. Filter by rating, date, or relevance. Ideal for sentiment and UX analysis.

This endpoint will retrieve reviews for a specified product from a Walmart reviews page and transform it into usable JSON.

try {
  String apiKey = "APIKEY";
  String product = "5253396052";

  String url = "https://api.scraperapi.com/structured/walmart/review?api_key=2b47bf207cdd9c147b2bb69a779ec6d3&product_id=1347882796" + apiKey + "&product_id=" + product;
  URL urlForGetRequest = new URL(url);
  String readLine = null;
  HttpURLConnection conection = (HttpURLConnection) urlForGetRequest.openConnection();
  conection.setRequestMethod("GET");
  int responseCode = conection.getResponseCode();
  if (responseCode == HttpURLConnection.HTTP_OK) {
  BufferedReader in = new BufferedReader(new InputStreamReader(conection.getInputStream()));
  StringBuffer response = new StringBuffer();
  while ((readLine = in.readLine()) != null) {
    response.append(readLine);
  }
  in.close();
  System.out.println(response.toString());
  } else {
    throw new Exception("Error in API Call");
  }
} catch (Exception ex) {
  ex.printStackTrace();
}

Parameter
Details

api_key

Your API Key.

product_id

Walmart Product id. Example: 5253396052

sort

Sort by option. Valid values are:

relevancy helpful submission-desc submission-asc rating-desc rating-asc

ratings

Comma-separated number list of review ratings. Supported values: 1,2,3,4,5 - used in any combination.

verified_purchase

Boolean - true or false. Filters reviews only from verified purchases when set to true.

page

Specify the page number

TLD

Top level domain. Valid values are com and ca

Sample Response

Last updated

Was this helpful?