Walmart Product API

This endpoint will retrieve Walmart product details.

try {
String apiKey = "APIKEY";
String product_id = "PRODUCT";
String url = "<https://api.scraperapi.com/structured/walmart/product?api_key=>" + 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();
}

Parameters
Details

API_KEY (required)

User account’s normal API key

PRODUCT_ID (required)

Walmart Product id. Exmaple: 5253396052

OUTPUT_FORMAT

For structured data methods we offer CSV and JSON output. JSON is default if parameter is not added. Options:

  • csv

  • json

Sample Response

{
  "product_name": "AT&T Samsung Galaxy S24 Ultra Titanium Violet 512GB",
  "product_description": "Do more with the most epic Galaxy yet. Capture every detail of your candlelight meal with impressive Nightography and zoom in to see the live violinist playing across the room.Once you’re back in your hotel, elevate your pics from good to great right on your Galaxy S24 Ultra. You can even use your built in S Pen to add fun doodles before posting. Unleash new ways to create, connect and more with Galaxy S24 Ultra. Epic, just like that.",
  "brand": "SAMSUNG",
  "image": "https://i5.walmartimages.com/seo/AT-T-Samsung-Galaxy-S24-Ultra-Titanium-Violet-512GB_784b47ee-bfb7-4543-af9d-5406c37ffed5.fa51da09222008a396f35c6e245e2e2a.jpeg",
  "offers": [
    {
      "url": "https://www.walmart.com/ip/AT-T-Samsung-Galaxy-S24-Ultra-Titanium-Violet-512GB/5253396052",
      "availability": "InStock",
      "available_delivery_method": "OnSitePickup",
      "item_condition": "NewCondition"
    }
  ]
}

Last updated