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

# Rate Limiting

Sourcebot limits how many API requests each user can make per day. By default, each user can make up to **10,000 requests per day**. This is well above what individual use needs, including AI agents and MCP clients. If you need a higher limit, [contact us](mailto:support@sourcebot.dev).

## What counts toward the limit

Only **programmatic requests** count. A request is programmatic when it's authenticated with one of the following:

* An [API key](/docs/api-reference/authentication#using-an-api-key)
* An OAuth token, such as the one an [MCP client](/docs/features/mcp-server) uses
* A [scoped access token](/docs/api-reference/authentication#using-a-scoped-access-token)

Using Sourcebot in your browser **never counts** toward the limit. This includes searching, browsing code, and chatting with Ask Sourcebot.

Each request to a rate-limited endpoint counts as **one request**, including requests that fail. All of a user's API keys and tokens share the same limit.

### Rate-limited endpoints

| Endpoint | Description |
| - | - |
| `POST /api/search` | Search code across repositories. |
| `POST /api/stream_search` | Search code, streaming results as they're found. |
| `POST /api/find_definitions` | Find where a symbol is defined. |
| `POST /api/find_references` | Find references to a symbol. |
| `GET /api/source` | Read a file's contents. |
| `POST /api/files` | List all files in a repository at a given revision. |
| `POST /api/tree` | List files and directories in a repository. |
| `GET /api/folder_contents` | List the contents of a directory. |
| `GET /api/blame` | Get blame information for a file. |
| `GET /api/diff` | Get the diff between two refs. |
| `GET /api/commit` | Get details for a single commit. |
| `GET /api/commits` | List commits in a repository. |
| `GET /api/commits/authors` | List commit authors in a repository. |
| `GET /api/repos` | List repositories. |
| `GET /api/connections` | List connections. |

### MCP server

Each tool call to the [MCP server](/docs/features/mcp-server) counts as one request. Other MCP messages don't count, such as connecting or listing the available tools.

## Daily reset

The limit resets every day at **00:00 UTC**. Unused requests don't roll over to the next day.

## Rate limit headers

When a limit applies, responses from rate-limited endpoints include these headers:

| Header | Description |
| - | - |
| `X-RateLimit-Limit` | The number of requests allowed per day. |
| `X-RateLimit-Remaining` | The number of requests left today. |
| `X-RateLimit-Reset` | When the limit resets, as a Unix timestamp in seconds. |

## Exceeding the limit

Once a user reaches the limit, further requests to rate-limited endpoints return a `429 Too Many Requests` response until the limit resets. The `Retry-After` header gives the number of seconds until then.

```json theme={null}
{
  "statusCode": 429,
  "errorCode": "API_RATE_LIMIT_EXCEEDED",
  "message": "API rate limit of 10000 requests per day exceeded. The limit resets at 00:00 UTC. To request a higher limit, contact support@sourcebot.dev."
}
```


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