Documentation Index
Fetch the complete documentation index at: https://docs.keywordsai.co/llms.txt
Use this file to discover all available pages before exploring further.
Exports experiment logs to CSV/Excel format. The export is processed asynchronously and a download link is sent to your email.
Authentication
- API key:
Authorization: Bearer <API key>
Path Parameters
The ID of the experiment to export logs from.
Query Parameters
Set to 1 or true to trigger export.
Page number (default: 1).
Number of results per page (default: 100).
Sort field (e.g., “-cost”, “-start_time”, “name”).
Filter start time (ISO format).
Filter end time (ISO format).
POST Request Body (Optional)
For advanced filtering, you can send a POST request with filters in the body:
{
"filters": [
{
"field": "status",
"operator": "=",
"value": "completed"
},
{
"field": "comparison_key",
"operator": "in",
"value": ["key1", "key2"]
}
]
}
Examples
import requests
experiment_id = "experiment_id_123"
url = f"https://api.keywordsai.co/api/v2/experiments/{experiment_id}/logs/"
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
# GET request with export parameter
params = {
"export": "1",
"start_time": "2025-01-01T00:00:00Z",
"end_time": "2025-01-31T23:59:59Z"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
Response
{
"message": "Exporting experiment logs. Check your email for the download link."
}
Export Features:
- Supports all filtering options (query params and POST body filters)
- Includes all trace data: input, output, metrics, metadata
- Async processing for large datasets
- Email notification with download link
- CSV and Excel format options
Notes:
- Export is processed asynchronously
- You will receive an email with the download link when the export is ready
- Large datasets may take several minutes to process
- All standard filtering parameters are supported