> For the complete documentation index, see [llms.txt](https://docs.ekubo.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ekubo.org/integration-guides/reference/ekubo-api.md).

# Ekubo API

{% hint style="warning" %}
Our API is available to support our website and may undergo breaking changes without notice. [Join the Discord](https://discord.ekubo.org) to ask questions or get support.
{% endhint %}

The API URL is hosted at the following URL:

`https://prod-api.ekubo.org`

It contains data for all the chains that we are deployed to and index. It also hosts an [OpenAPI 3.1 document](https://prod-api.ekubo.org/openapi.json) that self-describes all the endpoints.

### API Architecture

Our API functionality is based entirely on querying the Postgres schema kept up-to-date by the open source indexer repository ([GitHub](https://github.com/EkuboProtocol/indexer)). You can replicate all of the API functionality by simply running your own instance of the Indexer and querying the your own Postgres database. Much of the API functionality is conveniently contained in views and scheduled jobs allowing you to easily replicate all the functionalities of our API.

#### Caching

There are multiple layers of caching with varying TTL between the database and the client. If you have specific latency requirements or need to make a large number of requests per second, it's best to run your own indexer.

#### Rate limiting

We have a rate limiting web application firewall (WAF) in front of the API. If you would like to make calls in excess of the limit, please reach out on [Discord](https://discord.ekubo.org/) to find a solution. The rate limit is not fixed and we can change it as necessary to control costs or ensure fair access to all users. Generally we will not create exceptions for you to exceed our public API rate limits.

### Endpoints

Our endpoints are documented via OpenAPI 3.1 at the `/openapi.json` endpoint. The URL is <https://prod-api.ekubo.org/openapi.json>

This means you can use it with any REST API explorer, e.g. the [example swagger explorer](https://petstore3.swagger.io/?url=https://prod-api.ekubo.org/openapi.json) or postman.


---

# 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 dynamically by asking a question.

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

```
GET https://docs.ekubo.org/integration-guides/reference/ekubo-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
