Returns finalized pull request metrics with CodeRabbit review comments. Merged PRs use merge time and closed-unmerged PRs use close time for the requested range and cursor. Supports cursor-based pagination, paged in write order rather than by merge/close time, so a row written after your cursor already passed its merge or close date (a backfill, or a reopen/reclose) still appears on a later page instead of being silently skipped. 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.

get/v1/metrics/reviews

Request

  • Base URL
    https://api.coderabbit.ai
  • Auth
    API key in header x-coderabbitai-api-key

Query parameters

start_datestring date required

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

end_datestring date required

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

status'merged' | 'closed' | 'all'

Filter finalized pull requests by status

organization_idsstring

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

repository_idsstring

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

user_idsstring

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

format'json' | 'csv'

Response format

limitinteger

Maximum records to return

cursorstring

Pagination cursor for fetching next page of results

Headers

x-coderabbitai-api-keystring required

Your CodeRabbit API key

Response

Successful response

next_cursorstring

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

Changes

    • breaking

      the response property became optional for the status

    • breaking

      the response property // became optional for the status

    • breaking

      the response property // became optional for the status

    • warning

      added the new METRICS_BUSY enum value to the // response property for the response status

    • warning

      added the new METRICS_QUERY_IN_PROGRESS enum value to the // response property for the response status

    • warning

      added the new RATE_LIMIT_EXCEEDED enum value to the // response property for the response status

    • info

      added the non-success response with the status

    • info

      added the new optional query request parameter status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status