A while ago I threw together a Python script that used the Octopart API to download part data (for my own personal use, on the order of a few dozen parts at a time once every weeks to months). Worked fine for a long time, but suddenly, as of today, I've been ratelimited. Below is a transcript of a TCP session my script made, and this was the FIRST PART I tried to search for:
GET /api/v2/parts/search?q=1N4148WSFSCT-ND&filters=%5B%5B%22supplier%22%2C+%5B%22Digi-Key%22%5D%5D%5D HTTP/1.1
Accept-Encoding: identity
Host:
octopart.comConnection: close
User-Agent: Python-urllib/3.2
HTTP/1.1 403 Forbidden
Content-Type: text/html; charset=utf-8
Date: Fri, 05 Oct 2012 04:57:24 GMT
Content-Length: 119
Connection: Close
{"message": "Blocked by rate limiter. Unblock yourself here: /ratelimiter/unblock", "__class__": "ClientErrorResponse"}
I went to
octopart.com/ratelimiter/unblock and filled out the CAPTCHA. On submitting it sent by browser back to the front page, but running my script still failed on the very first part. I've tried this from two IP addresses now (on campus and at home). I'm reasonably certain my home IP has been the same for at least a few weeks, I haven't used Octopart for months before today, and I know nobody else here uses it. Why am I ratelimited?
(Minor side note, your 403 response is served with Content-Type text/html but obviously is not; perhaps it should be application/json?)
Thanks!