Skip to main content
Repository reads support GitHub Cloud organizations with the caller’s existing access. Self-hosted instances are not supported. Use your organization’s regional REST base URL; examples use the US URL. Use repository reads to find a GitHub Cloud repository installed in the selected organization. Each request checks your current access. Installing CodeRabbit on a repository does not give every organization member access to it.

List repositories

These REST examples use a user or agentic organization key, which selects its own organization. Legacy organization keys are not supported. For a workspace token, add org_id with the Git provider’s organization ID to every request, including continuation and individual reads. See identity and scope selection.
id is the Git provider’s repository ID. Use it for an individual repository read. private is the last observed visibility; null means visibility is unknown. Permission checks use your current access independently of that visibility field.

Continue a listing

Pass the returned next_page_token as page_token. Keep the same credential, organization, and page_size for every page.
  • page_size accepts 1–100 and defaults to 50.
  • Continue until next_page_token is null, including when a page’s data array is empty. A page can contain only repositories you cannot access.
  • Tokens expire after 10 minutes. An expired token, changed page size, or different caller returns 400 invalid_request; restart without a token.
  • Results are a live listing, not a snapshot. Changes to repository names, installations, or access between requests can move or remove entries. Deduplicate by id when collecting a listing.

Read one repository

The response is one repository object. A repository outside the selected installation, or one you cannot read, returns 404 not_found.

Use the CLI

Use CodeRabbit CLI 0.9.4 or later. After signing in with an API key, these commands return the same JSON as the API:
Continue a listing with --page-token. To use a user or workspace key without changing your saved login, use API key-file support. Workspace tokens also require --org-id.

Use MCP

Hosted MCP provides list_repositories and get_repository with the same fields for US organizations. Both require account:read and repositories:read consent. Existing profile and pull-request permissions do not grant repository inventory access. The MCP connection fixes the organization; tool arguments cannot switch it.

What’s next

List repositories

Explore pagination and the repository response schema.

Read a repository

Look up one repository by its Git provider ID.

Read pull requests

Inspect current pull-request metadata, checks, and review threads.