0

I am finding solution get magento2 product data via rest api page by page . I am currently using below search Criteria

mydomaim.com/index.php/rest/V1/products?searchCriteria[pageSize]=12

but I need get results page by page because if i have 5000 product i have to set page size 5000 .

I checked doc there is searchCriteria[currentPage] but nothing found for nth page results.

is there any searchCriteria to accomplish this.

I need Get Results using multiple requests

as example first request return 1-200 products second request return 201-400 results I need some searchCriteria to accomplish this

1

As mentioned http://devdocs.magento.com/guides/v2.1/howdoi/webapi/search-criteria.html

You can put your condition & use

searchCriteria[pageSize] - Specifies the maximum number of items to return. The value must be an integer. If the pageSize is not specified, the system returns all matches.

https://cyrillschumacher.com/2015/01/02/magento2---search-parameters-for-the-rest-api/

"current_page": 1, 
"page_size": 10

You have to Use Both in your case

| improve this answer | |
  • yes.but if i want get result between 200-400 how i achieve it. I need to minimize results for single request and get page by page results multiple request – srinath madusanka Oct 13 '16 at 3:22
  • @srinathmadusanka Please check updated answer – Ankit Shah Oct 13 '16 at 3:29
  • Most welcome @srinathmadusanka – Ankit Shah Oct 13 '16 at 3:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.