API Documentation
Programmatic access to community intelligence data — posts, signals, and Share of Voice analytics across 11 platforms.
Endpoints
Authentication
All requests require an API key sent via the X-API-Key header.
Example
curl -H "X-API-Key: ct_live_abc123..." "<your-base-url>/api-posts?keyword=AI+tools"
Getting Your API Key
- 1Log in to CommunityTracker
- 2Go to Settings > API
- 3Click Generate API Key
- 4Copy the key immediately — it is shown only once
Keys use the format ct_live_ followed by 32 random characters. They are SHA-256 hashed server-side; the plaintext is never stored.
Plan Requirements
Trial users receive a 403 PLAN_NO_API_ACCESS error. Upgrade to Pro or Team to enable API access.
Rate Limits
Every response includes rate limit headers:
Example response headers
X-RateLimit-Limit: 5000 X-RateLimit-Remaining: 4832 X-RateLimit-Reset: 2026-04-05T00:00:00.000Z
When the limit is exceeded, the API returns HTTP 429:
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Daily API limit of 5000 requests exceeded. Resets at midnight UTC.",
"limit": 5000,
"used": 5000,
"resets_at": "2026-04-05T00:00:00.000Z"
}
}Community Posts
Fetch AI-scored community posts matching your tracked keywords.
/api-postsParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
keyword | string | Required | The search keyword or phrase to track |
source | string | Optional | Filter by platform (e.g. reddit, hackernews, producthunt) |
min_score | number | Optional | Minimum AI score threshold (1–10) |
intent | string | Optional | Filter by intent: buying, pain_point, question, comparison |
from | string | Optional | Start date in YYYY-MM-DD format |
to | string | Optional | End date in YYYY-MM-DD format |
limit | number | Optional | Results per page (default: 50, max: 100) |
offset | number | Optional | Pagination offset (default: 0) |
Response
{
"data": [
{
"url": "https://reddit.com/r/SaaS/comments/abc123",
"title": "Looking for community monitoring tools",
"body": "We need something to track brand mentions across Reddit and HN...",
"author": "startup_founder",
"source": "reddit",
"kind": "p",
"posted_at": "2026-04-03T14:22:00Z",
"ai_score": 8.5,
"ai_reason": "Direct buying intent for community monitoring tools.",
"intent": "buying",
"urgency": "high",
"buying_stage": "evaluating",
"action_type": "engage",
"suggested_play": "Share a case study showing how CT solves this use case.",
"competitor_named": "Brandwatch",
"buying_signals": ["budget_mentioned", "timeline_given"],
"engagement_status": null,
"subreddit": "SaaS"
}
],
"meta": {
"total": 142,
"returned": 50,
"limit": 50,
"offset": 0,
"keyword": "community monitoring",
"filters_applied": {}
}
}Response Fields
| Field | Type | Description |
|---|---|---|
url | string | Direct link to the original post |
title | string | Post title |
body | string | Post body text |
author | string | Username of the poster |
source | string | Platform where the post was found |
kind | string | Post type: p (post) or c (comment) |
posted_at | string | ISO 8601 timestamp of when the post was made |
ai_score | number | AI relevance/intent score from 1 to 10 |
ai_reason | string | Short explanation of the AI score |
intent | string | Detected intent: buying, pain_point, question, comparison |
urgency | string | Urgency level: high, medium, or low |
buying_stage | string | Stage in the buying journey: aware, evaluating, deciding |
action_type | string | Recommended action: engage, monitor, ignore |
suggested_play | string | AI-generated response suggestion |
competitor_named | string | null | Competitor brand mentioned in the post, if any |
buying_signals | string[] | List of detected buying signal tags |
engagement_status | string | null | Your team's engagement status, if set |
subreddit | string | null | Subreddit name for Reddit posts |
Example Request
Fetch high-scoring Reddit posts from the last 7 days:
curl -H "X-API-Key: ct_live_your_key_here" \ "<your-base-url>/api-posts?keyword=AI+tools&source=reddit&min_score=7&from=2026-03-28&limit=20"
Intelligence / Share of Voice
Get Share of Voice (SOV) snapshots and AI summaries for your intelligence queries.
/api-intelligenceHow It Works
This endpoint has different modes depending on which parameters you provide:
- •No parameters — Returns HTTP 400 with a list of your active queries and their IDs
- •query_id only — Returns the latest SOV snapshot for that query
- •query_id + date — Returns the snapshot for that specific date
- •query_id + from/to — Returns an array of snapshots within the date range
Step 1: Find your Query ID
Call the endpoint without parameters to get your active queries:
curl -H "X-API-Key: ct_live_your_key_here" "<your-base-url>/api-intelligence"
Response (HTTP 400, but includes your queries):
{
"error": {
"code": "MISSING_QUERY_ID",
"message": "The query_id parameter is required."
},
"queries": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"primary_brand": "YourBrand",
"competitor_brands": ["Competitor A", "Competitor B"],
"communities": ["reddit", "hackernews", "producthunt"]
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query_id | string (UUID) | Yes* | Your intelligence query ID. Omit to discover your query IDs. |
date | string | No | Specific snapshot date in YYYY-MM-DD format |
from | string | No | Start of date range in YYYY-MM-DD format |
to | string | No | End of date range in YYYY-MM-DD format |
limit | number | No | Max snapshots to return when using from/to (default: 30) |
Response — Single Snapshot
When fetching the latest or a specific date, data is a single object:
{
"data": {
"snapshot_date": "2026-04-03",
"time_range": "30d",
"range_days": 30,
"ai_summary": "YourBrand leads with 42% SOV across tracked communities...",
"brands": {
"YourBrand": { "mentions": 84, "sov_pct": 42.0 },
"Competitor A": { "mentions": 62, "sov_pct": 31.0 }
},
"by_community": {
"reddit": { "YourBrand": 35, "Competitor A": 28 },
"hackernews": { "YourBrand": 22, "Competitor A": 12 }
}
},
"query": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"primary_brand": "YourBrand",
"competitor_brands": ["Competitor A", "Competitor B"],
"communities": ["reddit", "hackernews", "producthunt"],
"range_days": 30
},
"meta": {
"snapshots_returned": 1,
"latest_snapshot_date": "2026-04-03"
}
}Note: The sov_data stored in the database is flattened into the top level of each snapshot object (e.g., brands, by_community appear directly in data, not nested under a sov_data key).
Response — Multiple Snapshots
When using from/to date range, data is an array:
{
"data": [
{
"snapshot_date": "2026-04-03",
"time_range": "30d",
"range_days": 30,
"ai_summary": "...",
"brands": { ... },
"by_community": { ... }
},
{
"snapshot_date": "2026-03-27",
"time_range": "30d",
"range_days": 30,
"ai_summary": "...",
"brands": { ... },
"by_community": { ... }
}
],
"query": { ... },
"meta": {
"snapshots_returned": 2,
"from": "2026-03-01",
"to": "2026-04-03"
}
}Example Requests
Get latest snapshot:
curl -H "X-API-Key: ct_live_your_key_here" \ "<your-base-url>/api-intelligence?query_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Get snapshots for a date range:
curl -H "X-API-Key: ct_live_your_key_here" \ "<your-base-url>/api-intelligence?query_id=a1b2c3d4-...&from=2026-03-01&to=2026-04-01&limit=10"
Errors
All errors follow a consistent format:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable description of what went wrong."
}
}Error Codes
| HTTP Status | Error Code | Description |
|---|---|---|
| 401 | MISSING_API_KEY | No X-API-Key header was provided |
| 401 | INVALID_API_KEY | The API key is invalid or has been revoked |
| 403 | PLAN_NO_API_ACCESS | Your current plan does not include API access |
| 400 | MISSING_KEYWORD | The required keyword parameter is missing (api-posts) |
| 400 | MISSING_QUERY_ID | The required query_id parameter is missing (api-intelligence) |
| 404 | QUERY_NOT_FOUND | No intelligence query found for the given query_id |
| 404 | SNAPSHOT_NOT_FOUND | No snapshot found for the given query_id and date |
| 429 | RATE_LIMIT_EXCEEDED | You have exceeded your daily API request limit |
| 500 | INTERNAL_ERROR | An unexpected server error occurred |
Code Examples
Python
import requests
BASE_URL = "<your-base-url>" # Your CommunityTracker API base URL
API_KEY = "ct_live_your_key_here"
HEADERS = {"X-API-Key": API_KEY}
def get_posts(keyword, source=None, min_score=None, limit=50):
"""Fetch community posts for a keyword."""
params = {"keyword": keyword, "limit": limit}
if source:
params["source"] = source
if min_score is not None:
params["min_score"] = min_score
resp = requests.get(f"{BASE_URL}/api-posts", headers=HEADERS, params=params)
resp.raise_for_status()
# Check rate limits
remaining = resp.headers.get("X-RateLimit-Remaining")
print(f"Requests remaining today: {remaining}")
return resp.json()
def get_sov(query_id, from_date=None, to_date=None):
"""Fetch SOV snapshots for an intelligence query."""
params = {"query_id": query_id}
if from_date:
params["from"] = from_date
if to_date:
params["to"] = to_date
resp = requests.get(f"{BASE_URL}/api-intelligence", headers=HEADERS, params=params)
resp.raise_for_status()
return resp.json()
def list_queries():
"""List your active intelligence queries and their IDs."""
resp = requests.get(f"{BASE_URL}/api-intelligence", headers=HEADERS)
return resp.json().get("queries", [])
# Usage
posts = get_posts("AI tools", source="reddit", min_score=7)
for post in posts["data"]:
print(f'[{post["ai_score"]}] {post["title"]} -- {post["url"]}')
queries = list_queries()
if queries:
sov = get_sov(queries[0]["id"])
print(sov["data"]["ai_summary"])JavaScript / Node.js
const BASE_URL = "<your-base-url>"; // Your CommunityTracker API base URL
const API_KEY = "ct_live_your_key_here";
async function getPosts(keyword, { source, minScore, limit = 50 } = {}) {
const params = new URLSearchParams({ keyword, limit });
if (source) params.set("source", source);
if (minScore != null) params.set("min_score", minScore);
const resp = await fetch(`${BASE_URL}/api-posts?${params}`, {
headers: { "X-API-Key": API_KEY },
});
if (!resp.ok) {
const err = await resp.json();
throw new Error(`${err.error.code}: ${err.error.message}`);
}
console.log(`Remaining: ${resp.headers.get("X-RateLimit-Remaining")}`);
return resp.json();
}
async function getSov(queryId, { from, to, limit } = {}) {
const params = new URLSearchParams({ query_id: queryId });
if (from) params.set("from", from);
if (to) params.set("to", to);
if (limit) params.set("limit", limit);
const resp = await fetch(`${BASE_URL}/api-intelligence?${params}`, {
headers: { "X-API-Key": API_KEY },
});
if (!resp.ok) {
const err = await resp.json();
throw new Error(`${err.error.code}: ${err.error.message}`);
}
return resp.json();
}
async function listQueries() {
const resp = await fetch(`${BASE_URL}/api-intelligence`, {
headers: { "X-API-Key": API_KEY },
});
const data = await resp.json();
return data.queries || [];
}
// Usage
const posts = await getPosts("AI tools", { source: "reddit", minScore: 7 });
posts.data.forEach((p) => console.log(`[${p.ai_score}] ${p.title}`));
const queries = await listQueries();
if (queries.length > 0) {
const sov = await getSov(queries[0].id);
console.log(sov.data.ai_summary);
}Quick Reference
| Method | Endpoint | Description | Required Param |
|---|---|---|---|
| GET | /api-posts | Fetch AI-scored community posts | keyword |
| GET | /api-intelligence | List active intelligence queries | none |
| GET | /api-intelligence?query_id=… | Get latest SOV snapshot | query_id |
| GET | /api-intelligence?query_id=…&date=… | Get SOV for a specific date | query_id, date |
| GET | /api-intelligence?query_id=…&from=…&to=… | Get SOV snapshots over a date range | query_id, from, to |
Ready to get started?
Generate your API key in Settings → API and start building with CommunityTracker data.
View Plans