Skip to main content
POST
Query Requests
Query requests from your Helicone account with powerful filtering, sorting, and pagination capabilities. This endpoint uses Postgres as the data source.
For better performance with large datasets, consider using the Clickhouse Query endpoint.

Request Body

RequestFilterNode
required
Filter criteria for requests. Can be a simple filter object, a complex filter tree with left, operator, and right properties, or "all" to return all requests.Supported filter tables:
  • request_response_rmt - Main request/response table
  • request - Request-specific fields
  • response - Response-specific fields
  • feedback - Feedback data
  • properties - Custom properties
  • values - Request values
  • sessions_request_response_rmt - Session data
Example simple filter:
Example complex filter:
number
default:"0"
Number of records to skip for pagination.
number
default:"10"
Maximum number of records to return (max 1000).
object
Sort order for results. Specify field and direction.Example:
boolean
Filter for cached requests only.
boolean
Include input data in the response.
boolean
Filter for requests that are part of an experiment.
boolean
Filter for requests that have scores attached.

Response

HeliconeRequest[]
Array of request objects matching the query criteria.
string | null
Error message if the request failed.

Examples

Basic Query

Query all requests from the last 7 days:
cURL

Filter by Model

Query all GPT-4 requests:
cURL

Filter by Custom Properties

Query requests with specific custom properties:
cURL

Complex Filter with AND/OR

Query GPT-4 requests in production from the last week:
cURL

Pagination

Query requests with pagination:
cURL

Filter Operators

The following operators are supported for different field types:

Text Fields

  • equals - Exact match
  • not-equals - Not equal to
  • like - Pattern match (case-sensitive)
  • ilike - Pattern match (case-insensitive)
  • contains - Contains substring
  • not-contains - Does not contain substring

Number Fields

  • equals - Equal to
  • not-equals - Not equal to
  • gte - Greater than or equal to
  • lte - Less than or equal to
  • gt - Greater than
  • lt - Less than

Timestamp Fields

  • equals - Exact timestamp match
  • gte - Greater than or equal to
  • lte - Less than or equal to
  • gt - Greater than
  • lt - Less than

Boolean Fields

  • equals - True or false

Get Request by ID

Retrieve a specific request by its ID

Add Feedback

Add feedback to a request

Add Properties

Add custom properties to a request

Add Scores

Add evaluation scores to a request