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
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.