Learn how Scrivito CMS can help you deliver amazing digital experiences
See Scrivito CMS in action


Fetches a specific number of search results.

If count is not specified, all results are returned.


  • count (Number) – maximum number of search results to be returned.


Array<Obj> – An array of Obj instances matching the search criteria. If count is given, the length of the array is less than or equal to count.


Perform a full-text search for “easy”, limiting the result set to 20 CMS objects:

topResults = Scrivito.Obj.where("*", "containsPrefix", "easy").take(20);

Fetch the latest three blog posts:

allPosts = Scrivito.Obj.where('_objClass', 'equals', 'BlogPost'); latestPosts = allPosts.order('_createdAt', 'desc').take(3);

Since take() returns an array, there is no need to use the spread operator:

allObjs = Scrivito.Obj.all().take();

See also

first, toArray