Ideas Research Decisions Watching
General API Trends API YouTube analysis API Pro Reporting API

Trends API

Create and read trends programmatically. Auth with your API key and go.

Quick start

Get your API key from Profile → API. Send it in the header:

Authorization: Bearer YOUR_API_KEY
Base URL: https://trends.smartestcrowd.com/api/v1/
GET /api/v1/trends

Returns all trends for your teams (and public trends). No query params.

Example requests:

import requests

url = "https://trends.smartestcrowd.com/api/v1/trends"
headers = {"Authorization": "Bearer YOUR_API_KEY"}

r = requests.get(url, headers=headers)
data = r.json()
print(data["count"], "trends")
for t in data["trends"]:
    print(t["id"], t["labels"], t["values"])
const res = await fetch("https://trends.smartestcrowd.com/api/v1/trends", {
  headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const data = await res.json();
console.log(data.count, "trends");
data.trends.forEach(t => console.log(t.id, t.labels, t.values));
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://trends.smartestcrowd.com/api/v1/trends"

Sample response (200)

{
  "success": true,
  "count": 2,
  "trends": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "topic_id": "topic-abc-123",
      "title": "AI Trends",
      "team_id": "team-xyz-456",
      "labels": ["Jan", "Feb", "Mar"],
      "values": [100, 150, 200],
      "created_at": "2026-02-20T14:30:00",
      "updated_at": "2026-02-20T14:30:00"
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "topic_id": "topic-def-456",
      "title": "Quantum Computing",
      "team_id": null,
      "labels": ["Q1", "Q2", "Q3", "Q4"],
      "values": [10, 25, 40, 55],
      "created_at": "2026-02-19T09:00:00",
      "updated_at": "2026-02-19T09:00:00"
    }
  ]
}
POST /api/v1/trends

Create a trend. Either link to an existing topic with topic_id, or send a topic object to create topic + trend in one call. team_id is optional (requires team admin/moderator).

Required: labels (array), values (array), and either topic_id or topic (e.g. {"title": "AI Agents"}).

Example requests:

import requests

url = "https://trends.smartestcrowd.com/api/v1/trends"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
# Create topic + trend together
payload = {
    "topic": {"title": "AI Agents", "description": "Autonomous agents"},
    "labels": ["Jan", "Feb", "Mar"],
    "values": [100, 150, 200]
}

r = requests.post(url, headers=headers, json=payload)
print(r.json())
const res = await fetch("https://trends.smartestcrowd.com/api/v1/trends", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    topic: { title: "AI Agents", description: "Autonomous agents" },
    labels: ["Jan", "Feb", "Mar"],
    values: [100, 150, 200]
  })
});
const data = await res.json();
console.log(data);
curl -X POST -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"topic":{"title":"AI Agents"},"labels":["Jan","Feb","Mar"],"values":[100,150,200]}' \
  "https://trends.smartestcrowd.com/api/v1/trends"

Sample response — create topic + trend (201)

{
  "success": true,
  "trend": {
    "id": "trend-789",
    "topic_id": "topic-123",
    "team_id": null,
    "labels": ["Jan", "Feb", "Mar"],
    "values": [100, 150, 200],
    "created_at": "2026-02-20T15:00:00"
  },
  "topic": {
    "id": "topic-123",
    "title": "AI Agents",
    "description": "Autonomous agents",
    "volume": "0",
    "growth": "0%",
    "created_at": "2026-02-20T15:00:00"
  }
}

Sample response — existing topic (201)

{
  "success": true,
  "trend": {
    "id": "trend-789",
    "topic_id": "topic-123",
    "team_id": null,
    "labels": ["Jan", "Feb", "Mar"],
    "values": [100, 150, 200],
    "created_at": "2026-02-20T15:00:00"
  }
}

Sample error (400)

{
  "error": "Missing required fields",
  "required": ["labels", "values"],
  "note": "Either provide topic_id or topic object to create topic and trend together"
}

Tips

  • Keep your API key secret; regenerate it if exposed.
  • Use topic + labels/values to create a topic and trend in one request.
  • Handle errors and non-2xx responses in your app.
Profile / API key Full API docs

© 2025 Top Trends Blog