Skip to main content
GET
cURL
Returns metrics for finalized pull requests reviewed by CodeRabbit, including complexity scores, review times, review iterations, and comment breakdowns by severity and category.

Pull request status

Use the optional status parameter to select finalized pull requests:
  • merged (default): Pull requests that were merged
  • closed: Pull requests that were closed without merging
  • all: Both merged and closed pull requests
Open pull requests are not included. The date range and pagination cursor use the merge time for merged pull requests and the close time for closed pull requests. Each result includes:
  • status: merged or closed
  • review_iterations: The number of CodeRabbit review events recorded for the pull request
For example, request both finalized states with:

CSV format

When using format=csv, the API returns a flat CSV structure with one row per pull request. The nested coderabbit_comments object is flattened into individual columns (e.g., total_coderabbit_comments_posted, critical_comments_accepted). The status and review_iterations columns appear immediately after merged_at. For descriptions of the remaining CSV columns, see Data Export - Exported fields.

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

Your CodeRabbit API key

Query Parameters

start_date
string<date>
required

Start date in ISO 8601 format (YYYY-MM-DD)

end_date
string<date>
required

End date in ISO 8601 format (YYYY-MM-DD)

status
enum<string>
default:merged

Filter finalized pull requests by status

Available options:
merged,
closed,
all
organization_ids
string

Filter by organization Git provider IDs (comma-separated, max 10). Self-hosted instances only.

repository_ids
string

Filter by repository Git provider IDs (comma-separated, max 10).

user_ids
string

Filter by author Git provider IDs (comma-separated, max 10).

format
enum<string>
default:json

Response format

Available options:
json,
csv
limit
integer
default:1000

Maximum records to return

cursor
string

Pagination cursor for fetching next page of results

Response

Successful response

data
object[]
required
next_cursor
string

Cursor for fetching the next page of results. Not present if no more results.