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.

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: 520468661

Example results for  product_id: 520468661

JSON Example

{
  ...
  "product": {
    "name": "Apple AirPods Pro Wireless Earbuds w/ Charging Case, MWP22AM/A - White",
    "url": "https://www.walmart.com/ip/Apple-AirPods-Pro-Wireless-Earbuds-w-Charging-Case-MWP22AM-A-White/520468661",
    "categories": [
      {
        "name": "Electronics",
        "url": "https://www.walmart.com/cp/3944"
      },
      {
        "name": "Audio",
        "url": "https://www.walmart.com/cp/133251"
      },
      {
        "name": "Headphones",
        "url": "https://www.walmart.com/cp/1095191"
      },
      ...
    ]
  }
  "overall_rating": 4.6,
  "total_count": 6829,
  "ratings": [
    {
      "stars": 1,
      "count": 395
    },
    {
      "stars": 2,
      "count": 110
    },
    {
      "stars": 3,
      "count": 213
    },
    {
      "stars": 4,
      "count": 501
    },
    {
      "stars": 5,
      "count": 5610
    }
  ],
  "top_positive": {
    "title": "The BEST earbuds. Period.",
    "text": "The best earbuds I've ever used. I didn't believe people when they said how good these were until I got my hands on some for myself. They were paired almost instantly as soon as I took them out of the box. The noise cancellation is incredible!!!! And the transparency mode makes it possible to keep your AirPods in while checking out at the grocery store or any situation like that. These are awesome and WELL worth the $200 price point I paid for them. I HIGHLY recommend these.",
    "rating": 5,
    "positive_feedback": 6,
    "negative_feedback": 0,
    "review_submission_time": "5/3/2021",
    "user_nickname": "trevor",
    "customer_type": [
      "VerifiedPurchaser"
    ]
  },
  "top_negative": {
    "title": "DON'T BUY ONLINE",
    "text": "Opened the box and they weren't new, there was ear wax in the case and headphones. Case was completely scratched up. Walked out to my car opened them, walked back in to return them and Walmart wouldn't take them back and have to go through apple to try to get a pair. Serial numbers don't match. When I open the case it says not you pods.",
    "rating": 1,
    "positive_feedback": 10,
    "negative_feedback": 1,
    "review_submission_time": "4/25/2021",
    "user_nickname": "Tanner",
    "customer_type": [
      "VerifiedPurchaser"
    ]
  },
  "reviews": [
    {
      "title": "The BEST earbuds. Period.",
      "text": "The best earbuds I've ever used. I didn't believe people when they said how good these were until I got my hands on some for myself. They were paired almost instantly as soon as I took them out of the box. The noise cancellation is incredible!!!! And the transparency mode makes it possible to keep your AirPods in while checking out at the grocery store or any situation like that. These are awesome and WELL worth the $200 price point I paid for them. I HIGHLY recommend these.",
      "rating": 5,
      "positive_feedback": 6,
      "negative_feedback": 0,
      "review_submission_time": "5/3/2021",
      "user_nickname": "trevor",
      "customer_type": [
        "VerifiedPurchaser"
      ]
    },
    {
      "title": "Great Product and Service",
      "text": "Awesome process. Ordered them to pick up in store which was quick and easy. The new pickup tower saves so much time because I literally went in and received them instantly once I got there. The employee was very kind and understanding. Once the AirPods are on they feel comfortable and don't feel like they're going to come off. I love the audio and how much power they hold for being so small.",
      "rating": 5,
      "positive_feedback": 23,
      "negative_feedback": 3,
      "review_submission_time": "1/20/2021",
      "user_nickname": "Marlene",
      "customer_type": [
        "VerifiedPurchaser"
      ]
    },
    {
      "title": "Great product and fast shipping.",
      "text": "Very good product. I am happy I bought it. I was tired of using wired earbuds so I decided to buy the AirPods Pro. This Airpods are a game changer. Definitely worth the money. Would not pay $250 but if they are on sale for around $200 then it is a good buy. I order my AirPods December 20th and delivery date was the 26th but they arrived on the 23rd. Very happy with the experience.",
      "rating": 5,
      "positive_feedback": 22,
      "negative_feedback": 3,
      "review_submission_time": "12/24/2020",
      "user_nickname": "Ankit",
      "customer_type": [
        "VerifiedPurchaser"
      ]
    },
    ...
  ],
  "pagination": {
    "current": 1,
    "next": "https://www.walmart.com/reviews/product/520468661?sort=relevancy&page=2",
    "other_pages": {
      "2": "https://www.walmart.com/reviews/product/520468661?sort=relevancy&page=2",
      "3": "https://www.walmart.com/reviews/product/520468661?sort=relevancy&page=3",
      "4": "https://www.walmart.com/reviews/product/520468661?sort=relevancy&page=4",
      "5": "https://www.walmart.com/reviews/product/520468661?sort=relevancy&page=5",
      "6": "https://www.walmart.com/reviews/product/520468661?sort=relevancy&page=6",
      "342": "https://www.walmart.com/reviews/product/520468661?sort=relevancy&page=342"
    }
  },
  "serpapi_pagination": {
    "current": 1,
    "next": "https://serpapi.com/search.json?device=desktop&engine=walmart_product_reviews&page=2&product_id=520468661",
    "other_pages": {
      "2": "https://serpapi.com/search.json?device=desktop&engine=walmart_product_reviews&page=2&product_id=520468661",
      "3": "https://serpapi.com/search.json?device=desktop&engine=walmart_product_reviews&page=3&product_id=520468661",
      "4": "https://serpapi.com/search.json?device=desktop&engine=walmart_product_reviews&page=4&product_id=520468661",
      "5": "https://serpapi.com/search.json?device=desktop&engine=walmart_product_reviews&page=5&product_id=520468661",
      "6": "https://serpapi.com/search.json?device=desktop&engine=walmart_product_reviews&page=6&product_id=520468661",
      "342": "https://serpapi.com/search.json?device=desktop&engine=walmart_product_reviews&page=342&product_id=520468661"
    }
  }
}