Click Counter API

A simple API to track clicks, views, downloads, or custom counters for each POSTID. Store and manage custom data with Firebase easily!

How It Works

Our API allows you to track counters for custom keys under unique POSTIDs. It supports:

  • Tracking and storing numeric values (e.g., clicks, views, etc.)
  • Incrementing or decrementing values
  • Setting custom values
  • Resetting counters to zero
  • Accessing the counter data via a RESTful API

Simply access the relevant endpoints to get or update your counters. This API leverages Firebase Realtime Database for storing the data.

Endpoints

The Click Counter API provides the following routes:

  • /api/get/:postID/:key - Get the current value of a counter.
  • /api/inc/:postID/:key - Increment the counter value by 1.
  • /api/dec/:postID/:key - Decrement the counter value by 1.
  • /api/set/:postID/:key/:value - Set a specific counter value.
  • /api/reset/:postID/:key - Reset the counter to 0.
  • /api/info/:postID/:key - Get detailed info about the counter.

Each API call returns a JSON response with the data or any error messages.

Try It Out

Explore and test the API by clicking on the buttons below: