Answered

How do I paginate search returns from an API call?

  • 3 March 2021
  • 1 reply
  • 45 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.

icon

Best answer by Roy 4 March 2021, 03:13

View original

1 reply

Userlevel 1
Badge

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.

Reply