I am getting a HTTP 429 Too Many Requests response when I attempt to access any Reddit page using a .json extension using Java.
I am using Java code found here without any modification (except to change the target URL). I am attempting to access URLs such as the following:
- http://www.reddit.com/r/news.json
- http://www.reddit.com/r/news/comments/3aqhk7/a_17yearold_invented_an_ingenious_way_to.json
I can access these pages just fine using a browser, but cannot access them programmatically despite the fact I am making a single request each time and waiting in between. Reddit returns this message when more than 30 requests are made in a minute, but I am making far less than that and no-one else on my network uses Reddit.
Is anyone familiar with this and why I might be getting these errors? Would there be a better way to approach this using Java?
Make sure to use a custom user-agent string - see the 4th bullet point on the API rules: