Get library usage metrics
Retrieve full usage metrics for a library: cumulative and daily request counters broken down by surface (web page, text docs, MCP, CLI), MCP client daily unique-user breakdown, and lifetime topic and country distributions. The API key must belong to a member of the teamspace that owns the library — claim ownership from the library's admin page on context7.com.
1 min read
get/v2/libs/metrics
Request example
Response
get/v2/libs/metrics
Authorization
Query parameters
Context7-compatible library ID — the URL path of the library on context7.com. Use
/owner/repo for GitHub repositories, or /<source>/<id> for other sources (websites, llms.txt, GitLab/Bitbucket, etc.). Optionally suffix with /<version> or @<version> to pin a specific version. See Library ID format.Length: 1–500Pattern: ^/[^/]+/[^/]+([/@][^/]+)?$
Number of days of daily history to return (1-365). Defaults to 30.
Default: 30
Range: 1–365
Responses
application/json
Library usage metrics
Cumulative request counts for a library, broken down by request surface
Per-day request counts (deltas, not cumulative), ordered from oldest to newest. Days with zero activity are omitted. Up to
days points — fewer if the library has less history or had idle days in the window.Show child attributesHide child attributes
UTC date in
YYYY-MM-DD formatRequests served to the context7.com web UI on this date
Plain-text documentation requests on this date
Requests served via the Context7 MCP server on this date
Requests served to the Context7 CLI on this date
Sum of all request surfaces on this date (
page + txt + mcp + cli)MCP client usage breakdown by day
Show child attributesHide child attributes
Per-day MCP client unique-user breakdown, ordered from oldest to newest
Show child attributesHide child attributes
UTC date in
YYYY-MM-DD formatUnique user count per MCP client identifier (e.g.,
cursor, claude-code, codex)Show child attributesHide child attributes
Total unique users across all clients for this library on this date
Lifetime topic distribution, ordered by count descending