Search code examples
javascriptmeetup

Get more than 200 group members from the Meetup API


Using the Meetup API, I'm able to successfully get exactly 200 members from any given group. There are a lot of groups that have more members than that. I want to know how to get them all.

The issue
I haven't been able to find where &page=### is documented. I'm assuming it sets how many results are returned in the response from Meetup.

I have tried using, for example, &page=1000, but I still only get 200 members back.

The request URL
I'm using this URL to request the data:

let meetupReqUrl = "https://api.meetup.com/2/members?&sign=true&group_id=" 
                  + groupId 
                  + "&key=" 
                  + apiKeys.meetup
                  + "&order=joined"
                  + "&page=1000"

This variation also returns exactly 200 members:

let meetupReqUrl = "https://api.meetup.com/2/members?&sign=true&group_id=" 
                  + groupId 
                  + "&order=joined"
                  + "&page=1000" 
                  + "&key=" 
                  + apiKeys.meetup

It may be worth noting that &order=joined is not sorting the results at all. This leads me to believe I am doing something wrong in forming the URL.

Related documentation
Meetup's /2/members API is documented here.


Solution

  • It seems the maximum number of results you can get at once through the API is 200 - see https://github.com/jkutianski/meetup-api/wiki#limits.

    You can however make multiple requests as per http://www.meetup.com/meetup_api/#making_request. It says you need to use the page and offset parameters. From the meetup.com link:

    page -- the page size (maximum number of results in each response) to use on the results

    offset -- the starting page for results to return. For example, when page = 10, specifying "offset=0" will bring back records 1-10, "offset=1" will bring records 11-20, etc.