2020-07-30 08:09:33 -04:00
---
stage: Create
group: Source Code
2020-11-26 01:09:20 -05:00
info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments"
2020-07-30 08:09:33 -04:00
type: reference, api
---
2021-02-09 13:09:59 -05:00
# Project statistics API **(FREE)**
2018-12-13 14:26:56 -05:00
Every API call to [project ](../user/project/index.md ) statistics must be authenticated.
2021-09-26 23:11:36 -04:00
Retrieving these statistics requires write access to the repository.
2018-12-13 14:26:56 -05:00
2021-09-26 23:11:36 -04:00
This API retrieves the number of times the project is either cloned or pulled
with the HTTP method. SSH fetches are not included.
2018-12-13 14:26:56 -05:00
2021-09-26 23:11:36 -04:00
## Get the statistics of the last 30 days
2018-12-13 14:26:56 -05:00
2020-02-27 19:09:08 -05:00
```plaintext
2018-12-13 14:26:56 -05:00
GET /projects/:id/statistics
```
| Attribute | Type | Required | Description |
| ---------- | ------ | -------- | ----------- |
2021-11-22 13:10:55 -05:00
| `id` | integer or string | yes | The ID or [URL-encoded path of the project ](index.md#namespaced-path-encoding ) |
2018-12-13 14:26:56 -05:00
Example response:
```json
{
"fetches": {
"total": 50,
"days": [
{
"count": 10,
"date": "2018-01-10"
},
{
"count": 10,
"date": "2018-01-09"
},
{
"count": 10,
"date": "2018-01-08"
},
{
"count": 10,
"date": "2018-01-07"
},
{
"count": 10,
"date": "2018-01-06"
}
]
}
}
```