experiments

List experiments for the current project. Supports filtering by status and archival state.

get/api/projects/{project_id}/experiments/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/experiments/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Query parameters

archivedboolean

Filter by archived state. Defaults to non-archived experiments only.

created_by_idstring

Filter to experiments created by the given user(s). Accepts a single user ID, or a JSON-encoded / comma-separated list of user IDs to match any of them.

eventstring

Filter to experiments whose metrics reference this event name. Matches events used directly in metric queries as well as events behind any actions those metrics reference.

excluded_tagsstring

JSON-encoded list of tag names. Excludes experiments carrying any of the given tags, even when they also carry non-excluded tags.

feature_flag_idinteger

Filter to experiments linked to the given feature flag ID.

limitinteger

Number of results to return per page.

offsetinteger

The initial index from which to return the results.

orderstring

Field to order by. Prefix with '-' for descending. Allowlisted fields include name, created_at, updated_at, start_date, end_date, duration, and status.

prompt_namestring

Filter to experiments created from an LLM prompt with this name. Matches experiments whose parameters.prompt_metadata.name equals the given value.

searchstring

Free-text search applied to the experiment name and its feature flag key (case-insensitive).

status'all' | 'complete' | 'draft' | 'exposure_frozen' | 'paused' | 'running' | 'stopped'

Filter by experiment status. "running", "paused", and "exposure_frozen" are mutually exclusive: "running" returns launched experiments with an active feature flag, "paused" returns launched experiments whose feature flag is deactivated, and "exposure_frozen" returns launched experiments whose exposure was frozen to the already-enrolled cohort while metrics keep flowing. "complete" is an alias for "stopped". "all" disables status filtering.

tagsstring

JSON-encoded list of tag names. Returns experiments carrying at least one of the given tags, e.g. ["growth", "checkout"].

Response

countinteger required
nextstring uri nullable
previousstring uri nullable

Changes

No recorded changes to this operation across all 1 revision of this API.