get json, build pagination