- POST /api/insta/trends/collect — background trend collection via trend_collector.collect_all - GET /api/insta/trends — list external trends with source/category/days filters - GET /api/insta/preferences — return category weights (defaults seeded on init_db) - PUT /api/insta/preferences — upsert category weights - Modified GET /api/insta/keywords to accept source= filter (source present → list_trends, else existing list_trending_keywords, backward compatible) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 REST endpoints covering health, status, news, keywords, slates, tasks, and prompt templates. All background functions are async def so FastAPI awaits them without asyncio.run conflicts. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>