> For the complete documentation index, see [llms.txt](https://docs.mercurydata.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mercurydata.app/mercury-classic/queries.md).

# Queries

{% hint style="info" %}
New queries can be added on request. If you cannot find the appropriate query for what you need, ask on our [Discord server](https://discord.gg/FK28WWHKyb).
{% endhint %}

### Authentication

All queries require an authentication header. You’ll need to provide a JWT token, which will be given to users that have access to Mercury ([get access](https://t.me/federicodeponti)).&#x20;

**Example Authentication Header**

Include the JWT in the request header as follows:

```bash
Authorization: Bearer YOUR_JWT_TOKEN
```

### Pagination & Limits

Paginated endpoints accept the following pagination params:

* `limit`  (default: 100, max: 1000) – requests exceeding the max are clamped to 1000 &#x20;
* `offset` (default: 0)&#x20;
* `cursor` – the id (events) or tx hex (txs) of the last row from the previous page; when set, offset is ignored                                                                                          &#x20;

### Example Variables for Docs

Will be used in the docs for the upcoming examples

```bash
# common vars
BASE="https://mainnet.mercurydata.app/rest"
AUTH="Bearer <your-jwt-here>"
```


---

# 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.mercurydata.app/mercury-classic/queries.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.
