---
title: "Get Guides Popularity"
method: GET
path: "/guides/popularity"
---

# Get Guides Popularity

`GET /guides/popularity`

## Request

- Base URL: `https://api.local-mcp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.local-mcp.com/guides/popularity`
- Auth: none declared

Public: page views per guide slug (last N days) so the /guides index can
auto-order by what people actually read. Guide page views are identified the
same way /admin/guide-funnel does — source='guide' + ref='guide-<slug>' (the
per-guide tracker tags them; the generic `path` field is NOT set on guide
views, which is why a path-based match returns nothing). Only aggregates
leave the backend.

Cached GUIDES_POPULARITY_TTL_SECONDS per `days` (#333). A failed read answers the last body,
or an empty map when there has never been one: the only consumer (lmcp-web) already reads a
failure as an empty map, and this route never answers 500 for a database hiccup.

## Query parameters

- `days` integer

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/local-mcp/apis/lmcp-api.md) · [All operations](https://skmtc.dev/local-mcp/apis/lmcp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/local-mcp/apis/lmcp-api/revisions/f1f1c502623a?raw)
