amzn / selling-partner-api-models

This repository contains OpenAPI models for developers to use when developing software to call Selling Partner APIs.
Apache License 2.0
612 stars 737 forks source link

listCatalogItems always return only 10 items #1253

Closed ouroboros25 closed 3 years ago

ouroboros25 commented 3 years ago

Hello! Using listCatalogItems method, I always get only 10 items in the payload array. Do you know how to change this limit, or how to get all others products?

Screenshot at Apr 21 11-58-39
chapmanjw commented 3 years ago

Hello @ouroboros25. The v0 listCatalogItems operation was ported from the MWS Products API ListMatchingProducts operation. That operation has a max results size of 10.

From http://docs.developer.amazonservices.com/en_US/products/Products_ListMatchingProducts.html:

This operation returns a maximum of ten products and does not return non-buyable products.

chapmanjw commented 3 years ago

@ouroboros25 The 2020-12-01 version of the searchCatalogItems operation now returns more results than the previous listCatalogItems v0 operation did: https://github.com/amzn/selling-partner-api-docs/blob/main/guides/en-US/use-case-guides/catalog-items-api-use-case-guide/catalog-items-use-case-guide_2020-12-01.md.

ak5 commented 3 years ago

@chapmanjw is this actually true? I am still only seeing 10 results even after specifying page size to be 20

chapmanjw commented 3 years ago

@ak5 The parameter is there, but as you have noted, it's not applying correctly. My team is working on fixing that bug. :-(

robinchen123 commented 3 years ago

@ak5 The parameter is there, but as you have noted, it's not applying correctly. My team is working on fixing that bug. :-(

Hi @chapmanjw Is this bug fixed?

chapmanjw commented 2 years ago

@robinchen123 @ak5 The fix that was applied here is only applicable to the 2020-12-01 version of the Catalog Items API. The v0 API has a fixed limit of 10, whereas the 2020-12-01 version accepts the pageSize parameter. This fix was applied in August.

robinchen123 commented 2 years ago

@chapmanjw I always get 40 different asins from 2020-12-01 version searchItem API though the result told me there are thousands of asins. Many asins are duplicate from the result of all pages and only 40 asins are different.

request url is /catalog/2020-12-01/items?keywords=tablet&marketplaceIds=ATVPDKIKX0DER&pageSize=20

B08HHG91Q7 B08HJSL27Q B093JZ7XTG B07DRMXYDP B01KW0Y9IG B07XKVXPCX B079FVFGB3 B093KPQF14 B07SVTR3R5 B07V8G5JWX B00I3PLMBA B07PPQSCP8 B07C4ZW711 B00C2E2KLO B0821VGKZJ B074PDT1LQ B0002CA8ZS B093RYP61Z B07N15381Q B08Q8QQB44 B00CS1WDBI B000ILXLPM B005HGBEZ2 B004Q662YC B00SJTT8BG B008ATM5YC B08DXC832S B0912DBPVY B07QTJSQZ1 B07HCZLML5 B002OOWC3I B09FYDCGC8 B00VGOXVGO B005HGBF9W B09FSKG22S B007A173JI B01BVWT7FO B01DMQPQYS B008J5UFXA B01LRZVCZI B00CS1WDBI B000ILXLPM B005HGBEZ2 B004Q662YC B00SJTT8BG B008ATM5YC B08DXC832S B0912DBPVY B07QTJSQZ1 B07HCZLML5 B002OOWC3I B00VGOXVGO B09FYDCGC8 B005HGBF9W B09FSKG22S B007A173JI B01DMQPQYS B01BVWT7FO B008J5UFXA B01LRZVCZI B00CS1WDBI B000ILXLPM B005HGBEZ2 B004Q662YC B00SJTT8BG B008ATM5YC B08DXC832S B0912DBPVY B07QTJSQZ1 B07HCZLML5 B002OOWC3I B00VGOXVGO B09FYDCGC8 B005HGBF9W B09FSKG22S B007A173JI B01DMQPQYS B01BVWT7FO B008J5UFXA B01LRZVCZI B00CS1WDBI B000ILXLPM B005HGBEZ2 B004Q662YC B00SJTT8BG B008ATM5YC B08DXC832S B0912DBPVY B07QTJSQZ1 B07HCZLML5 B002OOWC3I B09FYDCGC8 B00VGOXVGO B005HGBF9W B09FSKG22S B007A173JI B01BVWT7FO B01DMQPQYS B008J5UFXA B01LRZVCZI B00CS1WDBI B000ILXLPM B005HGBEZ2 B004Q662YC B00SJTT8BG B008ATM5YC B08DXC832S B0912DBPVY B07QTJSQZ1 B07HCZLML5 B002OOWC3I B09FYDCGC8 B00VGOXVGO B005HGBF9W B09FSKG22S B007A173JI B01BVWT7FO B01DMQPQYS B008J5UFXA B01LRZVCZI ​

chapmanjw commented 2 years ago

@robinchen123 There is a known behavior "bug" (or feature, depends who you ask) where variation children in search results are rolling up to the variation parent. This gets weird in search results as you only see the parent, not knowing that the child is what actually matched the query and not knowing which child matched. We will be addressing this behavior in ~Q1 2022, but I don't have firm timelines on that yet.

The counts in the APIs are estimates of the total number of possible ASIN matches. For very broad queries, the API will only page through the first 1000 results.