How to add document search to my app without building a pipeline
Use Ragex to add document search to any app in under 5 minutes — upload files, call a search endpoint, and get ranked results without building parsing, chunking, or embedding infrastructure.
TL;DR: Use Ragex instead of building your own pipeline. You create a knowledge base, upload documents, and call a search endpoint. The API handles parsing, chunking, embedding, and reranking automatically. You can go from zero to working document search in under 5 minutes with five API calls.
Why is building a document search pipeline so painful?
Adding document search to an app from scratch means stitching together a document parser, a chunking strategy, an embedding model, a vector database, and a reranker. Each component is a separate vendor with its own SDK, config, and failure modes. You spend weeks on infrastructure before writing a single line of product code.
The typical DIY stack looks like this: parse PDFs with one library, split text into chunks with another, generate embeddings with a third, store them in a vector database, and then bolt on a reranker to improve result quality. When any piece breaks or a better model ships, you rebuild. For most teams, the pipeline itself becomes the product — and the actual feature you wanted to build sits in the backlog.
What does Ragex approach look like?
Ragex collapses the entire retrieval pipeline into three endpoints. You create a knowledge base, upload documents, and search. The API handles parsing (16 file types including PDFs, DOCX, scanned images), chunking, embedding, indexing, and reranking — all behind a single API key.
Here is the full happy path in Python:
from ragex import RagexClient
import time
client = RagexClient(api_key="YOUR_API_KEY")
# Step 1: Create a knowledge base
kb = client.create_knowledge_base(name="Support Docs")
# Step 2: Upload a document
doc = client.upload_document(kb["id"], "product-guide.pdf")
# Step 3: Wait for processing (pending → parsing → chunking → embedding → ready)
while doc["status"] not in ("ready", "failed"):
time.sleep(2)
doc = client.get_document(kb["id"], doc["id"])
# Step 4: Search
results = client.search(
kb["id"],
query="How do I reset my password?",
top_k=5,
)
# Step 5: Use the results
for result in results["results"]:
print(result["score"], result["text"])
That is five API calls from zero to ranked search results. No vector database to provision, no embedding model to choose, no chunking parameters to tune.
How does document processing work behind the scenes?
Documents are processed asynchronously after upload. The status moves through pending, parsing, chunking, embedding, and finally ready. You can poll the document status or set up a webhook to get notified when processing completes.
The API supports 16 file types out of the box. Nine types (PDF, DOCX, PPTX, XLSX, PNG, JPG, WEBP, TIFF, and CSV) get advanced parsing that handles tables, images, and complex layouts. Seven additional types (TXT, MD, HTML, TSV, JSON, and more) are ingested directly as text. You do not need separate parsers for different formats.
Can I filter search results by metadata?
Yes. You can attach metadata to any document at upload time and filter on it at query time. This is useful when your knowledge base contains documents from multiple departments, versions, or categories and you want to scope searches to a subset.
# Upload with metadata
doc = client.upload_document(
kb["id"],
"engineering-handbook.pdf",
metadata={"department": "engineering", "version": 3},
)
# Search with a metadata filter
results = client.search(
kb["id"],
query="deployment checklist",
top_k=5,
filter={"department": {"$eq": "engineering"}},
)
Reranking is enabled by default, so results are sorted by relevance — not just vector similarity. You do not need to configure or manage the reranking step.
What does this cost compared to building it myself?
The managed API starts at $29/mo on the Starter plan, with Pro at $79/mo and Scale at $199/mo. Compare that to the cost of running your own pipeline: a vector database ($70-200/mo), embedding API calls ($50-150/mo depending on volume), a document parsing service ($30-100/mo), plus the engineering time to integrate and maintain all of it.
The real cost of DIY is not the infrastructure bills — it is the engineering weeks spent building, debugging, and upgrading the pipeline instead of shipping product features.
FAQ
How long does it take to get search working?
Under 5 minutes from signup to first search result. You create an account, get an API key, create a knowledge base, upload a document, and call the search endpoint. Document processing takes seconds for small files and a few minutes for large PDFs. The API is designed so you can have a working prototype in a single coding session.
What file types can I upload?
The API supports 16 file types. Nine types get advanced parsing: PDF, DOCX, PPTX, XLSX, PNG, JPG, WEBP, TIFF, and CSV. Seven types are ingested as direct text: TXT, MD, HTML, TSV, JSON, and others. You can also send raw text directly via the API if your content is not in a file.
Do I need to choose an embedding model or vector database?
No. Ragex handles embedding, indexing, and reranking automatically. You do not select models, configure vector dimensions, or manage database infrastructure. When better models become available, the service upgrades them and your search quality improves without any code changes on your side.
Can I use this with my existing LLM integration?
Yes. The search endpoint returns ranked text chunks with relevance scores. You pass those chunks as context to whatever LLM you are already using — OpenAI, Anthropic, a local model, or any other provider. The API handles retrieval; you handle generation.
Is there a TypeScript SDK?
Yes. Install ragex via npm and use the same workflow. Create a client with import { RagexClient } from 'ragex', then call createKnowledgeBase, uploadDocument, and search. The TypeScript SDK mirrors the Python SDK in structure and method names.
Last updated: 2026-02-26