I found out why I was getting an error.

The api key that I was using was incorrect. I need to get a new one.