Overview
Query requests from your Helicone organization with powerful filtering, sorting, and pagination capabilities. This endpoint allows you to retrieve requests based on various criteria including properties, feedback, timestamps, and more.Endpoint
POST
/v1/request/query
Authentication
Requires API key authentication via theAuthorization header:
Request Body
Filter criteria for requests. Supports nested filtering with AND/OR operators.The filter can be:
"all"- returns all requests- A filter object with specific criteria
- A filter branch with
left,operator(“and” | “or”), andrightproperties
request- Filter by request properties (id, created_at, user_id, path, etc.)response- Filter by response properties (status, model, etc.)properties- Filter by custom propertiesfeedback- Filter by feedback ratingsvalues- Filter by request/response values
Number of records to skip for pagination
Maximum number of records to return (max: 100)
Sort order for results. Example:
{ "created_at": "desc" }Supported sort fields:created_at- Sort by request creation timelatency- Sort by request latencycost- Sort by request costtokens- Sort by token usage
Filter for cached requests only
Include prompt inputs in the response
Filter for requests that are part of experiments
Filter for requests that have evaluation scores
Response
Returns an array of request objects matching the filter criteria.Array of request objects
Error message if the request failed
Examples
Basic Query
Retrieve the 10 most recent requests:Filter by Model
Query requests for a specific model:Filter by Custom Properties
Query requests with specific custom properties:Filter by Date Range
Query requests within a specific time range:Complex Filter with AND/OR
Query requests with multiple conditions:Response Example
Notes
- The maximum limit is 100 requests per query
- Use pagination with
offsetandlimitfor large result sets - Filters support comparison operators:
equals,not-equals,gte,lte,gt,lt,like,ilike,contains,not-contains - Complex filters can be built using nested
left,operator,rightstructures - Setting
includeInputs: trueincludes prompt template input variables - For high-volume queries, consider using the ClickHouse endpoint (
/v1/request/query-clickhouse) for better performance