        fmt = "%04d" % (x)
        filename = prefix + "-" + fmt + ext
        with open(filename, 'w') as outfile:
            payload['p'] = x
            r = requests.get(base_url, params=payload)
            res = json.loads(r.text)
            print(res['currentPage'])
            json.dump(res['data'], outfile)