Skip to main content

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

string
required
POST
string
required
/v1/request/query

Authentication

Requires API key authentication via the Authorization header:

Request Body

object
required
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”), and right properties
Supported filter fields:
  • request - Filter by request properties (id, created_at, user_id, path, etc.)
  • response - Filter by response properties (status, model, etc.)
  • properties - Filter by custom properties
  • feedback - Filter by feedback ratings
  • values - Filter by request/response values
number
default:"0"
Number of records to skip for pagination
number
default:"10"
Maximum number of records to return (max: 100)
object
Sort order for results. Example: { "created_at": "desc" }Supported sort fields:
  • created_at - Sort by request creation time
  • latency - Sort by request latency
  • cost - Sort by request cost
  • tokens - Sort by token usage
boolean
default:"false"
Filter for cached requests only
boolean
default:"false"
Include prompt inputs in the response
boolean
default:"false"
Filter for requests that are part of experiments
boolean
default:"false"
Filter for requests that have evaluation scores

Response

Returns an array of request objects matching the filter criteria.
array
Array of request objects
string
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 offset and limit for 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, right structures
  • Setting includeInputs: true includes prompt template input variables
  • For high-volume queries, consider using the ClickHouse endpoint (/v1/request/query-clickhouse) for better performance