You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6ea18c6
Browse filesBrowse the repository at this point in the historyBrowse files
Release 0.1.6: 120s default timeout, error .code for both error shapes
- Default timeout 60s -> 120s (the API's own ceiling; slow successful scrapes run 70s+).
- AmazonScraperAPIError.code and error_code(): reads both {error: code} and
{error: {code: ...}}; the message now shows the code.
- README: examples match the real response shape, error table matches the API,
502 retry advice 60s, removed claims of client-side retries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|**Batch/async jobs**| 1,000 ASINs submitted, webhook-delivered on completion. |
138
142
139
143
**Time saved:** a greenfield Python Amazon scraper built to this spec takes roughly 80 engineer-hours (including anti-bot handling and marketplace variants). This SDK is 10 minutes.
140
144
141
145
## Error handling
142
146
143
-
All failures follow a stable shape so you can match on `code`:
147
+
Every failed call raises `AmazonScraperAPIError` with `status_code`, `code` (the API's error code, or `None`) and `body` (the parsed JSON body). The SDK does not retry on its own, so match on `e.code` and decide:
144
148
145
149
```python
146
-
from amazonscraperapi import AmazonScraperAPI, AsaError
147
150
import time
151
+
from amazonscraperapi import AmazonScraperAPI, AmazonScraperAPIError
| 500 |`INTERNAL_ERROR`| Our bug | Report with `X-Request-Id`|
177
180
181
+
The default request timeout is 120s (the API's own ceiling); override it with `AmazonScraperAPI(api_key=..., timeout=...)`.
182
+
178
183
**Flat-credit promise:** non-2xx responses are free. A basic request costs 5 credits (billing unit; end-customer price is $0.90 per 1,000 basic requests PAYG). Future JS-rendered calls will cost 15 credits. Every response has `X-Request-Id` for traceability — quote it in any support ticket.
0 commit comments