Skip to main content
GET
/
v2
/
libs
/
metrics
Get library usage metrics
curl --request GET \
  --url https://context7.com/api/v2/libs/metrics \
  --header 'Authorization: Bearer <token>'
{ "total": { "page": 12450, "txt": 3820, "mcp": 95210, "cli": 1240 }, "daily": [ { "date": "2025-01-14", "page": 8, "txt": 3, "mcp": 42, "cli": 1, "total": 54 }, { "date": "2025-01-15", "page": 11, "txt": 5, "mcp": 67, "cli": 0, "total": 83 } ], "mcpClients": { "dailyData": [ { "date": "2025-01-14", "uniqueUsersByClient": { "cursor": 12, "claude-code": 7 }, "totalUniqueUsers": 18 }, { "date": "2025-01-15", "uniqueUsersByClient": { "cursor": 15, "claude-code": 9, "windsurf": 2 }, "totalUniqueUsers": 25 } ] }, "topics": [ { "topic": "routing", "count": 420 }, { "topic": "middleware", "count": 312 }, { "topic": "app-router", "count": 187 } ], "countries": [ { "country": "US", "count": 3120 }, { "country": "DE", "count": 842 }, { "country": "IN", "count": 610 } ] }

Documentation Index

Fetch the complete documentation index at: https://context7.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Query Parameters

libraryId
string
required

Context7-compatible library ID in format /owner/repo, /owner/repo/version, or /owner/repo@version

Required string length: 1 - 500
Pattern: ^/[^/]+/[^/]+([/@][^/]+)?$
days
integer
default:30

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

Required range: 1 <= x <= 365

Response

Library usage metrics

Library usage metrics response

total
object
required

Cumulative request counts for a library, broken down by request surface

daily
object[]
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.

mcpClients
object
required

MCP client usage breakdown by day

topics
object[]
required

Lifetime topic distribution, ordered by count descending

countries
object[]
required

Lifetime country distribution (ISO-2 codes), ordered by count descending