Stories Verticals

Distinct verticals across the corpus — populates filter chips on the public discovery page. No rate limit; small response, hit once on page load.

Union of article-derived verticals (canonical six + ≥3-article extras) and persona-defined verticals (briefing-only verticals from the 24 personas added 2026-05-19). Registered BEFORE the /v1/stories/{slug} catch-all.

Performance (SEV 2026-06-15): the article-side list_verticals SELECT GROUP BY ran a full index-scan + HashAggregate over every row in articles (it is now a skip scan, search._list_verticals_stmt). Cold prod wall-clock was timing out at 15s, blocking the chip row on storyflo.com/stories. Wrapped in verticals_cache.VerticalsCache (5-min TTL, single-flight) so the cold path fires at most once per worker per TTL window. Same shape as trending_cache / search_cache. The persona-vertical SELECT is in the cached compute too — same dimensionality (~24 active personas), and the merged verticals list is what downstream callers consume, so caching the union not the parts matches the invalidation cadence.

Pool-exhaustion fix 2026-06-21 (follow-up to PRs #657 + #658): deliberately no db: AsyncSession = Depends(get_db_replica) parameter. The chip row is on the storyflo.com/stories home path and shares the same anti-pattern that caused the 2026-06-20 P0 on /v1/search/hybrid — a request-scoped Depends session held across cache.get_or_compute exhausts the basic-plan pool (POOL_SIZE=5 + MAX_OVERFLOW=3 = 8 total) on a single-flight wait storm. Only the OWNER opens a short-lived replica session inside _compute and releases it via _close_session_safely before return; non-owners hold zero connections while awaiting the shared Future.

get/v1/stories/verticals

Request

  • Base URL: https://api.storyflo.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.storyflo.com/v1/stories/verticals
  • Auth: none declared

Response

Successful Response

object required

Changes

No recorded changes to this operation across all 1 revision of this API.