---
title: "Get the weekly commit activity"
method: GET
path: "/repos/{owner}/{repo}/stats/code_frequency"
tags: ["repos"]
---

# Get the weekly commit activity

`GET /repos/{owner}/{repo}/stats/code_frequency`

Returns a weekly aggregate of the number of additions and deletions pushed to a repository.

> [!NOTE]
> This endpoint can only be used for repositories with fewer than 10,000 commits. If the repository contains 10,000 or more commits, a 422 status code will be returned.

## Path parameters

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

## Response `200`

Returns a weekly aggregate of the number of additions and deletions pushed to a repository.

- CodeFrequencyStat[]
  - integer[] — Code Frequency Stat

## Other responses

- `202` — Accepted
- `204` — A header with no content is returned.
- `422` — Repository contains more than 10,000 commits

---

[API](https://skmtc.net/github/apis/github-v3-rest-api.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api/versions/a367f7028301/schema)
