Countly API

Free to Use Varies (check documentation)

Overview

Countly is an open-source product analytics platform, and its REST API lets you query event data, session metrics, user counts, and custom dashboards you have set up in your Countly instance. It requires no special authentication for read access on public endpoints of self-hosted instances. It is useful if you are already using Countly for analytics and want to pull data into custom reports or dashboards.

💡

Beginner Tip

If you are new to Countly, try the hosted demo at try.count.ly to explore the dashboard before setting up your own instance—the API structure will make much more sense once you see the data model visually.

Available Data

Use case: Integrate countly web analytics data into web and mobile applications
Countly data via REST API
JSON-formatted response data
Freely accessible without authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Countly",
    "description": "Countly web analytics",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

total_sessions Total number of sessions recorded in the specified time period.
total_users Total number of unique users who used the app in the period.
new_users Number of users who opened the app for the first time in the period.
total_events Total count of all custom events triggered across all users.
avg_session_duration Average session length in seconds across all sessions in the period.

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://api.count.ly/reference";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Empty or null response The app_id or api_key parameter is incorrect, or the app has no data for the requested period.
Verify your api_key and app_id in the Countly dashboard under Management > Applications.
401 Unauthorized Using a user API key that lacks read permissions for the specified app.
Use the global admin API key or ensure the user account has at least viewer access to the app in Countly settings.
CORS error when calling from browser Countly's API may not allow cross-origin requests depending on server configuration.
Make Countly API calls from your backend server rather than directly from the browser to avoid CORS restrictions.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 20/20
🔒 Security 5/15
🛠 Developer XP 15/20
✓ Reliability 7/15
Response Time 64ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS NO
CORS UNKNOWN
Difficulty Beginner
Verified: 2026-04-07

Similar APIs

View All →