context7 icon indicating copy to clipboard operation
context7 copied to clipboard

[Feature]: Public API for submitting documentation URLs programmatically

Open 4q4r opened this issue 9 months ago • 2 comments

Problem Description

Currently, the only way to submit new documentation/content to Context7 is through the web UI at context7.com. This creates several pain points:

  1. No automation possible — I can't programmatically submit URLs, which means I have to manually visit the site every time I want to add a new project.
  2. No queuing — The site only processes one submission at a time. I have to sit and wait for the previous project to finish scanning before I can submit the next one. If I have 10-20 URLs to add, this becomes a multi-hour manual babysitting session.
  3. No integration with other tools — Without an API, it's impossible to build workflows around Context7 submissions (e.g., a Telegram bot, a CI/CD step, a CLI tool, etc.).

This makes bulk contributions to the Context7 knowledge base unnecessarily painful and time-consuming.

Proposed Solution

Expose a public REST API (or at minimum a documented HTTP endpoint) for submitting documentation URLs to Context7.

Minimum viable endpoint:

POST /api/v1/submit
Content-Type: application/json

{
  "url": "https://github.com/some-org/some-project",
  "callback_url": "https://my-server.com/webhook" // optional
}

Expected response:

{
  "id": "submission-123",
  "status": "queued",
  "estimated_wait": "~5 minutes"
}

Nice-to-have additions:

  • GET /api/v1/submit/{id}/status — check whether a submission has been processed, its rating score, and whether it was accepted or rejected.
  • Webhook/callback support — POST the result to a user-provided URL when processing is complete.
  • Rate limiting with clear headers (X-RateLimit-Remaining, etc.) so users can implement client-side queuing responsibly.
  • API key authentication (should be tied to a Context7 account).

What this enables:

  • Telegram/Discord bots — paste a link, bot submits it, bot reports back the result.
  • Client-side queue management — users can batch submissions without overloading the server, spacing them out based on rate limit headers.
  • CLI tools — npx context7 submit https://... for quick submissions from the terminal.
  • Community tooling — others could build browser extensions, Raycast plugins, etc.

Alternatives Considered

  1. Scraping/automating the web UI — Fragile, breaks on any frontend change, and likely against ToS. Not a real solution.
  2. Opening GitHub issues to request additions — Doesn't scale, adds manual work for maintainers.
  3. Waiting on the website — What I currently do. Works but is extremely tedious when submitting multiple projects in a session.

An API is the clean, scalable solution that benefits both the Context7 team (structured input, rate limiting control) and the community (automation, integrations).

Priority

Would improve my workflow

Additional Context

Use case example:

I'm building a Telegram bot for my personal workflow. The flow would be:

  1. I find an interesting library/framework
  2. I send the docs URL to my Telegram bot
  3. The bot calls the Context7 API to submit it
  4. The bot queues the next URL if rate-limited
  5. When processing is done, the bot notifies me with the result (accepted/rejected, score, etc.)

This keeps me productive instead of tab-switching to context7.com and waiting.

Server load concern:

I understand the concern about abuse. A simple API key + rate limiting (e.g., 5 submissions per hour per key) would address this while still enabling the automation use case. Users who want to submit in bulk can queue on their side and drip-feed requests.

Related:

This would also make it easier for the community to contribute to Context7's coverage — the lower the friction, the more documentation gets added.

4q4r avatar Feb 28 '26 14:02 4q4r

Hey @An0nX, thanks for raising this. We have this in our close term plans. I will update here once we have it out.

fahreddinozcan avatar Feb 28 '26 23:02 fahreddinozcan

Here you go https://context7.com/docs/api-reference/add-library/add-a-github-repository

enesgules avatar Apr 03 '26 13:04 enesgules