Getting started
CountJar gives every number its own URL. Call the URL to change the number, read it back from anywhere, and watch it on a chart. This page takes you from nothing to a working counter in about five minutes.
How it works
Every counter lives in a workspace and has an address like this:
https://countjar.vercel.app/api/v2/<workspace>/<counter>
Add an action to the end to change it: /up adds one, /down subtracts one, /set?value=42 sets it. Leave the action off to read the current value. Every call returns JSON.
A counter is either public or private:
- Public counters can be read and counted up by anyone with the URL, which is what you want for page views, like buttons and polls on a website.
- Private counters need an API token for every request, which suits sign-ups, sales or anything you count from your own server.
Subtracting, setting exact values and resetting always need a token, even on public counters.
Try it without an account
The demo counter demo/test-counter is open to everyone. Run this in a terminal, then run it again:
curl https://countjar.vercel.app/api/v2/demo/test-counter/up
{
"workspace": "demo",
"name": "test-counter",
"type": "count",
"visibility": "public",
"count": 1285,
"counted": true,
"created_at": "2026-10-14T08:00:00Z",
"updated_at": "2026-10-14T09:12:44Z"
}
It's shared with everyone reading this page, so expect the number to move. To keep your own counters you need an account.
1. Create an account
CountJar has no passwords. Sign in with your mobile number and we text you a 6-digit code. Enter it, choose your name and your first workspace's address (for example acme), and you're in. Accounts and tokens explains sign-in in more detail.
2. Make a counter
In the dashboard, open Counters and choose New counter. Give it a name such as visits and pick a type:
| Type | What it counts |
|---|---|
| Counter | Anything you add to or subtract from: views, downloads, sign-ups. |
| Like | One like per visitor, with a heart button widget. |
| Poll | Yes or no votes, one per visitor, with live percentages. |
| Rating | 1 to 5 stars, one rating per visitor, with the average. |
You can also set a step size, a minimum and maximum, and unique-visitor counting so each visitor only counts once a day or once ever. Every account can keep 5 counters.
3. Count something
Call the counter's URL with /up. For a public counter that's all you need:
curl https://countjar.vercel.app/api/v2/acme/visits/up
For a private counter, create a token under API tokens and send it in the Authorization header:
curl -H "Authorization: Bearer cj_your_token" \
https://countjar.vercel.app/api/v2/acme/signups/up
4. Show the number
Paste a widget into any web page. It counts the visit and shows the total:
<div class="countjar" data-workspace="acme" data-counter="visits"></div>
<script src="https://countjar.vercel.app/embed.js" async></script>
Or add a badge to a GitHub README:

The Embed tab on each counter builds these snippets for you, with a live preview.
Where to go next
- API reference: every endpoint and parameter.
- Code examples: JavaScript, Python, React, Next.js, Go, PHP and more.
- Widgets and badges: like buttons, polls, ratings, badge styles and the tracking pixel.
- Milestone alerts: get a webhook or a text when a counter hits a number.