---
title: "Get repository stats"
method: GET
path: "/api/repos/{namespace}/{repo_name}/stats"
tags: ["Repositories"]
---

# Get repository stats

`GET /api/repos/{namespace}/{repo_name}/stats`

## Request

- Base URL: `https://hub.oxen.ai`
- URL: `https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/stats`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/oxen/apis/oxen-server/docs/api/repos/:namespace/:repo_name/stats/get.ts> (a function with typed inputs; its response is checked against the schema)

Get the total number of files, the total size of the files, and the number of different file types.

## Path parameters

- `namespace` string, required
- `repo_name` string, required

## Response `200`

Repository statistics

- RepositoryStatsResponse
  - `oxen_version` string, nullable
  - `status` string, required
  - `status_message` string, required
  - `repository` RepositoryStatsView, required
    - `data_size` integer, required
    - `data_types` DataTypeView[], required
      - `data_size` integer, required
      - `data_type` 'dir' | 'text' | 'image' | 'video' | 'audio' | 'tabular' | 'binary', required
      - `file_count` integer, required

## Other responses

- `404`: Repository not found

---

[API](https://skmtc.dev/oxen/apis/oxen-server.md) - [All operations](https://skmtc.dev/oxen/apis/oxen-server/llms.txt) - [OpenAPI document](https://skmtc.dev/oxen/apis/oxen-server/revisions/2ae578129949?raw)
