> For the complete documentation index, see [llms.txt](https://docs.kyberswap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kyberswap.com/developer-guide/aggregator-api.md).

# Aggregator API

The guides in the following section are targeted at application developers as well as smart contract integrators that are interested in building on top of the KyberSwap Aggregator ecosystem.

## Overview

To cater for varying integration complexities, KyberSwap Aggregator offers developers 2 options for integration:

* [**KyberSwap Widget**](/developer-guide/aggregator-api/how-to-guides/kyberswap-widget.md): An endlessly customizable widget that can be seamlessly integrated with a few lines of code. Refer to [Integrating The KyberSwap Widget](/developer-guide/aggregator-api/how-to-guides/kyberswap-widget/integrating-the-kyberswap-widget.md) for instructions on how to install and add the widget to your frontend.
* [**Aggregator API**](/developer-guide/aggregator-api/aggregator-api-specification.md): For developers that require more fine-tuned control when integrating swap functionality within their app. If you're just getting started with the KyberSwap Aggregator, you can refer to our [Execute A Swap With The Aggregator API](/developer-guide/aggregator-api/how-to-guides/execute-a-swap-with-the-aggregator-api.md) dev guide for information and code samples on how to query and execute swaps at the favourable rates.

{% hint style="info" %}
**KyberSwap Aggregator APIv1 Upgrades**

The [EVM swap](/developer-guide/aggregator-api/aggregator-api-specification/evm-swaps.md) API has been upgraded for more performant queries and the details behind the enhancement as well as the updated swap flows can be viewed on [Upgrading To APIv1](/developer-guide/aggregator-api/how-to-guides/execute-a-swap-with-the-aggregator-api/upgrading-to-apiv1.md).
{% endhint %}

KyberSwap Aggregator implements a router contract which handles the complexity of routing and executing swaps atomically. Please refer to [Aggregator Contract Addresses](broken://pages/jGSQwkNNFqLTnHbPExjE) for the full list of contracts which have been deployed across the supported chains.

## Next steps

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-hidden></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/developer-guide/aggregator-api/how-to-guides/execute-a-swap-with-the-aggregator-api.md"><strong>Execute A Swap With The Aggregator API</strong></a></td><td></td><td></td><td><a href="/developer-guide/aggregator-api/how-to-guides/execute-a-swap-with-the-aggregator-api.md">Execute A Swap With The Aggregator API</a></td></tr><tr><td><a href="https://github.com/KyberNetwork/kyberswap-documentation/blob/main/kyberswap-solutions/kyberswap-aggregator/developer-guides/broken-reference/README.md"><strong>Plug And Play The KyberSwap Widget</strong></a></td><td></td><td></td><td><a href="https://github.com/KyberNetwork/kyberswap-documentation/blob/main/kyberswap-solutions/kyberswap-aggregator/developer-guides/broken-reference/README.md">https://github.com/KyberNetwork/kyberswap-documentation/blob/main/kyberswap-solutions/kyberswap-aggregator/developer-guides/broken-reference/README.md</a></td></tr><tr><td><a href="/developer-guide/aggregator-api/how-to-guides/kyberswap-widget/customizing-the-kyberswap-widget.md"><strong>Customize The KyberSwap Widget</strong></a></td><td></td><td></td><td><a href="/developer-guide/aggregator-api/how-to-guides/kyberswap-widget/customizing-the-kyberswap-widget.md">Customizing The KyberSwap Widget</a></td></tr><tr><td><a href="https://github.com/KyberNetwork/kyberswap-documentation/blob/main/kyberswap-solutions/kyberswap-aggregator/developer-guides/broken-reference/README.md"><strong>More Performant Queries With APIv2</strong></a></td><td></td><td></td><td><a href="https://github.com/KyberNetwork/kyberswap-documentation/blob/main/kyberswap-solutions/kyberswap-aggregator/developer-guides/broken-reference/README.md">https://github.com/KyberNetwork/kyberswap-documentation/blob/main/kyberswap-solutions/kyberswap-aggregator/developer-guides/broken-reference/README.md</a></td></tr></tbody></table>

{% hint style="warning" %}
For integrators who have previously integrated with our `Legacy` API, we highly encourage migrating to the `Latest` APIs to ensure access to the latest features as well as improve service quality and efficiency.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kyberswap.com/developer-guide/aggregator-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
