---
title: "What's Trending in a Niche"
method: POST
path: "/api/v1/trends"
---

# What's Trending in a Niche

`POST /api/v1/trends`

## Request

- Base URL: `https://viraloutliers.com`
- URL: `https://viraloutliers.com/api/v1/trends`
- Auth: HTTP bearer

Returns the top overperforming posts in a niche over a recent window (default one week), plus a breakdown of which content types are driving the trend and which creators are represented. Filter by keyword and platform. Great as the first call in a content-research loop: see what's hot, then deep-dive or remix the winners.

Cost: 2 credits per call.

## Request body

- object
  - `query` string: Niche keyword over captions/titles/handles.
  - `platforms` string[]: "tiktok" | "instagram" | "youtube".
  - `categoryId` string: Niche filter: a category id from list_categories (covers its subtree). More precise than a keyword: it scopes to the creators categorized in that niche.
  - `timeFrame` string: "one_week" (default) up to "all_time".
  - `limit` number: Top posts to return, clamped 1–50 (default 20).

## Response `200`

Success

- object

## Other responses

- `401`: Invalid or revoked API key (or, on free skills, no key sent); code key_suspended means the key was suspended when its account was claimed by the email owner and can be reactivated in Settings
- `402`: Payment required. Without an API key (billable skills only) the code is payment_required and error.payment.checkoutUrl (or, when no link is configured, error.payment.pageUrl at https://viraloutliers.com/api-access) buys a key without an account; with a key it is insufficient_credits and error.payment points at create_topup_link.
- `429`: Rate limited

---

[API](https://skmtc.dev/viraloutliers/apis/viral-outliers-agent-api.md) · [All operations](https://skmtc.dev/viraloutliers/apis/viral-outliers-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/viraloutliers/apis/viral-outliers-agent-api/revisions/0099977bd629?raw)
