Skip to content
🎉 Welcome to the new Aptos Docs! Click here to submit feedback!
Build
Architecture

Indexer Architecture

The Aptos Indexer stores data from on-chain (via the Transaction Stream Service). It indexes basic data about transactions, fungible assets, tokens, collections, accounts, ANS (Aptos Name Service) names, and more. Apps can query that data via the Indexer API.

Aptos Labs hosts a free version of the Indexer API to help the community get access to data such as:

  1. Historical data - Ex. What transactions have impacted this account?
  2. Aggregate data - Ex. How many delegators are in this staking pool?
  3. Specific info best searched via query - Ex. What NFTs does an account own?

High Level Breakdown

Here is how the Indexer creates that API at a high-level:

Signed Transaction Flow

The Indexer uses the Transaction Stream Service and Custom Processors to update a database with rich tables. Then it exposes an API for Aptos apps to access the consolidated data.

For situations where you need to go beyond the Aptos hosted Indexer API data, you will want to create a custom processor.

Writing a custom processor can help you:

  1. Get access to different types of data.
  2. Store additional information beyond what the Aptos Labs hosted Indexer API is saving.
  3. Change how transactions are processed.

If you would like to operate your own Indexer API as a service, see how to host your own Indexer.

Detailed Overview

You can use the below diagram for a much more in-depth diagram explaining how the Indexer code actually works behind the scenes.