Amazon Login Actor
Pricing
$0.15 / actor start
Amazon Login Actor
Performs Amazon browser login with fingerprint and returns fresh cookies. Called by the reviews scraper when cookies expire.
Pricing
$0.15 / actor start
Rating
0.0
(0)
Developer
agi
Maintained by CommunityActor stats
0
Bookmarked
11
Total users
6
Monthly active users
23 days ago
Last modified
Categories
Share
An Apify Actor that performs Amazon browser login with a simulated Windows Chrome fingerprint and returns fresh session cookies. Called by the ../apify/ when scraped cookies expire.
How it works
- Generates a Windows Chrome fingerprint via
browserforge(part of the Crawlee ecosystem) — User-Agent, navigator properties, screen dimensions all consistent with a real Windows desktop Chrome session. - Launches headless Chromium (Playwright, managed by Crawlee) with:
--password-store=basic,--disable-features=PasswordManager,WebAuthnUI,WebAuthenticationto suppress password-save dialogs and Windows security prompts- WebAuthn / Credentials API blocked via
add_init_script - Persistent context (
launch_persistent_context) for static resource caching
- Navigates the Amazon login flow (email → password → 2FA → challenges), same logic as
gologin-worker. - Extracts all cookies from the browser context and outputs them.
Input
| Field | Type | Required | Description |
|---|---|---|---|
account | string | yes | Amazon account email |
password | string | yes | Amazon account password |
country | string | yes | Marketplace country code (e.g. US, GB, DE) |
faToken | string | no | TOTP shared secret for 2FA. Leave empty if the account has no 2FA. |
Output
Saved to the run's key-value store under key OUTPUT:
{"status": "success","country": "US","domain": "www.amazon.com","cookie_count": 42,"cookies": [{"name": "session-id","value": "...","domain": ".amazon.com","path": "/","expires": 1234567890.0,"httpOnly": true,"secure": true,"sameSite": "None"}]}
Possible status values: success, suspended, failed.
On failure, error and message fields are included (plus logs for debugging on dev accounts).
Logging
Only developer accounts see full stdout logs (config.is_dev_account() — based on DEV_USER_IDS, CRAWLER_VERBOSE_LOG, dev build tag, or local run without ACTOR_RUN_ID). All other runs output only public milestones. Sensitive fields (password, 2FA token, cookies) are redacted in logs regardless of account type.
Integration with the Reviews Scraper
The scraper calls this actor via Actor.call() when it detects an expired session (SessionExpiredError):
- Scraper acquires a session from the server → gets cookies + credentials
- Scraper scrapes with those cookies
- If
SessionExpiredError→ scraper calls this login actor with the credentials - Login actor returns fresh cookies → scraper retries scraping once
- If the retry still fails → no further retry, the ASIN is marked as failed
To enable, set the LOGIN_ACTOR_ID environment variable on the scraper actor (to this login actor's ID). If unset, the scraper falls back to the original server-based cookie retry loop.
Development
# Install dependenciespip install -r requirements.txtplaywright install chromium# Run locallypython -m src