Counter Badge Maker

Count page views, downloads or events per key with atomic increments, unique-visitor windows and daily history, and show the value as a public SVG badge.

Free tool: 20 requests per minute.

Result

Press “Run” to see the result.

Counters belong to your account and live under a namespace: POST /v1/counter/{namespace}/{key}/hit adds 1 and returns the new value (the counter is created on the first hit), /increment?by=5 and /decrement change it by any amount up to 1 000 000, /set (value) and /reset (optionally clear_history=true) overwrite it, GET /v1/counter/{namespace}/{key} reads it with daily hits for the last days (default 30, up to 365), PATCH changes options and DELETE removes it. GET /v1/counter lists your counters, GET /v1/counter/{namespace} one namespace with its total, and POST /v1/counter creates one explicitly with a start value. Increments are atomic, so concurrent hits are never lost.

With unique_window_s (up to 30 days) a hit counts once per visitor per window: the visitor is your visitor value (a session or user id) or the request IP, stored only as a short keyed hash that expires with the window; hits_total keeps every hit. With public_read=true the counter gets a public, read-only badge at https://apibox.io.vn/c/{id}.svg (shields-style; label, color, style=flat-square, number_format=full|plain) and JSON at /c/{id}.json: no API key, cached for 5 minutes, not counted in your quota. ?preview=badge&value=1234&label=views renders a badge without an account.

Every /v1 call — including each hit — counts as one request of your monthly quota, so call hit from your server or page script for real events and use the free badge URL to display the number. Plans: Free 20 counters, Starter 500, Pro 5 000.

Use this in your code

curl -X POST "https://apibox.io.vn/v1/counter/blog/hello-world/hit" \
  -H "Authorization: Bearer YOUR_API_KEY"

API documentation → Get a free API key

FAQ

Does showing the badge use my quota?

No. The badge and JSON under /c/ are free and cached 5 minutes. Only /v1/counter calls (hit, get, reset…) count.

Can visitors increase the counter without my key?

No. Hits need your API key, so call hit from your backend (or a serverless function) and keep the key secret.

Is the IP address stored?

No. Only a truncated keyed hash is kept for unique counting, and it is deleted when the window ends.