GET /api/v1/trending/views
Trending names ranked by page view count. Uses materialized views (trending_views_24h / trending_views_7d).
Authentication: Optional
Cache: None
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
period | string | 24h | Time period: 24h or 7d |
limit | number | 20 | Results to return (1-100) |
Trending Metrics
| Field | Type | Description |
|---|---|---|
period_views | number | Views in the selected period |
unique_viewers | number | Unique viewers in the period |
total_views | number | All-time view count |
Sample Request
curl "https://api.grails.app/api/v1/trending/views?period=24h&limit=10"Response
// 200 OK
{
"success": true,
"data": {
"names": [
{
// ... standard SearchResult fields (id, name, token_id, owner, etc.)
"trending_metrics": {
"period": "24h",
"period_views": 150,
"unique_viewers": 85,
"total_views": 3200
}
}
],
"meta": { "period": "24h", "type": "views", "limit": 10 }
},
"meta": {
"timestamp": "2026-04-07T12:00:00.000Z",
"version": "1.0.0"
}
}Last updated on