Let Pascal do the math.
A free, public counting API. Create counters, increment them, embed badges — all with simple HTTP requests. No sign up required.
Three steps. No sign up. No API keys needed for basic usage.
curl https://pascal.yourdomain.com/api/create/myapp/page-views1{
2 "namespace": "myapp",
3 "key": "page-views",
4 "value": 0,
5 "admin_key": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
6}admin_key! You'll need it to delete, reset, or set the counter value.curl https://pascal.yourdomain.com/api/hit/myapp/page-views{ "value": 1 }curl https://pascal.yourdomain.com/api/get/myapp/page-views{ "value": 1 }All code examples below will update automatically.
All available endpoints. Click any endpoint to expand its documentation.
Authorization: Bearer <admin_key> header. You receive the admin key when creating a counter.Embed live counter badges in your README, website, or anywhere that supports images.
Available on both /hit/.../shield and /get/.../shield routes.
| Parameter | Default | Description |
|---|---|---|
| text | pascal | Label text on the left side |
| bgcolor | #4c1 | Background color of the value side |
| textcolor | #fff | Text color |
| style | flat | flat flat-square plastic |
| fontsize | 11 | Font size in pixels |
Example
<!-- In your README.md -->
To prevent abuse, Pascal enforces rate limits on all API endpoints.
Rate limit headers are included in every response:
RateLimit-Limit: 30
RateLimit-Remaining: 27
RateLimit-Reset: 1700000000
RateLimit-Policy: 30;w=10If you exceed the limit, you'll receive a 429 Too Many Requests response with a Retry-After header.
All GET endpoints support JSONP for cross-domain compatibility.
Pass a callback query parameter:
1curl "https://pascal.yourdomain.com/api/get/myapp/views?callback=handleCount"
2
3// Response:
4/**/ typeof handleCount === 'function' && handleCount({"value":42});Yes. Counters expire after 6 months of inactivity. Every time a counter is accessed (read, hit, or modified), the expiration resets. If nobody touches a counter for 6 months, it will be automatically deleted.
Namespaces let you organize counters by project or category. For example, myapp/downloads and myapp/visits share the namespace myapp.
Both namespaces and keys must be 3-64 characters and match [A-Za-z0-9_-.]. Letters, numbers, underscores, hyphens, and dots only.
Pascal is completely free to use. No sign up, no API keys for basic usage.
Admin keys cannot be recovered. If you lose your admin key, you won't be able to delete, reset, or set the counter value. The counter will still work for reading and incrementing.