ReCAPTCHA v3
Solve ReCAPTCHA v3 challenges programmatically
ReCAPTCHA v3 API
Generate valid ReCAPTCHA v3 tokens programmatically for your automation needs.
Endpoint
GET https://castlebreaker.cc/getRecapToken
Authentication
Requires X-API-Key header with your API key.
Request
Simple GET request with no additional parameters required:
curl -X GET "https://castlebreaker.cc/getRecapToken" \
-H "X-API-Key: YOUR_API_KEY"
Response Format
Success Response
{
"status": "success",
"data": {
"token": "03AFcWeA7B4X2rVk9..."
},
"credits": 9.00
}
Error Response
{
"status": "error",
"message": "Insufficient credits",
"credits": 0.00
}
Response Fields
| Field | Type | Description |
|---|---|---|
status | string | Request status: "success" or "error" |
data.token | string | The generated ReCAPTCHA v3 token |
credits | number | Remaining credits in your account |
message | string | Error message (only present if status is "error") |
Pricing
- $1.00 per 1000 tokens
- $0.001 per token (0.1ยข)
- Deducted only on successful token generation
Token Characteristics
- Valid for: 2 minutes (120 seconds)
- Score: Typically 0.9 (high trust score)
- Action: "verify"
- Site: Compatible with most ReCAPTCHA v3 implementations
Example Usage
Python
import requests
API_KEY = "your_api_key"
headers = {"X-API-Key": API_KEY}
# Get a ReCAPTCHA token
response = requests.get(
"https://castlebreaker.cc/getRecapToken",
headers=headers
)
data = response.json()
if data["status"] == "success":
token = data["data"]["token"]
remaining_credits = data["credits"]
print(f"Token: {token}")
print(f"Remaining credits: ${remaining_credits:.2f}")
# Use the token in your form submission
# ...
else:
print(f"Error: {data['message']}")
Node.js
const fetch = require('node-fetch');
const API_KEY = 'your_api_key';
async function getReCaptchaToken() {
const response = await fetch('https://castlebreaker.cc/getRecapToken', {
headers: {
'X-API-Key': API_KEY
}
});
const data = await response.json();
if (data.status === 'success') {
console.log('Token:', data.data.token);
console.log('Remaining credits:', data.credits);
return data.data.token;
} else {
console.error('Error:', data.message);
return null;
}
}
getReCaptchaToken();
cURL
#!/bin/bash
API_KEY="your_api_key"
response=$(curl -s -X GET "https://castlebreaker.cc/getRecapToken" \
-H "X-API-Key: $API_KEY")
token=$(echo $response | jq -r '.data.token')
echo "ReCAPTCHA Token: $token"
Integration Example
Here's how to use the token in a form submission:
import requests
# Step 1: Get ReCAPTCHA token
api_headers = {"X-API-Key": "your_api_key"}
recap_response = requests.get(
"https://castlebreaker.cc/getRecapToken",
headers=api_headers
)
token = recap_response.json()["data"]["token"]
# Step 2: Submit form with token
form_data = {
"username": "user@example.com",
"password": "secretpass",
"g-recaptcha-response": token # Include token here
}
form_response = requests.post(
"https://example.com/login",
data=form_data
)
print(form_response.status_code)
Error Handling
Common errors and how to handle them:
def get_recaptcha_with_retry(max_retries=3):
for attempt in range(max_retries):
try:
response = requests.get(
"https://castlebreaker.cc/getRecapToken",
headers=headers,
timeout=10
)
data = response.json()
if data["status"] == "success":
return data["data"]["token"]
elif "insufficient credits" in data.get("message", "").lower():
print("Error: Please add credits to your account")
return None
else:
print(f"Attempt {attempt + 1} failed: {data.get('message')}")
except Exception as e:
print(f"Attempt {attempt + 1} error: {str(e)}")
if attempt < max_retries - 1:
time.sleep(2 ** attempt) # Exponential backoff
return None
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
Invalid or missing API key | Authentication failed | Check your API key |
Insufficient credits | Balance too low | Add credits to account |
Rate limit exceeded | Too many requests | Slow down request rate |
Service temporarily unavailable | Server issue | Retry with backoff |
Performance
- Average Response Time: 150-300ms
- Success Rate: >99.5%
- Token Validity: 2 minutes from generation
Best Practices
- Generate Just-In-Time: Request tokens right before you need them (they expire in 2 minutes)
- Handle Errors Gracefully: Implement retry logic with exponential backoff
- Monitor Credits: Check your balance regularly to avoid interruptions
- Cache Wisely: Don't cache tokens for more than 90 seconds
- Use HTTPS: Always use HTTPS for API requests
Rate Limits
- No hard rate limits
- Fair usage policy applies
- Recommended: Maximum 10 requests per second
Need More Control?
If you need to specify custom parameters (site key, action, etc.), contact our support team for custom solutions.
Next Steps:
- Learn about Castle Tokens
- Try TLS Bypass
- See Python Examples