aws-waf-token とチャレンジの回避
AWS WAF Captcha ソルバーAPI
AWS WAF Captcha は、画像チャレンジと、aws-waf-token Cookie を発行する静かな JS の Proof of Work によって、EC2、CloudFront、API Gateway のオリジンを保護します。CaptchaSonicは AwsWafClassification のタスクタイプを通じて有効なトークンを返します。画像グリッドは1秒未満です。そのトークンは、5分のセッション期間中、後続のリクエストで再利用できるようキャッシュできます。
# CaptchaSonic — AWS WAF (Python)
import requests
requests.post('https://api.captchasonic.com/createTask', json={
'clientKey': 'YOUR_API_KEY',
'task': {
'type': 'AwsWafClassification',
'websiteURL': 'https://target.example.com/',
'images': ['base64_1...', 'base64_2...'],
'question': 'Select the galaxy spiral'
}
})
# Poll /getTaskResult; typed_solution.grid.objects holds the chosen cell indices.Sonicを使う理由: aws-waf-token とチャレンジの回避?
速度、信頼性、簡単な連携のために設計されています。
aws-waf-token Cookie
AwsWafClassification は、次のリクエストにそのまま設定できる aws-waf-token の値を返します。JS を手動で実行する必要はありません。
1秒未満で解決
画像グリッド型の AWS WAF チャレンジは、プロセス内の分類処理により1秒未満で解決されます。ヘッドレスブラウザの起動は不要です。
プロキシなしに対応
AWS WAF が検証するのはIPではなくトークンです。ほとんどのオリジンはプロキシなしの解決を受け入れます。地域制限のあるエンドポイントでのみ、米国地域のプロキシを固定してください。
トークンのキャッシュ
AWS WAF のトークンは、オリジンごとに約5分間有効です。毎回再解決するのではなく、レスポンスをキャッシュし、後続のリクエストで再利用してください。
構築に使う
SDK
SDKの例
from captchasonic import CaptchaSonic
client = CaptchaSonic(api_key="YOUR_API_KEY")
result = client.solve_aws_waf(image_b64="...")
print(result.typed_solution.grid.objects)import { CaptchaSonic } from 'captchasonic'
const client = new CaptchaSonic({ apiKey: 'YOUR_API_KEY' })
const result = await client.solveAwsWaf({ imageB64: '...' })
console.log(result.typed_solution.grid.objects)他社との比較
Compare
他社との比較
Feature-by-feature against the four most-mentioned alternatives, compiled from each provider’s public pricing pages. Competitor figures may change — verify current rates with each provider.
| Feature | CaptchaSonic | 2Captcha | CapSolver | Anti-Captcha | CapMonster Cloud |
|---|---|---|---|---|---|
| AI / ML solver (no human relay) | |||||
| AWS WAF | |||||
| Success rate (trailing 30d) | 99.9% | ~95% | ~98% | ~95% | ~97% |
| Proxy + proxyless modes | |||||
| Free trial credits | |||||
| SDK languages (Py, Node, Go, C#, Java, PHP) | 6 | 6 | 4 | 5 | 4 |
| Selenium / Puppeteer / Playwright examples | |||||
| Browser extension | |||||
| Webhook callbacks | |||||
| 99.9% uptime SLA |
よくある質問
AWS WAF Captcha is the bot-mitigation layer Amazon ships with AWS WAF — it protects EC2, CloudFront and API Gateway origins by serving an image-grid challenge plus a silent JS proof-of-work that issues the aws-waf-token cookie. It is widely deployed on e-commerce, ticketing and API endpoints hosted on AWS.
CaptchaSonic handles both the visible image-grid challenge and the silent token issuance flow that AWS WAF uses on high-risk paths. The AwsWafClassification taskType returns the aws-waf-token cookie value ready to set on subsequent requests — no headless browser warm-up required.
AWS WAF tokens are typically valid for around 5 minutes per origin. Cache the returned token in your client and reuse it across multiple requests within that window instead of re-solving on every call — this drops solve spend by 10–50x on busy scrapers.
Image-grid AWS WAF challenges resolve in under one second via the AwsWafClassification in-process classifier. Token-issuance flows that require executing the WAF JS finish in 2–4 seconds. Start with the free trial in the dashboard to benchmark against your traffic.