プロキシ取得
プロキシ取得
Section titled “プロキシ取得”対象に最適化されたプロキシエンドポイントを取得します。
エンドポイント
Section titled “エンドポイント”GET /v1/proxy| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
target | string | はい | 対象ドメイン(例: amazon.com) |
session_lock | boolean | いいえ | セッション中、同じ IP を維持(デフォルト: false) |
country | string | いいえ | ISO 3166-1 alpha-2 の国コード |
ip_type | string | いいえ | residential、datacenter、または dedicated |
session_ttl | integer | いいえ | セッションのタイムアウト(秒、デフォルト: 1800) |
auto_heal | boolean | いいえ | 自動フェイルオーバーを有効化(デフォルト: true) |
curl "https://api.hydraskill.ai/v1/proxy?target=amazon.com&session_lock=true&country=US" \ -H "Authorization: Bearer sk-your-key"{ "proxy_id": "px_abc123", "host": "us-res-42.proxy.hydraskill.ai", "port": 8080, "username": "session_abc123", "password": "px_token_xyz", "ip": "203.0.113.42", "country": "US", "type": "residential", "session_lock": true, "expires_at": "2026-05-30T16:30:00Z", "protocol": "http"}HTTP クライアントでの利用
Section titled “HTTP クライアントでの利用”proxy = client.get_proxy(target="amazon.com", session_lock=True)
# requests 互換の dict に変換proxies = proxy.to_dict()# {'http': 'http://user:pass@host:port', 'https': 'http://user:pass@host:port'}
response = requests.get(url, proxies=proxies)エラーコード
Section titled “エラーコード”| コード | 意味 |
|---|---|
| 400 | 必須パラメータ target が欠落 |
| 401 | API key が無効 |
| 402 | 残高不足/プラン上限に到達 |
| 429 | レート制限を超過 |
| 503 | 指定条件に合う利用可能なプロキシがない |