Glystn Trends API
Discover and analyze content trends from Instagram posts using AI-powered clustering.
Workflow
The Trends API provides an async workflow for deep trend analysis:
- Create a Trend Run - Start an analysis job with your search criteria
- Poll for Status - Check the run status every 3 seconds until complete
- Get Clusters - Retrieve trend clusters and insights when finished
- Fetch Posts - Get example posts from any cluster using its ID
Authentication
All API endpoints require authentication via API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Rate Limits
Rate limits are applied per organization using a sliding window:
| Endpoint | Limit |
|---|---|
POST /api/public/trends (create run) | 50 runs per 24 hours |
GET /api/public/trends/* | 1000 requests per hour |
POST /api/public/trends/posts | 1000 requests per hour |
Rate limit headers are included in all responses:
X-RateLimit-Limit: 50
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705449600
Error Codes
| Code | Description |
|---|---|
200 | Success |
202 | Accepted (async job started) |
400 | Bad request (invalid parameters) |
401 | Unauthorized (invalid or missing API key) |
404 | Resource not found |
429 | Rate limit exceeded |
500 | Server error |