---
title: "Metrics Data"
method: GET
path: "/v1/metrics/reviews"
---

# Metrics Data

`GET /v1/metrics/reviews`

Access CodeRabbit metrics data programmatically via REST API.

## Query parameters

- `start_date` string, date, required
- `end_date` string, date, required
- `status` 'merged' | 'closed' | 'all'
- `organization_ids` string
- `repository_ids` string
- `user_ids` string
- `format` 'json' | 'csv'
- `limit` integer
- `cursor` string

## Headers

- `x-coderabbitai-api-key` string, required

## Response `200`

Successful response

- object
  - `data` ReviewMetric[], required
    - `pr_url` string — Full URL to the pull request
    - `author_id` string — Unique identifier assigned by Git provider
    - `author_username` string — Username of the PR author
    - `organization_id` string — Unique identifier for the organization assigned by Git provider
    - `organization_name` string — Organization name
    - `repository_id` string — Unique identifier assigned by Git provider
    - `repository_name` string — Repository name
    - `created_at` string, date-time — When the PR was created
    - `ready_for_review_at` string, date-time — When the PR became ready for review. Matches created_at if the PR was never a draft, and may be null for older records where this timestamp was not collected.
    - `first_human_review_at` string, date-time — When the first human review was submitted
    - `last_commit_at` string, date-time — When the last non-merge, non-rebased commit was pushed
    - `merged_at` string, date-time — When the PR was merged
    - `status` 'merged' | 'closed' — Current pull request status
    - `review_iterations` integer — Number of CodeRabbit review events recorded for the pull request
    - `estimated_complexity` integer — Complexity score (1-5)
    - `estimated_review_minutes` integer — Estimated time to review in minutes
    - `coderabbit_comments` object — CodeRabbit comment metrics grouped by total, severity, and category
      - `total` CommentCount
        - `posted` integer — Number of comments posted
        - `accepted` integer — Number of comments accepted
      - `severity` object
        - `critical` CommentCount
          - `posted` integer — Number of comments posted
          - `accepted` integer — Number of comments accepted
        - `major` CommentCount
          - `posted` integer — Number of comments posted
          - `accepted` integer — Number of comments accepted
        - `minor` CommentCount
          - `posted` integer — Number of comments posted
          - `accepted` integer — Number of comments accepted
        - `trivial` CommentCount
          - `posted` integer — Number of comments posted
          - `accepted` integer — Number of comments accepted
        - `info` CommentCount
          - `posted` integer — Number of comments posted
          - `accepted` integer — Number of comments accepted
      - `category` object
        - `security_and_privacy` CommentCount
          - `posted` integer — Number of comments posted
          - `accepted` integer — Number of comments accepted
        - `performance_and_scalability` CommentCount
          - `posted` integer — Number of comments posted
          - `accepted` integer — Number of comments accepted
        - `functional_correctness` CommentCount
          - `posted` integer — Number of comments posted
          - `accepted` integer — Number of comments accepted
        - `maintainability_and_code_quality` CommentCount
          - `posted` integer — Number of comments posted
          - `accepted` integer — Number of comments accepted
        - `data_integrity_and_integration` CommentCount
          - `posted` integer — Number of comments posted
          - `accepted` integer — Number of comments accepted
        - `stability_and_availability` CommentCount
          - `posted` integer — Number of comments posted
          - `accepted` integer — Number of comments accepted
  - `next_cursor` string — Cursor for fetching the next page of results. Not present if no more results.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `413` — Payload Too Large
- `429` — Too Many Requests

## Changes

- **2026-08-18** `9494051cca6d` — 3 info
  - added the new optional `query` request parameter `status`
  - added the optional property `data/items/review_iterations` to the response with the `200` status
  - added the optional property `data/items/status` to the response with the `200` status

[Change history](https://skmtc.dev/coderabbit/apis/coderabbit-api-spec/changes/v1/metrics/reviews/get.md)

---

[API](https://skmtc.dev/coderabbit/apis/coderabbit-api-spec.md) · [All operations](https://skmtc.dev/coderabbit/apis/coderabbit-api-spec/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/coderabbit/coderabbit-api-spec/revisions/cb4116297f28/schema)
