Automatic Refresh
Every time a library is requested through Context7 — whether via the MCP server or the REST API — the system checks when the documentation was last updated. If it’s older than a threshold based on the library’s popularity, a background refresh is triggered automatically.Refresh Thresholds
The staleness threshold is based on each library’s popularity rank in Context7:| Popularity Rank | Refresh Threshold |
|---|---|
| Top 100 | 3 days |
| Top 1,000 | 10 days |
| Top 5,000 | 20 days |
| All others | 30 days |
The refresh is triggered in the background and does not affect the response time of your current request. You will receive the existing documentation immediately while the update runs asynchronously.
Manual Refresh
Logged-in users can manually trigger a refresh for any library directly from the library page on Context7 or via the refresh API endpoint. This is useful when you know a library has just released a new version and want the updated documentation immediately, without waiting for the automatic cycle to complete. Library owners who have claimed their library receive higher refresh rate limits, giving them more control over how frequently their documentation can be updated.What Triggers a Refresh
A refresh is triggered when all of the following conditions are met:- The library has been requested recently
- The documentation is older than the threshold for that library’s popularity rank
Private libraries are not refreshed automatically. To update a private library’s documentation, trigger a manual refresh from the library page.
Supported Library Types
Automatic and manual refreshes work across all supported source types:- Git repositories — re-parsed from the configured branch
- Websites — re-crawled from the base URL
- OpenAPI specs — re-fetched and re-indexed from the spec source