Search code examples
walmart-api

Walmart Search doesn't honor responseGroup parameter


I'm trying to query the Search API and in the url I set responseGroup=base to limit the items in the response, but it's still sending me all 31 item properties back (vs. 12 in the base group) which consumes 4x the bandwidth and memory I require.

Here's an example of my query:

https://api.walmartlabs.com/v1/search?apiKey=[myapikey]&numItems=1&start=1&query=apple%20watch%20screen%20protector&responseGroup=base

and the response:

{
  "query": "apple watch screen protector",
  "sort": "relevance",
  "responseGroup": "base",
  "totalResults": 707,
  "start": 1,
  "numItems": 1,
  "items": [{
    "itemId": 469667798,
    "parentItemId": 469667798,
    "name": "RinoGear [6-PACK] Apple Watch 38mm (Series 1, 2, 3) Screen Protector [Active Protection] Sport Flexible HD Crystal Clear Anti-Bubble Film",
    "msrp": 6.95,
    "salePrice": 4.95,
    "upc": "712038084487",
    "categoryPath": "Jewelry/Watches/Mens Watches/Mens Smart Watches",
    "shortDescription": "RinoGear is the internet's leading manufacturer of screen protection products for active and daily use. Are you tired of screen protectors that: 1. Get scratched easily? 2. Only give you one chance to install it in position?3. Distort the images on your screen?4. Simply do not provide adequate protection? INTRODUCING: RinoGear -- The Original Active Screen Protectors * Active Protection - Designed for active use, highly flexible, damage protection.* Military-Grade Material - Virtually indestructible film used by the military to protect aircraft surfaces.* Invisible Ultra Clear - Advanced optical material is used to ensure you get the highest visibility on your screen.* Easy Application - Installation is done by "wet application" which allows you to re-position the film as many times on the surface unlike typical screen protectors.* Bubble Free and Anti-Yellowing - Advanced polymer adhesive is used to prevent the forming of air bubbles and discoloration.* No Sticky Residue - Film from your screen leaves no sticky residue.Why Use A Screen Protector? ALL Screens Get Damaged:Despite the grade of glass, screens still scratch or get damaged. Even so-called unscratchable glass still get scratched. Our tests have proven that no type of screen is invulnerable from damage Damage Comes From Anywhere / Anytime:New tech devices such as smartwatches or phones are expensive. Even placing it in a pocket or purse can ruin it. Don’t risk damaging your tech by not protecting it. Why Use RinoGear SHIELD? Tested Under Harsh Active Conditions:Our screen protectors are put to harsh and extreme conditions by runners, hikers, cyclists, and the like. It can most definitely handle regular wear & tear even if you’re not active.What's Included? * RinoGear film* Microfiber cleaning cloth* Installation assist card* Detailed instructions",
    "longDescription": "THE ORIGINAL active screen protector for Apple Watch 38mm - designed for active use, precision laser cut for perfect fitment; made with unique flexible "smart skin" material",
    "thumbnailImage": "https://i5.walmartimages.com/asr/aa328cfa-a315-4d39-ab35-1ce106981d23_1.74cba72df03d8c16ba7ffe44856da654.jpeg?odnHeight=100&odnWidth=100&odnBg=FFFFFF",
    "mediumImage": "https://i5.walmartimages.com/asr/aa328cfa-a315-4d39-ab35-1ce106981d23_1.74cba72df03d8c16ba7ffe44856da654.jpeg?odnHeight=180&odnWidth=180&odnBg=FFFFFF",
    "largeImage": "https://i5.walmartimages.com/asr/aa328cfa-a315-4d39-ab35-1ce106981d23_1.74cba72df03d8c16ba7ffe44856da654.jpeg?odnHeight=450&odnWidth=450&odnBg=FFFFFF",
    "productTrackingUrl": "http://linksynergy.walmart.com/fs-bin/click?id=|LSNID|&offerid=223073.7200&type=14&catid=8&subid=0&hid=7200&tmpid=1082&RD_PARM1=https%253A%252F%252Fwww.walmart.com%252Fip%252FRinoGear-6-PACK-Apple-Watch-38mm-Series-1-2-3-Screen-Protector-Active-Protection-Sport-Flexible-HD-Crystal-Clear-Anti-Bubble-Film%252F469667798%253Faffp1%253DkGhYtF3qwzvpUaAP8p5ePeswUiHqBuEtoaWj4POSEkc%2526affilsrc%253Dapi",
    "standardShipRate": 0,
    "marketplace": true,
    "sellerInfo": "TBE Fulfillment",
    "productUrl": "http://c.affil.walmart.com/t/api02?l=https%3A%2F%2Fwww.walmart.com%2Fip%2FRinoGear-6-PACK-Apple-Watch-38mm-Series-1-2-3-Screen-Protector-Active-Protection-Sport-Flexible-HD-Crystal-Clear-Anti-Bubble-Film%2F469667798%3Faffp1%3DkGhYtF3qwzvpUaAP8p5ePeswUiHqBuEtoaWj4POSEkc%26affilsrc%3Dapi%26veh%3Daff%26wmlspartner%3Dreadonlyapi",
    "customerRating": "4.333",
    "numReviews": 2,
    "customerRatingImage": "http://i2.walmartimages.com/i/CustRating/4_3.gif",
    "categoryNode": "3891_3906_1490361",
    "rhid": "32332",
    "bundle": false,
    "stock": "Available",
    "addToCartUrl": "http://c.affil.walmart.com/t/api02?l=http%3A%2F%2Faffil.walmart.com%2Fcart%2FaddToCart%3Fitems%3D469667798%7C1%26affp1%3DkGhYtF3qwzvpUaAP8p5ePeswUiHqBuEtoaWj4POSEkc%26affilsrc%3Dapi%26veh%3Daff%26wmlspartner%3Dreadonlyapi",
    "affiliateAddToCartUrl": "http://linksynergy.walmart.com/fs-bin/click?id=|LSNID|&offerid=223073.7200&type=14&catid=8&subid=0&hid=7200&tmpid=1082&RD_PARM1=http%253A%252F%252Faffil.walmart.com%252Fcart%252FaddToCart%253Fitems%253D469667798%257C1%2526affp1%253DkGhYtF3qwzvpUaAP8p5ePeswUiHqBuEtoaWj4POSEkc%2526affilsrc%253Dapi",
    "freeShippingOver35Dollars": false,
    "giftOptions": {},
    "imageEntities": [{
        "thumbnailImage": "https://i5.walmartimages.com/asr/d34ed9de-b16d-4d4b-bf01-2e0037220859_1.89304402d998330766cc88ffc6f105af.jpeg?odnHeight=100&odnWidth=100&odnBg=FFFFFF",
        "mediumImage": "https://i5.walmartimages.com/asr/d34ed9de-b16d-4d4b-bf01-2e0037220859_1.89304402d998330766cc88ffc6f105af.jpeg?odnHeight=180&odnWidth=180&odnBg=FFFFFF",
        "largeImage": "https://i5.walmartimages.com/asr/d34ed9de-b16d-4d4b-bf01-2e0037220859_1.89304402d998330766cc88ffc6f105af.jpeg?odnHeight=450&odnWidth=450&odnBg=FFFFFF",
        "entityType": "SECONDARY"
      },
      {
        "thumbnailImage": "https://i5.walmartimages.com/asr/ca2f25a1-b2b9-48ac-aa07-caaf81a2a888_1.f5692dd141c31331e89b74f4dfbe78bc.jpeg?odnHeight=100&odnWidth=100&odnBg=FFFFFF",
        "mediumImage": "https://i5.walmartimages.com/asr/ca2f25a1-b2b9-48ac-aa07-caaf81a2a888_1.f5692dd141c31331e89b74f4dfbe78bc.jpeg?odnHeight=180&odnWidth=180&odnBg=FFFFFF",
        "largeImage": "https://i5.walmartimages.com/asr/ca2f25a1-b2b9-48ac-aa07-caaf81a2a888_1.f5692dd141c31331e89b74f4dfbe78bc.jpeg?odnHeight=450&odnWidth=450&odnBg=FFFFFF",
        "entityType": "SECONDARY"
      },
      {
        "thumbnailImage": "https://i5.walmartimages.com/asr/91995a72-4490-4209-9c0a-5f39781d4e6b_1.4ccae1cbbfc7c8f2e7ceb89170cd3687.jpeg?odnHeight=100&odnWidth=100&odnBg=FFFFFF",
        "mediumImage": "https://i5.walmartimages.com/asr/91995a72-4490-4209-9c0a-5f39781d4e6b_1.4ccae1cbbfc7c8f2e7ceb89170cd3687.jpeg?odnHeight=180&odnWidth=180&odnBg=FFFFFF",
        "largeImage": "https://i5.walmartimages.com/asr/91995a72-4490-4209-9c0a-5f39781d4e6b_1.4ccae1cbbfc7c8f2e7ceb89170cd3687.jpeg?odnHeight=450&odnWidth=450&odnBg=FFFFFF",
        "entityType": "SECONDARY"
      },
      {
        "thumbnailImage": "https://i5.walmartimages.com/asr/181c8dce-312f-4b40-83b5-5e34c9b832a5_1.0b5589b7a9cbeb0a293c7bb51fed9b69.jpeg?odnHeight=100&odnWidth=100&odnBg=FFFFFF",
        "mediumImage": "https://i5.walmartimages.com/asr/181c8dce-312f-4b40-83b5-5e34c9b832a5_1.0b5589b7a9cbeb0a293c7bb51fed9b69.jpeg?odnHeight=180&odnWidth=180&odnBg=FFFFFF",
        "largeImage": "https://i5.walmartimages.com/asr/181c8dce-312f-4b40-83b5-5e34c9b832a5_1.0b5589b7a9cbeb0a293c7bb51fed9b69.jpeg?odnHeight=450&odnWidth=450&odnBg=FFFFFF",
        "entityType": "SECONDARY"
      },
      {
        "thumbnailImage": "https://i5.walmartimages.com/asr/4cc53f1e-ad60-4b53-98dc-1d794cd096f9_1.7834b744d625fde3f56830c11de9eb99.jpeg?odnHeight=100&odnWidth=100&odnBg=FFFFFF",
        "mediumImage": "https://i5.walmartimages.com/asr/4cc53f1e-ad60-4b53-98dc-1d794cd096f9_1.7834b744d625fde3f56830c11de9eb99.jpeg?odnHeight=180&odnWidth=180&odnBg=FFFFFF",
        "largeImage": "https://i5.walmartimages.com/asr/4cc53f1e-ad60-4b53-98dc-1d794cd096f9_1.7834b744d625fde3f56830c11de9eb99.jpeg?odnHeight=450&odnWidth=450&odnBg=FFFFFF",
        "entityType": "SECONDARY"
      },
      {
        "thumbnailImage": "https://i5.walmartimages.com/asr/e1582526-6f8d-4942-833c-a3cbfd56e0e5_1.660e5fdba3e0502f8730b17e75e363ff.jpeg?odnHeight=100&odnWidth=100&odnBg=FFFFFF",
        "mediumImage": "https://i5.walmartimages.com/asr/e1582526-6f8d-4942-833c-a3cbfd56e0e5_1.660e5fdba3e0502f8730b17e75e363ff.jpeg?odnHeight=180&odnWidth=180&odnBg=FFFFFF",
        "largeImage": "https://i5.walmartimages.com/asr/e1582526-6f8d-4942-833c-a3cbfd56e0e5_1.660e5fdba3e0502f8730b17e75e363ff.jpeg?odnHeight=450&odnWidth=450&odnBg=FFFFFF",
        "entityType": "SECONDARY"
      },
      {
        "thumbnailImage": "https://i5.walmartimages.com/asr/aa328cfa-a315-4d39-ab35-1ce106981d23_1.74cba72df03d8c16ba7ffe44856da654.jpeg?odnHeight=100&odnWidth=100&odnBg=FFFFFF",
        "mediumImage": "https://i5.walmartimages.com/asr/aa328cfa-a315-4d39-ab35-1ce106981d23_1.74cba72df03d8c16ba7ffe44856da654.jpeg?odnHeight=180&odnWidth=180&odnBg=FFFFFF",
        "largeImage": "https://i5.walmartimages.com/asr/aa328cfa-a315-4d39-ab35-1ce106981d23_1.74cba72df03d8c16ba7ffe44856da654.jpeg?odnHeight=450&odnWidth=450&odnBg=FFFFFF",
        "entityType": "PRIMARY"
      }
    ],
    "offerType": "ONLINE_ONLY",
    "availableOnline": true
  }],
  "facets": []
}

The base responseGroup should only have 12 properties in it, but has 31.


Solution

  • It seems the API does actually honor the responseGroup parameter as the response does differ slightly between full and base, also the API response itself indicates if it is of type base or full.

    It just seems the documentation is outdated, this happens all over the place. It is for example also not possible to request format=xml even though that is stated as possible. The only different keys you get in a full response seem to be brandName, clearance, preOrder, attributes.

    They do however state that the API is still in beta so I presume they're actively working on it without updating the documentation.