Making Your First Request
This guide walks you through creating an API key and sending your first request using the FourA Dashboard.
Step 1: Open the Dashboard
Navigate to the Dashboard and sign in with your FourA account.
Step 2: Create an API Key
Go to the API Keys page and click Create Key.
Give the key a descriptive name (e.g., "production-scraper" or "dev-testing"). The full key is shown only once, so copy it immediately.
Your key looks like this: pk_live_a1b2c3d4e5f6...
Step 3: Choose an Endpoint
FourA has three endpoints for different scenarios:
Single (POST /api/single/)
Sends a fast HTTP request. Best for static HTML pages and API endpoints. Response time: typically under 2 seconds.
Browser (POST /api/browser/)
Runs a real Chrome browser to render JavaScript. Best for SPAs, lazy-loaded content, and pages that require JS execution. Response time: 2 to 10 seconds.
Proxy (POST /api/proxy/)
Routes the request through rotating proxies with automatic retry. Best for sites with bot detection or geo-restricted content.
Step 4: Send Your First Request
Open a terminal and run:
curl -X POST https://eu.api.foura.ai/api/single/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"method": "GET", "url": "https://example.com"}'
Step 5: Read the Response
{
"status": 200,
"headers": [["content-type", "text/html"]],
"data": "<html>...</html>",
"total_time": 0.45
}
Key fields:
- status: HTTP status code from the target site
- data: the response body (HTML, JSON, or raw text)
- total_time: request duration in seconds
Step 6: Try a Browser Request
If the target page uses JavaScript to render content, use the browser endpoint instead:
curl -X POST https://eu.api.foura.ai/api/browser/ \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/products", "timeout_ms": 15000}'
The browser response uses body instead of data:
{
"status": 200,
"headers": {"content-type": "text/html"},
"body": "<html>...</html>"
}
Common Issues
| Problem | Solution |
|---|---|
| Empty content | Switch from single to browser endpoint: the page likely needs JS rendering |
| Captcha in response | Switch to the proxy endpoint for automatic IP rotation |
| Timeout | Increase timeout_ms or verify the URL is correct |
Next Steps
- Dashboard Overview: Full dashboard walkthrough
- Playground: Test requests in the dashboard before writing code
- Choosing the Right Endpoint: Detailed comparison
- Common Issues: Solve problems quickly