API - 429 Too many requests received

Hello i use API to download project from private reposiories,

i’ve got 429 already.

curl --header “PRIVATE-TOKEN: privateTOKEN” https://gitlab.com/api/v4/projects/ProjectID/repository/archive.zip

need help please.

Hi @Djomobil59 and welcome to the GitLab forum! :tada:

HTTP 429 status code usually indicates there were to many requests made within a given amount of time by a single user.

I believe the artifacts project API endpoint is rate limited to 5 hits per minute.

Once the block is removed, specify sleep 15 or similar time-to-wait between requests in your script to stay under the 5/minute limit and you shouldn’t have this problem anymore.

I don’t see anywhere in our docs, so I created an issue to document this for the future: https://gitlab.com/gitlab-org/gitlab/-/issues/215718