Pagination in search 1.1


Hi, is the proper way to paginate in search 1.1 to get the search_metadata and use refresh_url? (seems like the url is there… even when no more pages)

Is there a way to tell how many pages there are?

When I am done getting them all?

Would be nice to show an example?



I’m not sure what the proper way is. Here is what I do to get successively older “pages”.

After your first query, set these parameters in your search query:
max_id = [last status returned].id - 1
since_id = search_metadata.max_id_str

You can’t query how many pages there are.

You are done when the number of statuses returned is less than 15 (or less than the value of “count” if you use that parameter in your query).


As mentioned in [node:10644] and [node:10734], we’re still doing some work on the metadata in 1.1 search responses. “Classic” pagination won’t be available in this method, and you should use the same methods suggested in [node:6213] to navigate search results.

refresh_url will be staying, but it’s less about getting another page of results and more about getting the most recent results since the last time you executed your query. next_page will be removed since it no longer has meaning. results_per_page will become count to reflect the parameter you’ve given. We’ll be giving a method to determine if there are available remaining results from the past in your query, but not the number of possible results in your set.

Watch the [node:10734] ticket for updates on this output format.


how about a single example of code that works?
I’ve seen better documentation on a box of cereal.

Lots of talk about ID’s but no demonstrated method on how to use it.
Twitter Technical Writers = FAIL


Yes, they truly failed.


Did anybody figure out how to get older tweets…the max i seem to get is around 250-270 tweets


an app that cant paginate tweets is awefull… i can’t just fetch the 1000 tweets i need all at once… you guys should know better than that =/


Hmmm… I don’t know yet…


any example …sample please