---
title: "Get AI Scan enablement for a repository"
method: GET
path: "/repos/{owner}/{repo}/code-scanning/ai-scan"
tags: ["code-scanning"]
---

# Get AI Scan enablement for a repository

`GET /repos/{owner}/{repo}/code-scanning/ai-scan`

> [!NOTE]
> This endpoint is in public preview and is subject to change.

Gets whether AI Scan is enabled for a repository.

OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

## Path parameters

- `owner` string, required
- `repo` string, required

## Response `200`

Response

- CodeScanningAiScanEnablement — AI Scan enablement for a repository.
  - `pr_scan` 'enabled' | 'disabled', required — Whether AI Scan is enabled for the repository.

## Other responses

- `403` — Response if GitHub Advanced Security is not enabled for this repository
- `404` — Resource not found

## Changes

- **2026-09-10** `7c3a4bfa71e8` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/github/apis/rest/changes/repos/:owner/:repo/code-scanning/ai-scan/get.md)

---

[API](https://skmtc.dev/github/apis/rest.md) · [All operations](https://skmtc.dev/github/apis/rest/llms.txt) · [OpenAPI document](https://skmtc.dev/github/apis/rest/revisions/f2faaeb373ce?raw)
