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.Documentation Index
Fetch the complete documentation index at: https://docs.topk.io/llms.txt
Use this file to discover all available pages before exploring further.
Get Started
Prerequisites
- TopK account (Sign up here)
- TopK API key (Get an API key here)
Hybrid Search
Simple example to get you started with TopK. Check out our guides for more complex examples.Python SDK
JavaScript SDK
Initialize the client
Setup the TopK client with your API key and region.
See available regions for a full list of supported regions.
Query indexed data
To learn more about how to use the Python SDK, see the Python SDK documentation.
Document Search
- CLI
Python SDK
JavaScript SDK
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: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.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
- 1 Condensed Statement of Cash Flows showing net income of $27,132m (2024) vs $26,515m (2023)
bank_of_america_2024.pdf p. 170 - 2 Consolidated Statement of Comprehensive Income: net income line item for 2024–2022
bank_of_america_2024.pdf p. 92 - 3 Supporting figure from the filing (tabular financial excerpt)
boa-ask-ref-3-figure.jpg - 4 Key performance indicators—selected annual financial data (including net income)
bank_of_america_2024.pdf pp. 33–36 - 5 Segment results tying to total-corporation net income
bank_of_america_2024.pdf pp. 166–168 - 6 Executive summary—summary income statement and balance sheet excerpts
bank_of_america_2024.pdf pp. 29–30
Full JSON output
Full JSON output
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.