Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

readme.md

GitFolderDownloader Api

A minimalistic, Material Design 3 enabled web tool to download specific folders or files from GitHub repositories as ZIPs. Works strictly client-side.

πŸš€ Live Demo & API

Access the main tool here: https://GitFolderDownloader.github.io/

Access the API here: https://GitFolderDownloader.github.io/api/


πŸ› οΈ API Documentation (Headless Mode)

Git Folder Downloader Api includes a powerful "Headless API" page (api.html). This allows you to trigger downloads programmatically or via direct links without interacting with the main UI.

1. Base URL

https://GitFolderDownloader.github.io/api/

2. Parameters

Parameter Required Description Example
url Yes The full GitHub URL to the folder or file. https://github.com/user/repo/tree/main/src
filename No Custom name for the downloaded file (auto-adds extension). my-backup
token No GitHub Personal Access Token (for private repos). ghp_xxxxxxxx

3. Usage Examples

A. Basic Folder Download

Download the packages folder from the React repo:

https://GitFolderDownloader.github.io/api/?url=https://github.com/facebook/react/tree/main/packages

B. Download with Custom Name

Download the folder but save it as react-core.zip:

https://GitFolderDownloader.github.io/api/?url=https://github.com/facebook/react/tree/main/packages&filename=react-core

C. Short Syntax (Legacy Support)

You can also use the hash or ?= syntax:

https://GitFolderDownloader.github.io/api/?=https://github.com/facebook/react/tree/main/packages

Partial / Range Download

If a repository is too large, you can limit the number of files to download using &st (Start) and &mx (Max).

https://GitFolderDownloader.github.io/?=https://github.com/facebook/react/tree/main/packages&st=50&mx=150
  • &st=50: Start downloading from the 50th file.
  • &mx=150: Stop downloading at the 150th file.

When the user visits this link, the app will:

  1. Parse the URL.
  2. Auto-fill the input and limit fields.
  3. Immediately start fetching and zipping files 50 to 150.

4. Integration Example (JavaScript)

You can use an iframe or window.open to trigger downloads from your own website:

function triggerDownload() {
    const repo = "https://github.com/facebook/react/tree/main/packages";
    const apiUrl = `https://git-zip-pro.vercel.app/api/?url=${repo}`;
 
    window.open(apiUrl, '_blank');
}

πŸ”’ Privacy & Tokens

  • No Server: All logic runs in your browser.
  • Tokens: If you enter a GitHub Token, it is saved to localStorage on your device only. It is never sent to us.

πŸ“ License

Open Source. GNU GENERAL PUBLIC LICENSE Version 3