Skip to main content
Answered

How do I paginate search returns from an API call?

  • March 3, 2021
  • 1 reply
  • 46 views

Hi,

I like to know how i retrieve data from a search when it has multiple pages.

at the moment i do a search call and only can the data of the 1st page (150) conversations.

Best answer by Roy

Hello @dimitri v​ , I hope you are doing well.

 

You should include the next key in the pages hash, More information can be found here:

https://developers.intercom.com/intercom-api-reference/reference#pagination-search

 

==============================

{

"pages": {

"type": "pages",

"next": {

"page": 4,

"starting_after": "1HaSB+xrOyyMXAkS/c1RteCL7BzOzTvYjmjakgTergIH31eoe2v4/sbLsJWP\nIncfQLD3ouPkZlCwJ86F\n"

},

"page": 3,

"per_page": 5,

"total_pages": 10

}

}

==============================

I hope this will be helpful.

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+5
  • Expert User
  • 1152 replies
  • Answer
  • March 4, 2021

Hello @dimitri v​ , I hope you are doing well.

 

You should include the next key in the pages hash, More information can be found here:

https://developers.intercom.com/intercom-api-reference/reference#pagination-search

 

==============================

{

"pages": {

"type": "pages",

"next": {

"page": 4,

"starting_after": "1HaSB+xrOyyMXAkS/c1RteCL7BzOzTvYjmjakgTergIH31eoe2v4/sbLsJWP\nIncfQLD3ouPkZlCwJ86F\n"

},

"page": 3,

"per_page": 5,

"total_pages": 10

}

}

==============================

I hope this will be helpful.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings