Overview
Aptos Indexer API
The Aptos Indexer API is a tool that enables efficient querying of data on the Aptos network. It indexes all data on the Aptos network in a structured format for fast retrieval, and provides a variety of query options so users can accurately and quickly fetch the data they need.
Users can selectively request only the data they need and retrieve nested data in a single request, making data usage economical. In addition, the Aptos Indexer API improves API readability and reduces errors through clear schema definitions. Both the Aptos Node API and the Aptos Indexer API are used to access and query data on the Aptos blockchain, but there are important differences in purpose and functionality.
Aptos Node API
The Aptos Node API is an interface that communicates directly with blockchain nodes to retrieve data. It provides APIs for basic blockchain data such as blocks, transactions, and account states, allowing you to fetch real-time data from the blockchain network.
Aptos Indexer API
The Aptos Indexer API is designed to index and search blockchain data, and excels at quickly extracting specific data that users want. Here is a brief comparison of the differences between the Aptos Node API and the Aptos Indexer API.
Data Access Approach:
- Node API: Communicates directly with nodes to retrieve real-time data. Primarily used for querying current state or the latest information.
- Indexer API: Uses indexed data to search quickly and efficiently. Well-suited for finding data that matches specific conditions.
Usage Method:
- Node API: Uses a RESTful API to query data through predefined endpoints.
- Indexer API: Allows selective retrieval of needed data through user-defined queries.
Response Speed and Efficiency:
- Node API: Provides real-time data, but may be slow for large volumes of data or complex queries.
- Indexer API: Uses indexed data, enabling fast searches even with large volumes of data.
Data Use Cases:
- Node API: Suitable for applications that require real-time data queries and the latest state information.
- Indexer API: Suitable for applications that require complex data searches and analysis, or tracking specific events.
In conclusion, the Aptos Node API is well-suited for directly querying real-time data, while the Aptos Indexer API is well-suited for efficiently searching indexed data and performing complex queries. The two tools can be used in a complementary manner, and can be chosen appropriately depending on the requirements of the application.
Aptos Indexer API Type
The Aptos Indexer API generally provides two types. The Labs-Hosted type provided by the Aptos Foundation, and the Self-Hosted type that builds an Aptos Indexer using your own Aptos Node. Both types can use the Aptos Indexer API, but with the following differences.
- 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
- You must host the Indexer API yourself, which involves the overhead of setup and management, but after setup you can use it without a Rate Limit.\
- You must host the Indexer API yourself, which involves the overhead of setup and management, but after setup you can use it without a Rate Limit.\
The Nodit service hosts the Indexer API on its own, providing an environment where you can use it without restrictions. We encourage you to try using Nodit conveniently for everything from setting up the node environment to utilizing the Indexer API.\
If a problem occurs according to the Aptos Foundation's operational policies, they recommend creating an issue in the aptos-indexer-processors repository to report it. Please keep this in mind when using the service.