Skip to main content
GET
Get review comment metrics for merged pull requests
Use this endpoint for finding-level metadata. For pull-request-level aggregates, use the Metrics Data API. Self-hosted CodeRabbit deployments can use this API when configured to send metrics to CodeRabbit Cloud. Workspace API tokens include all authorized workspace organizations by default. Use org_id to select one provider organization. Instance-scoped API keys include authorized organizations in their Git provider instance. Organization-scoped API keys remain bound to their authenticated organization, including organizations connected to a self-hosted Git provider instance.

Authorizations

x-coderabbitai-api-key
string
header
required

API key for authentication. You can create an API key from the CodeRabbit dashboard.

Headers

x-coderabbitai-api-key
string
required

API key for authentication

Query Parameters

org_id
string

Workspace-scoped API tokens only. Selects one provider organization in the token's workspace. When omitted, includes all organizations authorized by the workspace token. Ignored for organization-scoped and Git-provider instance-scoped keys.

start_date
string<date>
required

Inclusive UTC merge date in YYYY-MM-DD format

Example:

"2026-09-01"

end_date
string<date>
required

Inclusive UTC merge date in YYYY-MM-DD format; must not precede start_date

Example:

"2026-09-09"

repository_ids
string

Comma-separated provider repository IDs. Maximum 10.

Example:

"1027529638,987654321"

user_ids
string

Comma-separated provider PR author IDs from stored PR metrics. Maximum 10.

Example:

"87397876,12345678"

organization_ids
string

Comma-separated provider organization IDs for self-hosted Git provider instance-scoped API keys. Maximum 10 input values. When omitted, includes all authorized organizations in the instance. The filter cannot expand the scope authorized by the API token. Not supported for organization-scoped or workspace-scoped API keys.

Example:

"184456712,103539130"

limit
integer
default:1000

Maximum number of pull requests per page, not the number of nested comments

Required range: 1 <= x <= 1000
cursor
string

Opaque next_cursor from the previous response. Keep the same date window and filters when fetching subsequent pages.

Response

Review comment metrics for eligible merged pull requests

data
object[]
required
next_cursor
string | null
required

Opaque cursor for the next page; null when no more eligible pull requests remain