#summary How to filter people requests to return data beyond the 20 default friends = Introduction = Orkut's implementation of `newFetchPeopleRequest` defaults to returning only 20 results at a time. This page shows some approaches to manipulating the results returned by this call. = Details = The following examples can be run in CodeRunner. The numbers listed here apply to running CodeRunner on the following profile: http://sandbox.orkut.com/Application.aspx?uid=623810516818840635&appId=218116460194 This profile currently has 35 friends, 5 of which have this application installed. ==Standard request== This is a default request, limited to 20 people *Outputs 20* {{{ function response(data) { output(data.get("req").getData().size()); gadgets.window.adjustHeight(); }; function request() { var req = opensocial.newDataRequest(); var params = {}; req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS, params), "req"); req.send(response); }; request(); }}} ==Request the next 20 people== By adding a `opensocial.DataRequest.PeopleRequestFields.FIRST` parameter to the request, you can choose where the next paged call of results will begin: *Outputs 15* {{{ function response(data) { output(data.get("req").getData().size()); gadgets.window.adjustHeight(); }; function request() { var req = opensocial.newDataRequest(); var params = {}; params[opensocial.DataRequest.PeopleRequestFields.FIRST] = 20; req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS, params), "req"); req.send(response); }; request(); }}} ==Ask for more people to be returned per request== If you just want to request more people, you can supply the `opensocial.DataRequest.PeopleRequestFields.MAX` tag: *Outputs 35* {{{ function response(data) { output(data.get("req").getData().size()); gadgets.window.adjustHeight(); }; function request() { var req = opensocial.newDataRequest(); var params = {}; params[opensocial.DataRequest.PeopleRequestFields.MAX] = 100; req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS, params), "req"); req.send(response); }; request(); }}} ==Filter returned people by whether they have the application installed== Specify the `opensocial.DataRequest.PeopleRequestFields.FILTER` parameter as `opensocial.DataRequest.FilterType.HAS_APP` to only return friends that have the application installed: *Outputs 5* {{{ function response(data) { output(data.get("req").getData().size()); gadgets.window.adjustHeight(); }; function request() { var req = opensocial.newDataRequest(); var params = {}; params[opensocial.DataRequest.PeopleRequestFields.MAX] = 100; params[opensocial.DataRequest.PeopleRequestFields.FILTER] = opensocial.DataRequest.FilterType.HAS_APP; req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.OWNER_FRIENDS, params), "req"); req.send(response); }; request(); }}}