Add some error checking to help diagnose when response fails json parsing. Send a browser like User-Agent to prevent getting blocked by CloudFlare.