Counting made effortless. And it’s free.
Track page views, clicks, downloads, anything. No signup. No API keys. Pick a name, hit a URL, get a number.
Loading the current count…
Counters are public and shared. Anyone who knows a key can read it.
Quick start
A counter is just a key. There’s nothing to register, so the first request creates it. Because there are no namespaces, use something unlikely to collide, like my_super_unique_counter.
Visit or fetch this URL to add 1:
https://countapi.mileshilliard.com/api/v1/hit/your_unique_key
{
"key": "your_unique_key",
"message": "Key updated successfully",
"value": "3"
}
Endpoints
Everything lives under /api/v1. Each “Try it” runs against the key from the demo above.
Read the current value without changing it. Ideal for displaying a count.
200 { "key": "your_key", "message": "Key requested successfully", "value": "3" }
404 { "error": "Key not found" }
Add exactly 1. The one you’ll use most for views, clicks, and events.
200 { "key": "your_key", "message": "Key updated successfully", "value": "101" }
400 { "error": "No value provided" }
Set a key to a specific number. Useful for resetting, or syncing with another database.
200 { "key": "your_key", "message": "Key set successfully", "old_value": "4", "value": "100" }
400 { "error": "No value provided" }
An SVG badge showing your count. get only displays it; hit adds 1 every time the badge loads.
textthe label on the left, such as “visits”bgcolorhex color of the right side, such as ff0000textcolorhex color of the text, such as ffffffstyleeitherflatorplastic
Current status of the API.
200 { "message": "API is running", "uptime": "0:00:00" }
A simple endpoint to ping from your own uptime monitor.
200 { "message": "API is healthy" }
500 N/A
Shield generator
Design a badge for your README or site, then copy the embed code.
For READMEs, use Display only unless you want every viewer, and every crawler, to count.
How it’s built
Small on purpose, so it stays fast.
└ Python Uvicorn app
├ Limiter (rate limiting)
├ Core endpoints (get, set, hit, shield)
└ Redis (in-memory key/value store)
Open source on GitHub. A modern alternative to the classic countapi.xyz, and not affiliated with it.
Questions
What is this for?
A simple, free way to keep counts using unique keys: site visits, button clicks, app events, download totals.
How do I use it on my website?
Call an endpoint with fetch() in a script tag, or drop the URL into an image tag as a hidden tracking pixel. See the quick start above.
Is there rate limiting?
Yes. It used to be unlimited, but someone ruined that for everybody else. The limit is still extremely generous.
Can I delete or hide a key?
No. Keys never expire and anyone who knows the name can read them. To “delete” one, stop using it and start a new, unique key.
Will I break it?
Please email me before you try. If you wouldn’t mind.