Walmart Product Reviews API

/search?engine=walmart_product_reviews API endpoint allows you to scrape the results from the Walmart product reviews via our SerpApi service. Head to the playground for a live and interactive demo.

API Parameters

Search Query

product_id

Required

Parameter defines the unique product identifier to get reviews of a specific product. You need to pass the us_item_id. It can be found from either Organic Results API or Product API results.

Advanced Walmart Parameters

rating

Optional

Parameter is used for filtering reviews by rating.

It can be set to:
1: 1-star,
2: 2-star,
3: 3-star,
4: 4-star,
5: 5-star.

sort

Optional

Parameter is used for sorting reviews.

It can be set to:
relevancy,
helpful,
submission-desc,
submission-asc,
rating-desc,
rating-asc

Pagination

page

Optional

Value is used to get the reviews on a specific page. (e.g., 1 (default) is the first page of results, 2 is the 2nd page of results, 3 is the 3rd page of results, etc.).

Serpapi Parameters

engine

Required

Set parameter to walmart_product_reviews to use the Walmart Product Reviews API engine.

no_cache

Optional

Parameter will force SerpApi to fetch the Walmart Product Reviews results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.

async

Optional

Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.

zero_trace

Optional

Enterprise only. Parameter enables ZeroTrace mode. It can be set to false (default) or true. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult.

api_key

Required

Parameter defines the SerpApi private key to use.

output

Optional

Parameter defines the final output you want. It can be set to json (default) to get a structured JSON of the results, or html to get the raw html retrieved.

API Results

JSON Results

JSON output includes structured data for ratings and reviews.

A search status is accessible through search_metadata.status. It flows this way: Processing -> Success || Error. If a search has failed, error will contain an error message. search_metadata.id is the search ID inside SerpApi.

HTML Results

HTML output is useful to debug JSON results or support features not supported yet by SerpApi. HTML output gives you the raw HTML results from Walmart.
This API does not have html response, just a text. search_metadata.prettify_html_file contains prettified version of the result. It is displayed in the playground.

API Examples

JSON structure overview

{
  ...
  "product": {
    "name": "String - Product name",
    "url": "String - Product link",
    "categories": "Array - Product catagories and sub-categories"
  },
  "overall_rating": "Float - Overall rating from all the reviews on the product",
  "total_count": "Integer - Total number of reviews",
  "ratings": "Array - Rating broken down into 1 - 5 stars",
  "top_positive": "Hash - Highest rated review that customers have found to be the most helpful",
  "top_negative": "Hash - Lowest rated review that customers have found to be the most helpful",
  "reviews": [
    {
      "title": "String - Title of the review",
      "text": "String - Long description of the review",
      "rating": "Integer - Rating given by the user",
      "positive_feedback": "Integer - Total number of users who found this review helpful",
      "negative_feedback": "Integer - Total number of users who downvoted the review",
      "review_submission_time": "String - Submission date of the review",
      "user_nickname": "String - Username who submitted the review",
      "customer_type": "Array - List of customer type (e.g 'VerifiedPurchaser')"
    }
  ]
}

Example results for  product_id: 5689919121

Example results for  product_id: 5689919121

JSON Example

{
  ...
  "product": {
    "name": "Apple AirPods Pro 2",
    "url": "https://www.walmart.com/ip/AirPods-Pro-2nd-generation-with-MagSafe-Case-USB-C/5689919121",
    "categories": [
      {
        "name": "Electronics",
        "url": "https://www.walmart.com/cp/electronics/3944"
      },
      {
        "name": "Audio",
        "url": "https://www.walmart.com/cp/audio/133251"
      },
      {
        "name": "Headphones",
        "url": "https://www.walmart.com/cp/headphones/1095191"
      },
      ...
    ]
  }
  "overall_rating": 4.6,
  "total_count": 5980,
  "ratings": [
    {
      "stars": 1,
      "count": 429
    },
    {
      "stars": 2,
      "count": 53
    },
    {
      "stars": 3,
      "count": 80
    },
    {
      "stars": 4,
      "count": 265
    },
    {
      "stars": 5,
      "count": 5152
    }
  ],
  "top_positive": {
    "title": "Yup",
    "text": "Noise cancelling is awesome!  Battery life for being so tiny is great at 5  hours (depending on if using noise cancelling or not).  They fit comfortable and have great audio quality.  \n\nAnd this coming from a guy who like Apple phones and air pods but just can't justify the cost of a MacBook for a laptop.",
    "rating": 5.0,
    "positive_feedback": 4,
    "negative_feedback": 0,
    "review_submission_time": "2/15/2024",
    "user_nickname": "CJ",
    "customer_type": [
      "VerifiedPurchaser"
    ]
  },
  "top_negative": {
    "title": "Fake just as the reviews say - DO  NOT PURCHASE",
    "text": "The item is fake, the case/ packing box serial number does not match the AirPod serial number. \n\nMy original AirPod that I got from the Apple Store say made in Vietnam. \n\nThe AirPods I purchase from this vendor says made in China. \n\nBefore the item was shipped, I put in a request to cancel this order before it was shipped and it was denied. \n\nI'm not purchasing from Walmart ever again. This has to be the third incident I have ran into with an online order. \n\nThe AirPod on the left is from Walmart. The AirPod on the right is from Apple. \nPlease do not purchase!!",
    "rating": 1.0,
    "positive_feedback": 9,
    "negative_feedback": 2,
    "review_submission_time": "5/21/2024",
    "user_nickname": "Dan",
    "customer_type": [
      "VerifiedPurchaser"
    ]
  },
  "reviews": [
    {
      "position": 1,
      "title": "Yup",
      "text": "Noise cancelling is awesome!  Battery life for being so tiny is great at 5  hours (depending on if using noise cancelling or not).  They fit comfortable and have great audio quality.  \n\nAnd this coming from a guy who like Apple phones and air pods but just can't justify the cost of a MacBook for a laptop.",
      "rating": 5.0,
      "positive_feedback": 4,
      "negative_feedback": 0,
      "review_submission_time": "2/15/2024",
      "user_nickname": "CJ",
      "customer_type": [
        "VerifiedPurchaser"
      ]
    },
    {
      "position": 2,
      "title": "The hype is real - love them",
      "text": "The sound is incredible. I had to remove them to make sure I wasn't listening to the tv. I'd also like to mention that if you're wondering if you can run in them comfortably the answer is yes. They don't get loose or bothersome at all. I've stopped wearing my Shokz because my quit pods are my new fave.",
      "rating": 5.0,
      "positive_feedback": 6,
      "negative_feedback": 0,
      "review_submission_time": "4/7/2024",
      "user_nickname": "Myra",
      "customer_type": [
        "VerifiedPurchaser"
      ]
    },
    {
      "position": 3,
      "title": "Perfect",
      "text": "Perfect in every way (coming from original airpods)\n- noise cancellation is astonishing\n- I have small ears but with small ear tips they fit like no other earbuds do\n- can reach a much louder volume than original airpods\n- ear tips are easy to clean and the actual speaker is deep inside so you're less likely to get the speakers dirty/clogged; also there's a mesh in the ear tip that protects the speaker grille\n- so much more. \nYou need these. Worth every penny.",
      "rating": 5.0,
      "positive_feedback": 33,
      "negative_feedback": 0,
      "review_submission_time": "10/27/2023",
      "user_nickname": "Owen",
      "customer_type": [
        "VerifiedPurchaser",
        "VerifiedPurchaser"
      ]
    },
    ...
  ],
  "pagination": {
    "current": 1,
    "next": "https://www.walmart.com/reviews/product/5689919121?sort=relevancy&page=2",
    "other_pages": {
      "2": "https://www.walmart.com/reviews/product/5689919121?sort=relevancy&page=2",
      "3": "https://www.walmart.com/reviews/product/5689919121?sort=relevancy&page=3",
      "4": "https://www.walmart.com/reviews/product/5689919121?sort=relevancy&page=4",
      "5": "https://www.walmart.com/reviews/product/5689919121?sort=relevancy&page=5",
      "6": "https://www.walmart.com/reviews/product/5689919121?sort=relevancy&page=6",
      "299": "https://www.walmart.com/reviews/product/5689919121?sort=relevancy&page=299"
    }
  },
  "serpapi_pagination": {
    "current": 1,
    "next_link": "https://serpapi.com/search.json?engine=walmart_product_reviews&page=2&product_id=5689919121&sort=relevancy",
    "next": "https://serpapi.com/search.json?engine=walmart_product_reviews&page=2&product_id=5689919121&sort=relevancy",
    "other_pages": {
      "2": "https://serpapi.com/search.json?engine=walmart_product_reviews&page=2&product_id=5689919121&sort=relevancy",
      "3": "https://serpapi.com/search.json?engine=walmart_product_reviews&page=3&product_id=5689919121&sort=relevancy",
      "4": "https://serpapi.com/search.json?engine=walmart_product_reviews&page=4&product_id=5689919121&sort=relevancy",
      "5": "https://serpapi.com/search.json?engine=walmart_product_reviews&page=5&product_id=5689919121&sort=relevancy",
      "6": "https://serpapi.com/search.json?engine=walmart_product_reviews&page=6&product_id=5689919121&sort=relevancy",
      "299": "https://serpapi.com/search.json?engine=walmart_product_reviews&page=299&product_id=5689919121&sort=relevancy"
    }
  }
}