You may run into scenarios like these:
- You need to host some small JSON data for yourself, an app, or some tiny automation, and it does not contain sensitive data
- You really don’t want to bother spinning up a web server just for this
I found out that GitHub Gist
is a surprisingly good solution for exactly that.
It even has API access, so you can wire it into CI/CD automation if you want.
Before you begin, create a GitHub personal access token
.
Just make sure it has Read and write access to gists permission.
Then you can create a gist in the UI
(of course, you can also create one via the API
).
In my case, I wanted to keep updating a JSON file in a gist,
so creating it once in the UI was good enough.
To update an existing gist, call the update API :
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/gists/<YOUR-GIST-ID> \
-d '{"files":{"your.json":{"content":"<YOUR-STRINGIFIED-JSON>"}}}'
To fetch the JSON, you can just request this:
https://gist.githubusercontent.com/<github-username>/<gist-id>/raw/<your.json>
No API key required.
And now you have a small JSON storage that is easy to operate.
Some practical limits to keep in mind:
- Standard GitHub API rate limits apply when you create or update the gist through the API
- For the
gist.githubusercontent.com, the limit is 5,000 requests per hour per IP - The dataset is limited to 100MB
That is pretty reasonable for my personal usage,
and it saves a lot of hassle compared to creating web buckets just to host one JSON file (ノ◕ヮ◕)ノ:・゚✧