Skip to main content
Query your trace data programmatically using the HoneyHive SDK. This is useful for building custom analytics, exporting data for fine-tuning, or integrating with external systems.

Query Parameters

EventFilter Fields

Setup

The response object (result) uses attribute access (e.g., result.total_events, result.events), while individual events are returned as dictionaries (e.g., event['event_name']).

Query Model Events

Retrieve all LLM model events from your project:

Query Events in a Session

Get all events belonging to a specific trace/session:

Query Sessions

Get session-level data (root events only):

Filter by Evaluator Score

Query events that have a specific evaluator score:

Filter by User Feedback

Query events with specific user feedback:

Filter by Metadata

Query events by custom metadata fields:

Filter by Date Range

Query events within a specific time period:

Available Filter Operators

Common Filterable Fields

Session events include aggregated metadata like num_events, cost, total_tokens. See Session Aggregations for details.

Export Timeouts and Retries

Export operations (export(), export_async(), get_by_session_id()) use a default read timeout of 300 seconds to handle large result sets. You can override this with the HH_EXPORT_TIMEOUT_SECONDS environment variable:
The environment variable must be set before the HoneyHive client is instantiated. The timeout value must be a positive number (in seconds). If an invalid value is provided, the SDK falls back to the default of 300 seconds.
The export_async() method automatically retries on transient HTTP errors (502, 503, 504), matching the behavior of export().