Add pagination support, allow to fetch more than 500 items

In short it is not possible to fetch more than 500 records, this pull request solves the problem.