Get top recommended items
The Catalog Item Recommendation API returns up to 200 top recommended items from your catalog that are eligible for a campaign. By default, the API returns 100 items. You can customize the number of recommendations returned by using the limit parameter.
Let's say a seller has 500,000 recommended items and wants to retrieve up to 200 top valid recommended items using our API. This API provides the recommended items in a single response and does not support pagination. Here's how it works:
- First API call:
- The seller calls the API.
- The API returns the top 200 valid recommended items.
- Subsequent API call:
- The seller makes another API call.
- The API recognizes that some of the initial 200 items were already retrieved.
- The API then returns the next 200 items, excluding those previously retrieved.
- This process continues, allowing the seller to efficiently manage and check the eligibility of their items.
Additionally, you can utilize the Catalog Search APIs under ITEM MANAGEMENT category on the developer portal to assist with your queries.
Throttling
Request limits: 10 calls per minute per seller. You may receive an HTTP 429 error if you exceed this limit.
Endpoint
GET /v3/advertising/sem/items/recommendation
Sample request
Use this example as a starting point, then modify it with your actual values and any additional parameters described in the API reference.
curl --location 'https://marketplace.walmartapis.com/v3/advertising/sem/items/recommendations?limit=10' \
--header 'WM_SVC.NAME: Search Engine Marketing' \
--header 'WM_QOS.CORRELATION_ID: 09fa4596-d9fb-4258-810b-460dc027b7f7' \
--header 'WM_SEC.ACCESS_TOKEN: **********'
import requests url = "https://marketplace.walmartapis.com/v3/advertising/sem/items/recommendations?limit=10" headers = { "WM_SVC.NAME": "Search Engine Marketing", "WM_QOS.CORRELATION_ID": "09fa4596-d9fb-4258-810b-460dc027b7f7", "WM_SEC.ACCESS_TOKEN": "**********"
} response = requests.get(url, headers=headers) print(response.text)
Modify your code
- If needed, update the
limit
query parameter value of 10 in the URL to the desired number of recommendations to be returned. This value cannot exceed 200. - Use your unique
WM_QOS.CORRELATION_ID
for each request. - Use your unique
WM_SEC.ACCESS_TOKEN
obtained from the Token API.
Sample response
{ "pagination": { "pageNo": 0, "pageSize": 10, "totalCount": 3, "totalPages": 1 }, "data": [ { "itemId": "5014488974", "sku": "sku_07144442400738_test", "productId": "1A2B3C4D5E", "productName": "Wireless Bluetooth Headphones", "categoryName": "Electronics", "productUrl": "/ip/Headphones/5014488974", "productImageUrl": "https://i5-qa.walmartimages.com/asr/dffe200d-117d-4804-a4de-aebbdbe7a616.ccd4b68eb51087086daf6c75197b214b.avif", "recommendationType": "HIGHLY_RECOMMENDED" }, { "itemId": "5014389813", "sku": "sku_00993001888299_test", "productId": "1YO2HKFIAB1E", "productName": "Womens Square Neck Ribbed Sweater Dress", "categoryName": "Clothing", "productUrl": "/ip/Sweater/5014389813", "productImageUrl": "https://i5-qa.walmartimages.com/asr/cc211564-bf4c-4810-8474-3b192a1c8631.e87331cdd32950f6f83a239743ea9816.jpeg", "recommendationType": "HIGHLY_RECOMMENDED" }, { "itemId": "5014389838", "sku": "sku_07148487515983_test", "productId": "2CZOV9ZBND06", "productName": "Low-Fat Milk", "categoryName": "Food & Beverage", "productUrl": "/ip/Milk/5014389838", "productImageUrl": "https://i5-qa.walmartimages.com/asr/030d9eed-3b2c-4d5f-baa3-55c82fa36e0a.5b1cc2147571bae5b3c62016c6220309.jpeg", "recommendationType": "STANDARD_RECOMMENDED" } ]
}
Result
If successful, the API response returns an HTTP status: 200 OK
with a JSON payload containing a list of items and their recommendation type.
Updated about 11 hours ago