Skip to main content
GET
Get PR metrics for organization
To install and sign in to the CLI, see Call from the CLI.
With format=csv, the file has one row per pull request, and the nested coderabbit_comments object becomes flat columns such as total_coderabbit_comments_posted. A CSV response is a single page of up to limit rows, with no cursor. See Download review metrics as CSV.

Authorizations

x-coderabbitai-api-key
string
header
required

See Authentication for the key types and where to create a key.

Query Parameters

org_name
string

GitHub organization login for a workspace API key, matched case-insensitively within that workspace. Supply either org_name or org_id, never both; omit for an organization-bound key.

Pattern: ^[A-Za-z0-9][A-Za-z0-9-]{0,38}$
org_id
string

Workspace-scoped API tokens only. Supply this git-provider organization ID or org_name, never both, to scope metrics to one organization. When both selectors are omitted, aggregates every organization in the workspace. This org_id parameter is ignored for organization and self-hosted keys.

start_date
string<date>
required

Inclusive merge date for merged PRs or close date for closed PRs (YYYY-MM-DD format)

Example:

"2025-10-15"

end_date
string<date>
required

Inclusive merge date for merged PRs or close date for closed PRs (YYYY-MM-DD format)

Example:

"2025-11-15"

status
enum<string>
default:merged

Merged selects reviewed PRs by merge time, closed selects closed-unmerged reviewed PRs by close time, and all combines both finalized states.

Available options:
merged,
closed,
all
repository_ids
string

Comma-separated list of provider repository IDs to filter (e.g., GitHub repo IDs). Max 10.

Example:

"1027529638,987654321"

user_ids
string

Comma-separated list of provider user IDs to filter (e.g., GitHub user IDs). Max 10.

Example:

"87397876,12345678"

limit
integer
default:1000

Maximum number of results to return

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

Pagination cursor from previous response

organization_ids
string

Comma-separated list of provider organization IDs to filter (e.g., GitHub org IDs). Only supported for self-hosted instances.

Example:

"184456712,103539130"

format
enum<string>
default:json

Response format. JSON returns structured data with pagination. CSV returns flat file download.

Available options:
json,
csv

Response

Successfully retrieved PR metrics

data
object[]
next_cursor
string | null

Cursor for fetching the next page of results