# Trending companies API endpoint

Source: https://subalytics.com/docs/entity-trending/

> GET /api/v1/entity-trending/: companies ranked by mention volume or by change against the previous window. Parameters and example.

`GET /api/v1/entity-trending/` (No pagination · up to 100 companies). Base URL `https://subalytics.com/api/v1/`, API key in the `X-API-key` header; authentication, pagination, dates and errors: https://subalytics.com/docs/

Companies ranked by mention volume, or by how much their volume changed, over a time window. Each company is compared with the window of the same length immediately before it: for a 7-day window, the previous 7 days. Counts include only mentions with `confidence` of 0.7 or above.

This endpoint doesn't use cursors: `limit` caps the number of companies and `next_cursor` is always `null`.

## Query parameters

| Parameter | Type | Description |
|---|---|---|
| `source` | string | substack, bluesky or podcast; omit for all sources combined |
| `period_from` | date | Start of the window to rank (whole days). Default: 7 days before today |
| `period_to` | date | End of the window to rank. Default: yesterday (the last full day) |
| `sort` | string | volume (default, most mentions in the window) or change (largest change_pct) |
| `min_mentions` | int | Only rank companies with at least this many mentions in the window (default 10), so sort=change isn't dominated by moves like 1 → 5 mentions |
| `sector` | string | Rank only companies in one sector (the sector value from entity-companies) |
| `limit` | int | Companies returned (default 25, max 100) |

## Response fields

| Field | Type | Description |
|---|---|---|
| `rank` | integer | 1 = top |
| `symbol` | string | Company ticker |
| `company_name` | string | Official company name |
| `mention_count` | integer | Mentions in the window |
| `previous_mention_count` | integer | Mentions in the equal-length window before |
| `change_pct` | number \| null | Percentage change vs. the previous window; null when previous_mention_count is 0 |
| `creator_count` | integer | Distinct creators and podcasts in the window |

With `sort=change`, companies whose `change_pct` is `null` (no mentions in the previous window) are ranked after every company with a number.

## Example

```
GET /api/v1/entity-trending/?sort=change&period_from=2026-09-21&period_to=2026-09-27&limit=2
```

```
{
  "success": true,
  "results": [
    { "rank": 1, "symbol": "META", "company_name": "Meta Platforms, Inc.", "mention_count": 412, "previous_mention_count": 139, "change_pct": 196.4, "creator_count": 301 },
    { "rank": 2, "symbol": "TSLA", "company_name": "Tesla, Inc.", "mention_count": 5210, "previous_mention_count": 2884, "change_pct": 80.7, "creator_count": 3120 }
  ],
  "returned_results": 2,
  "limit": 2,
  "next_cursor": null
}
```
