Issue api offset limit

Avoid the creation of huge collection of objects in memory when when querying in API.