Home / Docs / Trends

Trends

Endpoints for trend topics, metrics, and analysis.

Trends

List Trend Topics

GET /api/trends/topics/

Auth: read_only or full_access

Returns all trend topics.


Create Trend Topic

POST /api/trends/topics/

Auth: full_access

Request body:

{
  "name": "Serverless",
  "slug": "serverless",
  "keywords": ["serverless", "lambda", "cloud functions"],
  "topic_type": "technology",
  "description": "Serverless computing platforms",
  "category": "infrastructure",
  "is_active": true
}

Get Trend Topic

GET /api/trends/topics/<slug>/

Auth: read_only or full_access


Update Trend Topic

PUT / PATCH /api/trends/topics/<slug>/

Auth: full_access


Delete Trend Topic

DELETE /api/trends/topics/<slug>/

Auth: full_access


List Trend Metrics

GET /api/trends/metrics/

Auth: read_only or full_access

Returns trend metrics with mention counts, post counts, company counts, and growth percentages.

Query parameters:

Parameter Type Description
topic string Filter by topic slug
space string Filter by competitive space slug
week_start string Filter by week start date

Get Trend Metric

GET /api/trends/metrics/<id>/

Auth: read_only or full_access


List Emerging Topics

GET /api/trends/emerging/

Auth: read_only or full_access

Returns emerging topics sorted by velocity score. Suppressed topics are excluded.


Get Emerging Topic

GET /api/trends/emerging/<id>/

Auth: read_only or full_access


GET /api/trends/summary/

Auth: read_only or full_access

Returns high-level trend statistics.

Query parameters:

Parameter Type Default Description
space string - Filter by competitive space slug
weeks integer 12 Number of weeks to analyze

Response:

{
  "trending_up": 5,
  "trending_down": 3,
  "emerging_count": 2,
  "total_mentions": 1500,
  "companies_count": 45
}

GET /api/trends/data/

Auth: read_only or full_access

Returns complete trends data including summary, topics, and emerging topics.

Query parameters:

Parameter Type Default Description
space string - Filter by competitive space slug
weeks integer 12 Number of weeks

Trigger Trend Calculation

POST /api/trends/calculate/

Auth: full_access

Queue a trend calculation for a specific topic. Processing happens asynchronously.

Request body:

{
  "topic_slug": "serverless"
}

Response: 202 Accepted

{
  "status": "calculation_queued"
}