Skip to main content
TopK is a hybrid retrieval engine built on object storage for 10x lower cost and massive scale. It supports dense/sparse vector search, multi-vector retrieval, powerful filtering, custom ranking, and managed inference in one API. For unstructured document search use cases, we provide a datasets abstraction that allows you to ingest files, search, and get answers from your private documents. Connect your data to agents using our CLI or MCP server.

Get Started

Prerequisites
Simple example to get you started with TopK. Check out our guides for more complex examples.
1

Install Python SDK

2

Initialize the client

Setup the TopK client with your API key and region.
See available regions for a full list of supported regions.
3

Create a collection

4

Upsert documents

5

Query indexed data

To learn more about how to use the Python SDK, see the Python SDK documentation.
1

Install CLI

If you don’t have Homebrew installed, you can install it here.
2

Authenticate

This command prompts you to either create a new API key or set an existing one.You can also skip the topk login command and authenticate by providing your API key via the TOPK_API_KEY environment variable:
3

Create a dataset

A dataset is a named container for your documents. To create a dataset, run the following command:
The --region flag determines where your data is stored. See available regions.
4

Upload a file

Upload a file to your dataset:
Download a sample PDF financial report:
5

Ask a question

Answer:
  • Bank of America’s total net income for 2024 was $27,132 million (approximately $27.1 billion). 1 2 3 4 5 6
  • The 2024 net income represented an increase from the $26.5 billion reported in 2023. 3 4 6
  • The increase was driven by higher noninterest income, partially offset by a higher provision for credit losses and lower net interest income. 3 6
Citations:
To learn more about how to use TopK CLI, see the CLI documentation.

Integrations

Python SDK

Full Python SDK reference.

JavaScript SDK

Full TypeScript/JavaScript SDK reference.

CLI

Upload files, search, and ask questions directly from the terminal.

MCP Server

Connect TopK to any MCP-compatible AI agent via the Model Context Protocol.

Security & Compliance

TopK is SOC 2 Type I certified. Visit the trust center for full details.

Data encryption

All data is encrypted in transit and at rest.

Access control

Role-based access control with full auditability.

Private Deployment

Deploy inside your own VPC for complete isolation and data residency. Contact us for more details.

Learn More

Architecture

Learn about TopK’s architecture and how it works.

Concepts

Discover core concepts and how they work together.