This question already has an answer here:

I'm using the XMLRPC::Lite module fetch posts from my website like so:

use XMLRPC::Lite;

my $result = XMLRPC::Lite->proxy('http://example.com/xmlrpc.php)
   ->call('wp.getPosts', '', 'admin', 'xxxxx', {post_type => "tribe_events', number => 20});

This returns 20 posts. If I don't include the number property, it returns 10 results by default. Let's say I want to get all the posts. Is there a way to do it without setting some arbitrarily large number for the number property? Are these results paged somehow?

marked as duplicate by birgire, Dave Romsey, cjbj, Howdy_McGee May 10 '17 at 4:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    yes the pagination is the way to go. The usual -1 for all posts isn't supported as it's filtered through absint(). Also note there's a new kid on the block: Rest API ;-) – birgire May 8 '17 at 19:35

OK, doesn't look like there is a way to do this. I see now there is an orderby and offset property which can be used by the client to make repeated calls to get all the posts.

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