# API Reference

## API Reference

**Base URL:** `https://zap-api.kyberswap.com/{chain}`

All requests must include the `X-Client-ID` header. Without a whitelisted ID, the default rate limit is **10 requests per 10 seconds**. Contact <bd@kyber.network> to request a higher quota.

### Endpoints

| Method | Path                          | Description                                                     |
| ------ | ----------------------------- | --------------------------------------------------------------- |
| `GET`  | `/api/v1/in/route`            | Get the best Zap-In route for a given input and target position |
| `POST` | `/api/v1/in/route/build`      | Build on-chain calldata for a confirmed Zap-In route            |
| `GET`  | `/api/v1/migrate/route`       | Get the best Zap-Migrate route between two pools                |
| `POST` | `/api/v1/migrate/route/build` | Build on-chain calldata for a confirmed Zap-Migrate route       |
| `GET`  | `/api/v1/out/route`           | Get the best Zap-Out route for exiting a position               |
| `POST` | `/api/v1/out/route/build`     | Build on-chain calldata for a confirmed Zap-Out route           |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kyberswap.com/developer-guide/zap-as-a-service-zaas-api/api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
