Exporting projects repo zip files using REST API

Hello!
I’m trying to clone a project using the REST API, while search-replacing certain strings within several repository files.

The way I see it, I first need to download the zipped repository folder into my react application, then running a search-replace function and lastly zipping down the folder again, so that I can upload it to a new GitLab project.

I’ve currently managed to get a hashed file response using https://gitlab.com/api/v4/projects/<:id>/export/download
… but I can’t find documentation regarding how to download the project repository specifically in a zipped file.

Please let me know what other information you might need to help me solve this issue.

Thanks!