Context7 MCP

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

Authorizationstringheaderrequired#
Get your API key at context7.com/dashboard. Treat your API key like a password and store it securely.

Query parameters

libraryIdstringrequired#
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: ^/[^/]+/[^/]+([/@][^/]+)?$

daysinteger#
Number of days of daily history to return (1-365). Defaults to 30.

Default: 30

Range: 1–365

Responses

application/json
Library usage metrics
totalobjectrequired#
Cumulative request counts for a library, broken down by request surface
Show child attributes
pageintegerrequired#
Requests served to the context7.com web UI
txtintegerrequired#
Plain-text documentation requests
mcpintegerrequired#
Requests served via the Context7 MCP server
cliintegerrequired#
Requests served to the Context7 CLI
dailyobject[]required#
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 attributes
datestringrequired#
UTC date in YYYY-MM-DD format
pageintegerrequired#
Requests served to the context7.com web UI on this date
txtintegerrequired#
Plain-text documentation requests on this date
mcpintegerrequired#
Requests served via the Context7 MCP server on this date
cliintegerrequired#
Requests served to the Context7 CLI on this date
totalintegerrequired#
Sum of all request surfaces on this date (page + txt + mcp + cli)
mcpClientsobjectrequired#
MCP client usage breakdown by day
Show child attributes
dailyDataobject[]required#
Per-day MCP client unique-user breakdown, ordered from oldest to newest
Show child attributes
datestringrequired#
UTC date in YYYY-MM-DD format
uniqueUsersByClientobjectrequired#
Unique user count per MCP client identifier (e.g., cursor, claude-code, codex)
Show child attributes
{key}integer#
totalUniqueUsersintegerrequired#
Total unique users across all clients for this library on this date
topicsobject[]required#
Lifetime topic distribution, ordered by count descending
Show child attributes
topicstringrequired#
Normalized, lowercased topic string
countintegerrequired#
Number of requests that referenced this topic
countriesobject[]required#
Lifetime country distribution (ISO-2 codes), ordered by count descending
Show child attributes
countrystringrequired#
ISO 3166-1 alpha-2 country code
countintegerrequired#
Number of requests originating from this country