Overview
Aptos Indexer API
The Aptos Indexer API is a tool for efficiently querying data on the Aptos network. It indexes all on-chain data in a structured format, enabling fast search and retrieval, and offers a variety of query options so you can fetch exactly the data you need with precision and speed.
You can selectively request only the data you need, and retrieve nested data in a single request — making data access highly efficient. The Aptos Indexer API also improves readability and reduces errors through clear schema definitions. While both the Aptos Node API and the Aptos Indexer API are used to access and query data on the Aptos blockchain, they differ significantly in purpose and functionality.
Aptos Node API
The Aptos Node API is an interface that communicates directly with blockchain nodes to fetch data. It provides basic blockchain data such as blocks, transactions, and account state, enabling real-time access to network data.
Aptos Indexer API
The Aptos Indexer API is designed to index and search blockchain data, making it well-suited for quickly extracting specific data. Here is a brief comparison between the Aptos Node API and the Aptos Indexer API.
Data Access Approach:
- Node API: Communicates directly with nodes to fetch real-time data. Primarily used for querying current state or the latest information.
- Indexer API: Leverages indexed data for fast and efficient search. Well-suited for finding data that matches specific conditions.
Usage:
- Node API: Queries data via fixed endpoints using a RESTful API.
- Indexer API: Allows selective querying of required data through custom queries.
Response Speed and Efficiency:
- Node API: Provides real-time data, but may be slower for large datasets or complex queries.
- Indexer API: Uses indexed data, enabling fast search even across large datasets.
Use Cases:
- Node API: Suitable for applications that require real-time data access and up-to-date state information.
- Indexer API: Suitable for applications that require complex data search and analysis, or tracking specific events.
In summary, the Aptos Node API is suited for directly querying real-time data, while the Aptos Indexer API is suited for efficiently searching indexed data and performing complex queries. The two tools are complementary and can be selected based on the requirements of your application.
Aptos Indexer API Type
The Aptos Indexer API is generally available in two types: the Labs-Hosted type provided by the Aptos Foundation, and the Self-Hosted type where you run your own Aptos Indexer using a self-managed Aptos Node. Both types support the Aptos Indexer API, but differ as follows.
- Labs-Hosted Indexer API
- The Aptos Indexer API provided by the Aptos Foundation, with a rate limit of 5,000 requests per 5 minutes.
- Self-Hosted Indexer API
- Requires you to host your own Indexer API, which involves setup and maintenance overhead, but allows unlimited usage after deployment.
- Requires you to host your own Indexer API, which involves setup and maintenance overhead, but allows unlimited usage after deployment.
Nodit hosts its own Indexer API, providing an environment where you can use it without restrictions. Get started with Nodit today — from setting up a Node environment to leveraging the Indexer API.\
:::warning Aptos Indexer API is a service provided directly by the Aptos Foundation and is currently operating in Beta.
The Aptos Foundation recommends that if issues arise during operation, you report them by creating an issue in the aptos-indexer-processors repository. Please keep this in mind when using the service. :::