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.
Request
- Base URLhttps://context7.com/api
- URLhttps://context7.com/api/v2/libs/metrics
- AuthHTTP bearer
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.
Number of days of daily history to return (1-365). Defaults to 30.
Response
Library usage metrics
Example response
{
"daily": [
{
"date": "2025-01-15"
}
],
"mcpClients": {
"dailyData": [
{
"date": "2025-01-15"
}
]
},
"topics": [
{
"topic": "routing"
}
],
"countries": [
{
"country": "US"
}
]
}Changes
No recorded changes to this operation across all 26 revisions of this API.