CommunityTracker
DEVELOPERS

API Documentation

Programmatic access to community intelligence data — posts, signals, and Share of Voice analytics across 11 platforms.

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

  1. 1Log in to CommunityTracker
  2. 2Go to Settings > API
  3. 3Click Generate API Key
  4. 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.

GET/api-posts

Parameters

ParameterTypeRequiredDescription
keywordstringRequiredThe search keyword or phrase to track
sourcestringOptionalFilter by platform (e.g. reddit, hackernews, producthunt)
min_scorenumberOptionalMinimum AI score threshold (1–10)
intentstringOptionalFilter by intent: buying, pain_point, question, comparison
fromstringOptionalStart date in YYYY-MM-DD format
tostringOptionalEnd date in YYYY-MM-DD format
limitnumberOptionalResults per page (default: 50, max: 100)
offsetnumberOptionalPagination 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

FieldTypeDescription
urlstringDirect link to the original post
titlestringPost title
bodystringPost body text
authorstringUsername of the poster
sourcestringPlatform where the post was found
kindstringPost type: p (post) or c (comment)
posted_atstringISO 8601 timestamp of when the post was made
ai_scorenumberAI relevance/intent score from 1 to 10
ai_reasonstringShort explanation of the AI score
intentstringDetected intent: buying, pain_point, question, comparison
urgencystringUrgency level: high, medium, or low
buying_stagestringStage in the buying journey: aware, evaluating, deciding
action_typestringRecommended action: engage, monitor, ignore
suggested_playstringAI-generated response suggestion
competitor_namedstring | nullCompetitor brand mentioned in the post, if any
buying_signalsstring[]List of detected buying signal tags
engagement_statusstring | nullYour team's engagement status, if set
subredditstring | nullSubreddit 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.

GET/api-intelligence

How 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

ParameterTypeRequiredDescription
query_idstring (UUID)Yes*Your intelligence query ID. Omit to discover your query IDs.
datestringNoSpecific snapshot date in YYYY-MM-DD format
fromstringNoStart of date range in YYYY-MM-DD format
tostringNoEnd of date range in YYYY-MM-DD format
limitnumberNoMax 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 StatusError CodeDescription
401MISSING_API_KEYNo X-API-Key header was provided
401INVALID_API_KEYThe API key is invalid or has been revoked
403PLAN_NO_API_ACCESSYour current plan does not include API access
400MISSING_KEYWORDThe required keyword parameter is missing (api-posts)
400MISSING_QUERY_IDThe required query_id parameter is missing (api-intelligence)
404QUERY_NOT_FOUNDNo intelligence query found for the given query_id
404SNAPSHOT_NOT_FOUNDNo snapshot found for the given query_id and date
429RATE_LIMIT_EXCEEDEDYou have exceeded your daily API request limit
500INTERNAL_ERRORAn 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

MethodEndpointDescriptionRequired Param
GET/api-postsFetch AI-scored community postskeyword
GET/api-intelligenceList active intelligence queriesnone
GET/api-intelligence?query_id=…Get latest SOV snapshotquery_id
GET/api-intelligence?query_id=…&date=…Get SOV for a specific datequery_id, date
GET/api-intelligence?query_id=…&from=…&to=…Get SOV snapshots over a date rangequery_id, from, to

Ready to get started?

Generate your API key in Settings → API and start building with CommunityTracker data.

View Plans