use offset and limit inside api