> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchlake.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Introduction

> Learn how to integrate with the Fetchlake API

## Overview

The Fetchlake API allows you to query knowledge bases programmatically. All interactions happen through REST endpoints using JSON payloads.

**Base URL:**

```
https://api.fetchlake.com
```

## How API Exchange Works

Fetchlake acts as a secure intermediary between you and knowledge base publishers:

1. You purchase access to a knowledge base through the marketplace
2. Fetchlake issues you a **scoped API key** for that specific knowledge base
3. You use the key to query the knowledge base via the Fetchlake API
4. Fetchlake routes your query to the publisher's infrastructure and returns the response

> [!NOTE]
>
> **Key principle:** Buyers never receive supplier infrastructure keys. All keys are Fetchlake-issued, scoped, and revocable.

## Available Endpoints

| Endpoint | Method | Description |
| - | - | - |
| `/kb/{kb_id}/query` | POST | Query a knowledge base |
| `/api/marketplace/knowledge-bases` | GET | List available knowledge bases |

## Quick Example

```bash theme={null}
curl -X POST https://api.fetchlake.com/kb/{kb_id}/query \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "What are the key curriculum standards for grade 5 math?"}'
```

## Next Steps

> [card] [Authentication](https://docs.fetchlake.com/api-reference/authentication.md)
>
> Learn how to authenticate your requests

> [card] [Query Endpoint](https://docs.fetchlake.com/api-reference/endpoints/query.md)
>
> Make your first query


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.