Browser Sessions
Scrape authenticated content by saving and reusing login sessions
Tip:
- Session data is protected using AES-256-GCM encryption with complete user isolation.
- The system does not collect, store, or retain passwords, authentication secrets, or credentials at any time.
- Session data is permanently and irreversibly deleted upon user-initiated session removal.
What are Browser Sessions?
Browser sessions allow you to scrape content that requires authentication. Instead of handling complex login flows programmatically, you log in once through a real browser, and we save your session for future API requests.
This is useful for scraping:
- Account dashboards and order history
- Subscription-based content
- Social media profiles
- Any page that requires a login
How It Works
1. Create a Session
From your dashboard, click Create Session to launch an interactive browser. This opens a real browser in the cloud that you control remotely.
2. Log In Manually
Navigate to the website you want to scrape and log in with your credentials. Complete any two-factor authentication or captchas as you normally would.
3. Save the Session
Once logged in, click Save Session. We encrypt and store your cookies and localStorage data so you can reuse this authenticated state.
4. Use in API Requests
Include the sessionId in your scrape requests. The API will use your saved session to access authenticated pages.
Using Sessions with the API
Add the sessionId parameter to your URL Scraper request:
{
"url": "https://amazon.com/your-orders",
"sessionId": "session_abc123xyz",
"country": "us"
}When using a session, browser-based scraping is automatically enabled since sessions require a full browser environment.
curl -X POST https://api.anakin.io/v1/url-scraper \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://amazon.com/your-orders",
"sessionId": "session_abc123xyz",
"country": "us"
}'import requests
response = requests.post(
'https://api.anakin.io/v1/url-scraper',
headers={'X-API-Key': 'your_api_key'},
json={
'url': 'https://amazon.com/your-orders',
'sessionId': 'session_abc123xyz',
'country': 'us'
}
)
data = response.json()
print(f"Job submitted: {data['jobId']}")const response = await fetch('https://api.anakin.io/v1/url-scraper', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
url: 'https://amazon.com/your-orders',
sessionId: 'session_abc123xyz',
country: 'us'
})
});
const data = await response.json();
console.log(data.jobId);Managing Sessions
You can manage your sessions from the dashboard:
- View all saved sessions and their details
- Check when a session was last used
- Delete sessions you no longer need