---
title: "Get a pull request by base and head"
method: GET
path: "/repos/{owner}/{repo}/pulls/{base}/{head}"
tags: ["repository"]
---

# Get a pull request by base and head

`GET /repos/{owner}/{repo}/pulls/{base}/{head}`

## Path parameters

- `owner` string, required
- `repo` string, required
- `base` string, required
- `head` string, required

## Response `200`

PullRequest

- PullRequest — PullRequest represents a pull request
  - `additions` integer — The number of lines added in the pull request
  - `allow_maintainer_edit` boolean — Whether maintainers can edit the pull request
  - `assignee` User — User represents a user
    - `active` boolean — Is user active
    - `avatar_url` string — URL to the user's avatar
    - `created` string, date-time
    - `description` string — the user's description
    - `email` string, email
    - `followers_count` integer — user counts
    - `following_count` integer
    - `full_name` string — the user's full name
    - `html_url` string — URL to the user's gitea page
    - `id` integer — the user's id
    - `is_admin` boolean — Is the user an administrator
    - `language` string — User locale
    - `last_login` string, date-time
    - `location` string — the user's location
    - `login` string — login of the user, same as `username`
    - `login_name` string — identifier of the user, provided by the external authenticator (if configured)
    - `prohibit_login` boolean — Is user login prohibited
    - `restricted` boolean — Is user restricted
    - `source_id` integer — The ID of the user's Authentication Source
    - `starred_repos_count` integer
    - `visibility` 'public' | 'limited' | 'private' — User visibility level option: public, limited, private
    - `website` string — the user's website
  - `assignees` User[] — The list of users assigned to the pull request
    - `active` boolean — Is user active
    - `avatar_url` string — URL to the user's avatar
    - `created` string, date-time
    - `description` string — the user's description
    - `email` string, email
    - `followers_count` integer — user counts
    - `following_count` integer
    - `full_name` string — the user's full name
    - `html_url` string — URL to the user's gitea page
    - `id` integer — the user's id
    - `is_admin` boolean — Is the user an administrator
    - `language` string — User locale
    - `last_login` string, date-time
    - `location` string — the user's location
    - `login` string — login of the user, same as `username`
    - `login_name` string — identifier of the user, provided by the external authenticator (if configured)
    - `prohibit_login` boolean — Is user login prohibited
    - `restricted` boolean — Is user restricted
    - `source_id` integer — The ID of the user's Authentication Source
    - `starred_repos_count` integer
    - `visibility` 'public' | 'limited' | 'private' — User visibility level option: public, limited, private
    - `website` string — the user's website
  - `base` PRBranchInfo — PRBranchInfo information about a branch
    - `label` string — The display name of the branch
    - `ref` string — The git reference of the branch
    - `repo` Repository — Repository represents a repository
      - `allow_fast_forward_only_merge` boolean
      - `allow_manual_merge` boolean
      - `allow_merge_commits` boolean
      - `allow_merge_update` boolean
      - `allow_rebase` boolean
      - `allow_rebase_explicit` boolean
      - `allow_rebase_update` boolean
      - `allow_squash_merge` boolean
      - `archived` boolean
      - `archived_at` string, date-time
      - `autodetect_manual_merge` boolean
      - `avatar_url` string
      - `branch_count` integer
      - `clone_url` string
      - `created_at` string, date-time
      - `default_allow_maintainer_edit` boolean
      - `default_branch` string
      - `default_delete_branch_after_merge` boolean
      - `default_merge_style` string
      - `default_target_branch` string
      - `default_update_style` string
      - `description` string
      - `empty` boolean
      - `external_tracker` ExternalTracker — ExternalTracker represents settings for external tracker
        - `external_tracker_format` string — External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.
        - `external_tracker_regexp_pattern` string — External Issue Tracker issue regular expression
        - `external_tracker_style` string — External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp`
        - `external_tracker_url` string — URL of external issue tracker.
      - `external_wiki` ExternalWiki — ExternalWiki represents setting for external wiki
        - `external_wiki_url` string — URL of external wiki.
      - `fork` boolean
      - `forks_count` integer
      - `full_name` string
      - `has_actions` boolean
      - `has_code` boolean
      - `has_issues` boolean
      - `has_packages` boolean
      - `has_projects` boolean
      - `has_pull_requests` boolean
      - `has_releases` boolean
      - `has_wiki` boolean
      - `html_url` string
      - `id` integer
      - `ignore_whitespace_conflicts` boolean
      - `internal` boolean
      - `internal_tracker` InternalTracker — InternalTracker represents settings for internal tracker
        - `allow_only_contributors_to_track_time` boolean — Let only contributors track time (Built-in issue tracker)
        - `enable_issue_dependencies` boolean — Enable dependencies for issues and pull requests (Built-in issue tracker)
        - `enable_time_tracker` boolean — Enable time tracking (Built-in issue tracker)
      - `language` string
      - `languages_url` string
      - `licenses` string[]
      - `link` string
      - `mirror` boolean
      - `mirror_interval` string
      - `mirror_last_sync_at` string, date-time
      - `mirror_updated` string, date-time
      - `name` string
      - `object_format_name` 'sha1' | 'sha256' — ObjectFormatName of the underlying git repository
      - `open_issues_count` integer
      - `open_pr_counter` integer
      - `original_url` string
      - `owner` User — User represents a user
        - `active` boolean — Is user active
        - `avatar_url` string — URL to the user's avatar
        - `created` string, date-time
        - `description` string — the user's description
        - `email` string, email
        - `followers_count` integer — user counts
        - `following_count` integer
        - `full_name` string — the user's full name
        - `html_url` string — URL to the user's gitea page
        - `id` integer — the user's id
        - `is_admin` boolean — Is the user an administrator
        - `language` string — User locale
        - `last_login` string, date-time
        - `location` string — the user's location
        - `login` string — login of the user, same as `username`
        - `login_name` string — identifier of the user, provided by the external authenticator (if configured)
        - `prohibit_login` boolean — Is user login prohibited
        - `restricted` boolean — Is user restricted
        - `source_id` integer — The ID of the user's Authentication Source
        - `starred_repos_count` integer
        - `visibility` 'public' | 'limited' | 'private' — User visibility level option: public, limited, private
        - `website` string — the user's website
      - `parent` Repository — recursive
      - `permissions` Permission — Permission represents a set of permissions
        - `admin` boolean
        - `pull` boolean
        - `push` boolean
      - `private` boolean
      - `projects_mode` string
      - `release_counter` integer
      - `repo_transfer` RepoTransfer — RepoTransfer represents a pending repo transfer
        - `doer` User — User represents a user
          - `active` boolean — Is user active
          - `avatar_url` string — URL to the user's avatar
          - `created` string, date-time
          - `description` string — the user's description
          - `email` string, email
          - `followers_count` integer — user counts
          - `following_count` integer
          - `full_name` string — the user's full name
          - `html_url` string — URL to the user's gitea page
          - `id` integer — the user's id
          - `is_admin` boolean — Is the user an administrator
          - `language` string — User locale
          - `last_login` string, date-time
          - `location` string — the user's location
          - `login` string — login of the user, same as `username`
          - `login_name` string — identifier of the user, provided by the external authenticator (if configured)
          - `prohibit_login` boolean — Is user login prohibited
          - `restricted` boolean — Is user restricted
          - `source_id` integer — The ID of the user's Authentication Source
          - `starred_repos_count` integer
          - `visibility` 'public' | 'limited' | 'private' — User visibility level option: public, limited, private
          - `website` string — the user's website
        - `recipient` User — User represents a user
          - `active` boolean — Is user active
          - `avatar_url` string — URL to the user's avatar
          - `created` string, date-time
          - `description` string — the user's description
          - `email` string, email
          - `followers_count` integer — user counts
          - `following_count` integer
          - `full_name` string — the user's full name
          - `html_url` string — URL to the user's gitea page
          - `id` integer — the user's id
          - `is_admin` boolean — Is the user an administrator
          - `language` string — User locale
          - `last_login` string, date-time
          - `location` string — the user's location
          - `login` string — login of the user, same as `username`
          - `login_name` string — identifier of the user, provided by the external authenticator (if configured)
          - `prohibit_login` boolean — Is user login prohibited
          - `restricted` boolean — Is user restricted
          - `source_id` integer — The ID of the user's Authentication Source
          - `starred_repos_count` integer
          - `visibility` 'public' | 'limited' | 'private' — User visibility level option: public, limited, private
          - `website` string — the user's website
        - `teams` Team[]
          - `can_create_org_repo` boolean — Whether the team can create repositories in the organization
          - `description` string — The description of the team
          - `id` integer — The unique identifier of the team
          - `includes_all_repositories` boolean — Whether the team has access to all repositories in the organization
          - `name` string — The name of the team
          - `organization` Organization — Organization represents an organization
            - `avatar_url` string — The URL of the organization's avatar
            - `description` string — The description of the organization
            - `email` string — The email address of the organization
            - `full_name` string — The full display name of the organization
            - `id` integer — The unique identifier of the organization
            - `location` string — The location of the organization
            - `name` string — The name of the organization
            - `repo_admin_change_team_access` boolean — Whether repository administrators can change team access
            - `username` string — username of the organization deprecated
            - `visibility` 'public' | 'limited' | 'private' — The visibility level of the organization (public, limited, private)
            - `website` string — The website URL of the organization
          - `permission` 'none' | 'read' | 'write' | 'admin' | 'owner'
          - `units` string[] — Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.
          - `units_map` object
          - `visibility` 'public' | 'limited' | 'private' — Team visibility within the organization. "private" teams are only listable by members and org owners; "limited" teams are listable by any organization member; "public" teams are listable by any signed-in user.
      - `size` integer
      - `ssh_url` string
      - `stars_count` integer
      - `template` boolean
      - `topics` string[]
      - `updated_at` string, date-time
      - `url` string
      - `watchers_count` integer
      - `website` string
    - `repo_id` integer — The unique identifier of the repository
    - `sha` string — The commit SHA of the branch head
  - `body` string — The description body of the pull request
  - `changed_files` integer — The number of files changed in the pull request
  - `closed_at` string, date-time
  - `comments` integer — The number of comments on the pull request
  - `content_version` integer — The version of the pull request content for optimistic locking
  - `created_at` string, date-time
  - `deletions` integer — The number of lines deleted in the pull request
  - `diff_url` string — The URL to download the diff patch
  - `draft` boolean — Whether the pull request is a draft
  - `due_date` string, date-time
  - `head` PRBranchInfo — PRBranchInfo information about a branch
    - `label` string — The display name of the branch
    - `ref` string — The git reference of the branch
    - `repo` Repository — Repository represents a repository
      - `allow_fast_forward_only_merge` boolean
      - `allow_manual_merge` boolean
      - `allow_merge_commits` boolean
      - `allow_merge_update` boolean
      - `allow_rebase` boolean
      - `allow_rebase_explicit` boolean
      - `allow_rebase_update` boolean
      - `allow_squash_merge` boolean
      - `archived` boolean
      - `archived_at` string, date-time
      - `autodetect_manual_merge` boolean
      - `avatar_url` string
      - `branch_count` integer
      - `clone_url` string
      - `created_at` string, date-time
      - `default_allow_maintainer_edit` boolean
      - `default_branch` string
      - `default_delete_branch_after_merge` boolean
      - `default_merge_style` string
      - `default_target_branch` string
      - `default_update_style` string
      - `description` string
      - `empty` boolean
      - `external_tracker` ExternalTracker — ExternalTracker represents settings for external tracker
        - `external_tracker_format` string — External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.
        - `external_tracker_regexp_pattern` string — External Issue Tracker issue regular expression
        - `external_tracker_style` string — External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp`
        - `external_tracker_url` string — URL of external issue tracker.
      - `external_wiki` ExternalWiki — ExternalWiki represents setting for external wiki
        - `external_wiki_url` string — URL of external wiki.
      - `fork` boolean
      - `forks_count` integer
      - `full_name` string
      - `has_actions` boolean
      - `has_code` boolean
      - `has_issues` boolean
      - `has_packages` boolean
      - `has_projects` boolean
      - `has_pull_requests` boolean
      - `has_releases` boolean
      - `has_wiki` boolean
      - `html_url` string
      - `id` integer
      - `ignore_whitespace_conflicts` boolean
      - `internal` boolean
      - `internal_tracker` InternalTracker — InternalTracker represents settings for internal tracker
        - `allow_only_contributors_to_track_time` boolean — Let only contributors track time (Built-in issue tracker)
        - `enable_issue_dependencies` boolean — Enable dependencies for issues and pull requests (Built-in issue tracker)
        - `enable_time_tracker` boolean — Enable time tracking (Built-in issue tracker)
      - `language` string
      - `languages_url` string
      - `licenses` string[]
      - `link` string
      - `mirror` boolean
      - `mirror_interval` string
      - `mirror_last_sync_at` string, date-time
      - `mirror_updated` string, date-time
      - `name` string
      - `object_format_name` 'sha1' | 'sha256' — ObjectFormatName of the underlying git repository
      - `open_issues_count` integer
      - `open_pr_counter` integer
      - `original_url` string
      - `owner` User — User represents a user
        - `active` boolean — Is user active
        - `avatar_url` string — URL to the user's avatar
        - `created` string, date-time
        - `description` string — the user's description
        - `email` string, email
        - `followers_count` integer — user counts
        - `following_count` integer
        - `full_name` string — the user's full name
        - `html_url` string — URL to the user's gitea page
        - `id` integer — the user's id
        - `is_admin` boolean — Is the user an administrator
        - `language` string — User locale
        - `last_login` string, date-time
        - `location` string — the user's location
        - `login` string — login of the user, same as `username`
        - `login_name` string — identifier of the user, provided by the external authenticator (if configured)
        - `prohibit_login` boolean — Is user login prohibited
        - `restricted` boolean — Is user restricted
        - `source_id` integer — The ID of the user's Authentication Source
        - `starred_repos_count` integer
        - `visibility` 'public' | 'limited' | 'private' — User visibility level option: public, limited, private
        - `website` string — the user's website
      - `parent` Repository — recursive
      - `permissions` Permission — Permission represents a set of permissions
        - `admin` boolean
        - `pull` boolean
        - `push` boolean
      - `private` boolean
      - `projects_mode` string
      - `release_counter` integer
      - `repo_transfer` RepoTransfer — RepoTransfer represents a pending repo transfer
        - `doer` User — User represents a user
          - `active` boolean — Is user active
          - `avatar_url` string — URL to the user's avatar
          - `created` string, date-time
          - `description` string — the user's description
          - `email` string, email
          - `followers_count` integer — user counts
          - `following_count` integer
          - `full_name` string — the user's full name
          - `html_url` string — URL to the user's gitea page
          - `id` integer — the user's id
          - `is_admin` boolean — Is the user an administrator
          - `language` string — User locale
          - `last_login` string, date-time
          - `location` string — the user's location
          - `login` string — login of the user, same as `username`
          - `login_name` string — identifier of the user, provided by the external authenticator (if configured)
          - `prohibit_login` boolean — Is user login prohibited
          - `restricted` boolean — Is user restricted
          - `source_id` integer — The ID of the user's Authentication Source
          - `starred_repos_count` integer
          - `visibility` 'public' | 'limited' | 'private' — User visibility level option: public, limited, private
          - `website` string — the user's website
        - `recipient` User — User represents a user
          - `active` boolean — Is user active
          - `avatar_url` string — URL to the user's avatar
          - `created` string, date-time
          - `description` string — the user's description
          - `email` string, email
          - `followers_count` integer — user counts
          - `following_count` integer
          - `full_name` string — the user's full name
          - `html_url` string — URL to the user's gitea page
          - `id` integer — the user's id
          - `is_admin` boolean — Is the user an administrator
          - `language` string — User locale
          - `last_login` string, date-time
          - `location` string — the user's location
          - `login` string — login of the user, same as `username`
          - `login_name` string — identifier of the user, provided by the external authenticator (if configured)
          - `prohibit_login` boolean — Is user login prohibited
          - `restricted` boolean — Is user restricted
          - `source_id` integer — The ID of the user's Authentication Source
          - `starred_repos_count` integer
          - `visibility` 'public' | 'limited' | 'private' — User visibility level option: public, limited, private
          - `website` string — the user's website
        - `teams` Team[]
          - `can_create_org_repo` boolean — Whether the team can create repositories in the organization
          - `description` string — The description of the team
          - `id` integer — The unique identifier of the team
          - `includes_all_repositories` boolean — Whether the team has access to all repositories in the organization
          - `name` string — The name of the team
          - `organization` Organization — Organization represents an organization
            - `avatar_url` string — The URL of the organization's avatar
            - `description` string — The description of the organization
            - `email` string — The email address of the organization
            - `full_name` string — The full display name of the organization
            - `id` integer — The unique identifier of the organization
            - `location` string — The location of the organization
            - `name` string — The name of the organization
            - `repo_admin_change_team_access` boolean — Whether repository administrators can change team access
            - `username` string — username of the organization deprecated
            - `visibility` 'public' | 'limited' | 'private' — The visibility level of the organization (public, limited, private)
            - `website` string — The website URL of the organization
          - `permission` 'none' | 'read' | 'write' | 'admin' | 'owner'
          - `units` string[] — Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.
          - `units_map` object
          - `visibility` 'public' | 'limited' | 'private' — Team visibility within the organization. "private" teams are only listable by members and org owners; "limited" teams are listable by any organization member; "public" teams are listable by any signed-in user.
      - `size` integer
      - `ssh_url` string
      - `stars_count` integer
      - `template` boolean
      - `topics` string[]
      - `updated_at` string, date-time
      - `url` string
      - `watchers_count` integer
      - `website` string
    - `repo_id` integer — The unique identifier of the repository
    - `sha` string — The commit SHA of the branch head
  - `html_url` string — The HTML URL to view the pull request
  - `id` integer — The unique identifier of the pull request
  - `is_locked` boolean — Whether the pull request conversation is locked
  - `labels` Label[] — The labels attached to the pull request
    - `color` string
    - `description` string — Description provides additional context about the label's purpose
    - `exclusive` boolean
    - `id` integer — ID is the unique identifier for the label
    - `is_archived` boolean
    - `name` string — Name is the display name of the label
    - `url` string — URL is the API endpoint for accessing this label
  - `merge_base` string — The merge base commit SHA
  - `merge_commit_sha` string — The SHA of the merge commit
  - `mergeable` boolean — Whether the pull request can be merged
  - `merged` boolean — Whether the pull request has been merged
  - `merged_at` string, date-time
  - `merged_by` User — User represents a user
    - `active` boolean — Is user active
    - `avatar_url` string — URL to the user's avatar
    - `created` string, date-time
    - `description` string — the user's description
    - `email` string, email
    - `followers_count` integer — user counts
    - `following_count` integer
    - `full_name` string — the user's full name
    - `html_url` string — URL to the user's gitea page
    - `id` integer — the user's id
    - `is_admin` boolean — Is the user an administrator
    - `language` string — User locale
    - `last_login` string, date-time
    - `location` string — the user's location
    - `login` string — login of the user, same as `username`
    - `login_name` string — identifier of the user, provided by the external authenticator (if configured)
    - `prohibit_login` boolean — Is user login prohibited
    - `restricted` boolean — Is user restricted
    - `source_id` integer — The ID of the user's Authentication Source
    - `starred_repos_count` integer
    - `visibility` 'public' | 'limited' | 'private' — User visibility level option: public, limited, private
    - `website` string — the user's website
  - `milestone` Milestone — Milestone milestone is a collection of issues on one repository
    - `closed_at` string, date-time
    - `closed_issues` integer — ClosedIssues is the number of closed issues in this milestone
    - `created_at` string, date-time
    - `description` string — Description provides details about the milestone
    - `due_on` string, date-time
    - `id` integer — ID is the unique identifier for the milestone
    - `open_issues` integer — OpenIssues is the number of open issues in this milestone
    - `state` 'open' | 'closed' — State indicates if the milestone is open or closed
    - `title` string — Title is the title of the milestone
    - `updated_at` string, date-time
  - `number` integer — The pull request number
  - `patch_url` string — The URL to download the patch file
  - `pin_order` integer — The pin order for the pull request
  - `requested_reviewers` User[] — The users requested to review the pull request
    - `active` boolean — Is user active
    - `avatar_url` string — URL to the user's avatar
    - `created` string, date-time
    - `description` string — the user's description
    - `email` string, email
    - `followers_count` integer — user counts
    - `following_count` integer
    - `full_name` string — the user's full name
    - `html_url` string — URL to the user's gitea page
    - `id` integer — the user's id
    - `is_admin` boolean — Is the user an administrator
    - `language` string — User locale
    - `last_login` string, date-time
    - `location` string — the user's location
    - `login` string — login of the user, same as `username`
    - `login_name` string — identifier of the user, provided by the external authenticator (if configured)
    - `prohibit_login` boolean — Is user login prohibited
    - `restricted` boolean — Is user restricted
    - `source_id` integer — The ID of the user's Authentication Source
    - `starred_repos_count` integer
    - `visibility` 'public' | 'limited' | 'private' — User visibility level option: public, limited, private
    - `website` string — the user's website
  - `requested_reviewers_teams` Team[] — The teams requested to review the pull request
    - `can_create_org_repo` boolean — Whether the team can create repositories in the organization
    - `description` string — The description of the team
    - `id` integer — The unique identifier of the team
    - `includes_all_repositories` boolean — Whether the team has access to all repositories in the organization
    - `name` string — The name of the team
    - `organization` Organization — Organization represents an organization
      - `avatar_url` string — The URL of the organization's avatar
      - `description` string — The description of the organization
      - `email` string — The email address of the organization
      - `full_name` string — The full display name of the organization
      - `id` integer — The unique identifier of the organization
      - `location` string — The location of the organization
      - `name` string — The name of the organization
      - `repo_admin_change_team_access` boolean — Whether repository administrators can change team access
      - `username` string — username of the organization deprecated
      - `visibility` 'public' | 'limited' | 'private' — The visibility level of the organization (public, limited, private)
      - `website` string — The website URL of the organization
    - `permission` 'none' | 'read' | 'write' | 'admin' | 'owner'
    - `units` string[] — Deprecated: This variable should be replaced by UnitsMap and will be dropped in later versions.
    - `units_map` object
    - `visibility` 'public' | 'limited' | 'private' — Team visibility within the organization. "private" teams are only listable by members and org owners; "limited" teams are listable by any organization member; "public" teams are listable by any signed-in user.
  - `review_comments` integer — number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR)
  - `state` 'open' | 'closed' — The current state of the pull request
  - `title` string — The title of the pull request
  - `updated_at` string, date-time
  - `url` string — The API URL of the pull request
  - `user` User — User represents a user
    - `active` boolean — Is user active
    - `avatar_url` string — URL to the user's avatar
    - `created` string, date-time
    - `description` string — the user's description
    - `email` string, email
    - `followers_count` integer — user counts
    - `following_count` integer
    - `full_name` string — the user's full name
    - `html_url` string — URL to the user's gitea page
    - `id` integer — the user's id
    - `is_admin` boolean — Is the user an administrator
    - `language` string — User locale
    - `last_login` string, date-time
    - `location` string — the user's location
    - `login` string — login of the user, same as `username`
    - `login_name` string — identifier of the user, provided by the external authenticator (if configured)
    - `prohibit_login` boolean — Is user login prohibited
    - `restricted` boolean — Is user restricted
    - `source_id` integer — The ID of the user's Authentication Source
    - `starred_repos_count` integer
    - `visibility` 'public' | 'limited' | 'private' — User visibility level option: public, limited, private
    - `website` string — the user's website

## Other responses

- `404` — APINotFound is a not found empty response

---

[API](https://skmtc.net/gitea/apis/gitea-api.md) · [All operations](https://skmtc.net/gitea/apis/gitea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitea/gitea-api/revisions/350de506cefa/schema)
