Common Issues and Solutions
Solutions to the most common problems when using the FourA API.
Empty or Incomplete Content
Symptom: The API returns a 200 status but the content field is empty or missing expected data.
Cause: The target page uses JavaScript to render content after the initial page load.
Solution: Switch from single to browser task type. Add a waitFor selector to ensure the content is fully loaded:
curl -X POST https://eu.api.foura.ai/api/v1/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/products",
"type": "browser",
"options": {"waitFor": ".product-list"}
}'
403 Forbidden or Captcha Pages
Symptom: The API returns HTML containing a captcha challenge or an access denied page.
Cause: The target site detected the request as automated and blocked it.
Solution: Use the proxy task type for automatic IP rotation and anti-detection:
curl -X POST https://eu.api.foura.ai/api/v1/tasks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/prices",
"type": "proxy"
}'
If the issue persists, try adding a proxyCountry to use residential proxies from a specific region.
Timeout Errors
Symptom: Tasks fail with a timeout error.
Cause: The target page takes longer to load than the configured timeout.
Solution: Increase the timeout value (default is 30 seconds):
{
"url": "https://slow-site.com",
"type": "browser",
"options": {"timeout": 60000}
}
For browser tasks, also check that your waitFor selector actually exists on the page: a typo in the selector will always cause a timeout.
429 Rate Limit Errors
Symptom: API returns 429 status with a "rate limit exceeded" message.
Cause: Too many concurrent requests.
Solution: Implement exponential backoff:
import time
import requests
def make_request(payload, retries=3):
for i in range(retries):
resp = requests.post(
"https://eu.api.foura.ai/api/v1/tasks",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json=payload
)
if resp.status_code == 429:
wait = 2 ** i # 1s, 2s, 4s
time.sleep(wait)
continue
return resp
raise Exception("Rate limit not resolved after retries")
Check your current usage in the Dashboard to see your rate limits.
401 Authentication Errors
Symptom: Every request returns 401 Unauthorized.
Checklist:
- Verify the header format is
Authorization: Bearer YOUR_API_KEY(notApi-KeyorToken) - Check for extra whitespace or newlines in your API key
- Generate a fresh key from the Dashboard if the current one might be compromised
Unexpected HTML Instead of JSON
Symptom: You expected JSON from the target site but received HTML.
Cause: The target page may serve different content based on headers.
Solution: Add custom headers to mimic an API client:
{
"url": "https://api.example.com/data",
"type": "single",
"options": {
"headers": {
"Accept": "application/json",
"User-Agent": "Mozilla/5.0"
}
}
}
Still Stuck?
If none of the above solutions work:
- Check the status page for any ongoing incidents
- Review your task details in the Dashboard for error logs
- Contact support at support@foura.ai with your task ID
Next Steps
- Error Handling: API error codes reference
- Choosing the Right Task Type: Pick the best approach for your target
- Dashboard Overview: Monitor your tasks visually