I built an API to give LLMs instant access to documentation for 1000 libraries

  • Posted 7 hours ago by riskofcollision
  • 1 points
Hey HN,

I built CodeContext API (https://codecontext-api-production.up.railway.app) to solve a problem I kept hitting while building AI coding agents: The Knowledge Cutoff.

My agents kept hallucinating APIs for libraries like LangChain or Next.js because their training data was stale. Scraping documentation sites manually for every request was slow and expensive (tokens add up!).

CodeContext API is a semantic search layer over the documentation of 1000+ popular libraries.

Input: {"query": "react hooks"} Output: Clean JSON with the most relevant code snippets and explanations. Latency: Sub-second (optimized for RAG). Why use this?

Save Tokens: Don't dump the whole manual into the context. Fetch only what you need. Accuracy: Give your agent the actual docs from the latest version. Speed: No need to build/maintain your own scrapers. There is a Live Demo on the homepage (no signup required) if you want to test the latency.

I'd love your feedback on the API structure and what other libraries you'd like to see indexed!

0 comments