Get review comment metrics for merged pull requests
Changed onReturns JSON with one entry per merged pull request that has stored CodeRabbit review comment metrics. The inclusive UTC date window selects pull requests by merge date, regardless of when comments were posted. Pull requests without stored comments are excluded before pagination. Pagination is in write order rather than by merge date, so a pull request written after your cursor already passed its merge date (a backfill, or a reopen/reclose) still appears on a later page instead of being silently skipped. Each nested comment entry represents a stored finding; a comment URL may occur more than once when the posted comment contains multiple findings. Comment text is not returned. Unknown query parameters, including format and status, are rejected. Available on the Enterprise plan. Self-hosted CodeRabbit deployments can use this API when configured to send metrics to CodeRabbit Cloud. Requests include all organizations authorized by the API token unless narrowed by an organization selector. Each page request consumes one token when admitted by the request rate limiter. Reviews, review comments, and MCP share the Metrics quota for the configured quota owner. With verified owner scope, coordinate calls across API keys for the same organization, workspace, or Git-provider instance; changing an organization selector does not add quota.
Request
- Base URLhttps://api.coderabbit.ai
- AuthAPI key in header x-coderabbitai-api-key
Query parameters
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.
Inclusive UTC merge date in YYYY-MM-DD format
Inclusive UTC merge date in YYYY-MM-DD format; must not precede start_date
Comma-separated provider repository IDs. Maximum 10.
Comma-separated provider PR author IDs from stored PR metrics. Maximum 10.
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.
Maximum number of pull requests per page, not the number of nested comments
Opaque next_cursor from the previous response. Keep the same date window and filters when fetching subsequent pages.
Headers
API key for authentication
Response
Review comment metrics for eligible merged pull requests
Example response
{
"data": [
{
"pr_url": "https://github.com/org/repo/pull/123"
}
]
}Changes
- info
added the media type
application/jsonfor the response with the status - info
added the media type
application/jsonfor the response with the status
- info
- info
endpoint added
- info