# About our Query API

## Overview

Carpool's API layer was designed as an intent-based API, and as such, should feel natural and easy to work with. Users can perform complex queries without needing to understand the intricacies of the Elasticsearch DSL.

## Endpoint

Instead of separating API logic across multiple endpoints, all queries live under **one POST** endpoint and are differentiated by the body params. At the top level, the **"type"** field will dictate the overall type of query you'd like to make. The **"query"** object holds the majority of relevant fields for the query type you are invoking.

Carpool indexes programs on both Devnet and Mainnet:

* Devnet - `https://devnet.carpool.dev/query/solana`
* Mainnet - `https://mainnet.carpool.dev/query/solana`

## API Reference

Feel free to dive into any of Carpool's potential queries. They are divided into 3 major categories:

{% content-ref url="instructions" %}
[instructions](https://carpool.gitbook.io/carpool/api-reference/instructions)
{% endcontent-ref %}

{% content-ref url="accounts" %}
[accounts](https://carpool.gitbook.io/carpool/api-reference/accounts)
{% endcontent-ref %}

{% content-ref url="account-archive" %}
[account-archive](https://carpool.gitbook.io/carpool/api-reference/account-archive)
{% endcontent-ref %}

## Filters

You'll notice that many of Carpool's query types contain a "filter" field in the POST body. All queries that accept a filter object can make use of **any** of the potential filters. We've detailed these out for you in the [Filters](#filters) section of our docs:

{% content-ref url="filters" %}
[filters](https://carpool.gitbook.io/carpool/api-reference/filters)
{% endcontent-ref %}
