V1 Endpoints
Counter API V1 endpoints provide a simple, authentication-free way to track counts across your applications. With a rate limit of 30 requests per minute per URL path, these endpoints are ideal for basic tracking needs and public counters.
The API base URL is https://api.counterapi.dev/v1
V1 Limitations
V1 endpoints have important limitations: - Always public: All counters are accessible to anyone who knows the namespace and name - Low rate limits: Limited to only 30 requests per minute per URL path - No private counters: Cannot create counters that are accessible only to you
Upgrade to V2
V2 endpoints offer significant advantages: - 20x higher rate limits (600 requests per minute) - Option for private counters with authentication - Better security for your data
Below you'll find all available V1 endpoints with examples that you can run directly from this page.
Counter Up
Increments a counter by 1. Use this endpoint when you want to increase a count, such as tracking page views, clicks, or any cumulative event.
Endpoint: https://api.counterapi.dev/v1/:namespace/:name/up
Parameters
name | required | description |
---|---|---|
:namespace |
yes | A grouping category for your counters (e.g., your app name, website, or project) |
:name |
yes | Unique identifier for this specific counter within your namespace |
Test
{{result}}
Counter Down
Decrements a counter by 1. This is useful for tracking inventory reductions, removing votes, or any situation where you need to decrease a count.
Endpoint: https://api.counterapi.dev/v1/:namespace/:name/down
Parameters
name | required | description |
---|---|---|
:namespace |
yes | A grouping category for your counters (e.g., your app name, website, or project) |
:name |
yes | Unique identifier for this specific counter within your namespace |
Test
{{result}}
Set Counter
Sets a counter to a specific value. This allows you to initialize a counter or reset it to a particular number when needed.
Endpoint: https://api.counterapi.dev/v1/:namespace/:name/set
Parameters
name | required | description |
---|---|---|
:namespace |
yes | A grouping category for your counters (e.g., your app name, website, or project) |
:name |
yes | Unique identifier for this specific counter within your namespace |
count |
yes | The exact value to set the counter to (integer) |
Test
{{result}}
Counter Get
Retrieves the current value of a counter. Use this to display the current count without modifying it.
Endpoint: https://api.counterapi.dev/v1/:namespace/:name/
Parameters
name | required | description |
---|---|---|
:namespace |
yes | A grouping category for your counters (e.g., your app name, website, or project) |
:name |
yes | Unique identifier for this specific counter within your namespace |
Test
{{result}}
Counts List
Retrieves historical count data with flexible grouping and ordering options. This is particularly useful for generating charts, reports, or analyzing trends over time.
Endpoint: https://api.counterapi.dev/v1/:namespace/:name/list
Parameters
name | required | description |
---|---|---|
:namespace |
yes | A grouping category for your counters (e.g., your app name, website, or project) |
:name |
yes | Unique identifier for this specific counter within your namespace |
group_by |
no | Aggregates data by time period for easier analysis. Options: hour , day , week , month , year . Default is day . |
order_by |
no | Sorts results chronologically. Options: asc (oldest first), desc (newest first). Default is desc . |
Test
{{result}}