Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit a6fd8e0

Browse files
authored
reorganize indexer docs (#799)
* reorganize indexer docs * fix links * fix mdx -> tsx
1 parent 5f69515 commit a6fd8e0

35 files changed

+168
-150
lines changed

apps/nextra/pages/en/build/apis/fullnode-rest-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ For more advanced queries, we recommend using the [Indexer GraphQL API](../index
2929

3030
## Understanding rate limits
3131

32-
As with the [Aptos Indexer](../indexer/aptos-hosted.mdx), the Aptos REST API has a rate limit of 5000
32+
As with the [Aptos Indexer](../indexer/indexer-api.mdx), the Aptos REST API has a rate limit of 5000
3333
requests per five minutes by IP address, whether submitting transactions or querying the API on Aptos-provided nodes.
3434
(As a node operator, you may raise those limits on your own node.) Note that this limit can change with or without prior
3535
notice.

apps/nextra/pages/en/build/cli/running-a-local-network.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ To debug this, try the below fixes:
117117
As you can see from the example output in step 4, once the local network is running, you have access to the following services:
118118
119119
- [Node API](../../network/nodes/aptos-api-spec.mdx): This is a REST API that runs directly on the node. It enables core write functionality such as transaction submission and a limited set of read functionality, such as reading account resources or Move module information.
120-
- [Indexer API](../indexer/aptos-hosted.mdx): This is a [GraphQL](https://graphql.org/) API that provides rich read access to indexed blockchain data. If you click on the URL for the Indexer API above, by default [http://127.0.0.1:8090](http://127.0.0.1:8090/), it will open the Hasura Console, a web UI that will help you query the Indexer GraphQL API.
120+
- [Indexer API](../indexer/indexer-api.mdx): This is a [GraphQL](https://graphql.org/) API that provides rich read access to indexed blockchain data. If you click on the URL for the Indexer API above, by default [http://127.0.0.1:8090](http://127.0.0.1:8090/), it will open the Hasura Console, a web UI that will help you query the Indexer GraphQL API.
121121
- [Transaction Stream Service](../indexer/txn-stream.mdx): This is a gRPC stream of transactions used by the Indexer API and SDK. This is only relevant to you if you are developing a [Indexer SDK](../indexer/indexer-sdk.mdx) custom processor.
122122
- [Postgres](https://www.postgresql.org/): This is the database that the Indexer processors write to. The Indexer API reads from this database.
123123
- [Faucet](../apis/faucet-api.mdx): You can use this to fund accounts on your local network.

apps/nextra/pages/en/build/get-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { Cards, Card, GraphQLEditor } from '@components/index';
4040
</Card>
4141
</Cards>
4242

43-
Here's an interactive example of our [Indexer](indexer.mdx) and how you can query for the Current Fungible Asset Balances of an account. More usage examples can be found in [example queries](indexer/fungible-asset-balances.mdx).
43+
Here's an interactive example of our [Indexer](indexer.mdx) and how you can query for the Current Fungible Asset Balances of an account. More usage examples can be found in [example queries](indexer/indexer-api/fungible-asset-balances.mdx).
4444

4545
<GraphQLEditor
4646
query={`query GetFungibleAssetBalances($address: String, $offset: Int) {

apps/nextra/pages/en/build/indexer.mdx

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ import { Tabs, Callout } from 'nextra/components'
77

88
# Indexer
99

10-
<IndexerBetaNotice />
10+
We have several offerings for getting indexed data from the Aptos blockchain.
11+
1. Query the [Indexer API](indexer/indexer-api.mdx) to get basic data about transactions, fungible assets, and tokens
12+
2. Index your custom contract with the [Indexer SDK](indexer/indexer-sdk.mdx)
13+
3. Stream raw transactions from [Transaction Stream Service](indexer/txn-stream.mdx) to your processor or service
14+
15+
## Indexer API
1116

1217
The Aptos Indexer is an API you can use to get:
1318

@@ -42,82 +47,90 @@ The Indexer tracks every transaction that happens on-chain, then exposes that da
4247

4348
## Using the Indexer API
4449

45-
Learn how to use the Indexer API, what each table represents, and how to add custom data to the Indexer.
50+
Learn how to use the Indexer API, what each table represents, and the architecture.
4651

4752
<Cards>
48-
<Card href="indexer/aptos-hosted">
53+
<Card href="indexer/indexer-api">
4954
<Card.Title>Accessing the API</Card.Title>
5055
<Card.Description>Learn how to query the Indexer API.</Card.Description>
5156
</Card>
52-
<Card href="indexer/indexer-reference">
57+
<Card href="indexer/indexer-api/indexer-reference">
5358
<Card.Title>Indexer Table Reference</Card.Title>
5459
<Card.Description>Detailed reference for Indexer tables and their schemas.</Card.Description>
5560
</Card>
56-
<Card href="indexer/architecture">
61+
<Card href="indexer/indexer-api/architecture">
5762
<Card.Title>Architecture</Card.Title>
5863
<Card.Description>Detailed layout of the Indexer's architecture.</Card.Description>
5964
</Card>
65+
<Card href="indexer/indexer-api/self-hosted">
66+
<Card.Title>Self-hosted Indexer API</Card.Title>
67+
<Card.Description>Host your own Indexer API</Card.Description>
68+
</Card>
6069
</Cards>
6170

6271
### Example Queries
6372

6473
To help get you started, here are the most common queries the Indexer is used for.
6574

6675
<Cards>
67-
<Card href="indexer/fungible-asset-balances">
76+
<Card href="indexer/indexer-api/fungible-asset-balances">
6877
<Card.Title>Get Fungible Asset Balances</Card.Title>
6978
<Card.Description>Get all fungible assets an account currently owns.</Card.Description>
7079
</Card>
71-
<Card href="indexer/account-transactions">
80+
<Card href="indexer/indexer-api/account-transactions">
7281
<Card.Title>Get Account Transactions</Card.Title>
7382
<Card.Description>Get all transactions impacting an account.</Card.Description>
7483
</Card>
75-
<Card href="indexer/ans-lookup">
84+
<Card href="indexer/indexer-api/ans-lookup">
7685
<Card.Title>Get Aptos Name</Card.Title>
7786
<Card.Description>Retrieve the Aptos name associated with an account (via the ANS).</Card.Description>
7887
</Card>
79-
<Card href="indexer/fungible-asset-info">
88+
<Card href="indexer/indexer-api/fungible-asset-info">
8089
<Card.Title>Get Fungible Asset Info</Card.Title>
8190
<Card.Description>Get detailed information about a specific fungible asset.</Card.Description>
8291
</Card>
83-
<Card href="indexer/get-nft-collections">
92+
<Card href="indexer/indexer-api/get-nft-collections">
8493
<Card.Title>Get NFT Collections</Card.Title>
8594
<Card.Description>Retrieve NFT collections owned by a specific account.</Card.Description>
8695
</Card>
87-
<Card href="indexer/get-nfts">
96+
<Card href="indexer/indexer-api/get-nfts">
8897
<Card.Title>Get NFTs</Card.Title>
8998
<Card.Description>Retrieve individual NFTs owned by a specific account.</Card.Description>
9099
</Card>
91-
<Card href="indexer/token-metadata">
100+
<Card href="indexer/indexer-api/token-metadata">
92101
<Card.Title>Get Token Metadata</Card.Title>
93102
<Card.Description>Get metadata information for a specific token.</Card.Description>
94103
</Card>
95-
<Card href="indexer/get-delegators">
104+
<Card href="indexer/indexer-api/get-delegators">
96105
<Card.Title>Count Delegators in Staking Pool</Card.Title>
97106
<Card.Description>Retrieve the number of active delegators in a staking pool.</Card.Description>
98107
</Card>
99108
</Cards>
100109

101-
## Customizing the Indexer (Advanced)
110+
## Indexer SDK
102111

103-
If the hosted Indexer API is not enough, you can customize and host your own versions of the Indexer.
112+
If the hosted Indexer API is not enough or if you want to index your custom contract, you can create a processor with the [Indexer SDK](./indexer/indexer-sdk.mdx).
104113

105114
<Cards>
106-
<Card href="indexer/architecture">
107-
<Card.Title>Architecture</Card.Title>
108-
<Card.Description>Detailed layout of the Indexer's architecture.</Card.Description>
109-
</Card>
110-
<Card href="indexer/indexer-sdk">
111-
<Card.Title>Indexer SDK</Card.Title>
112-
<Card.Description>Create a custom processor with the Indexer SDK</Card.Description>
115+
<Card href="indexer/indexer-sdk/quickstart">
116+
<Card.Title>Quickstart Guide</Card.Title>
117+
<Card.Description>Get started with the Indexer SDK</Card.Description>
113118
</Card>
114-
<Card href="indexer/txn-stream">
115-
<Card.Title>Transaction Streaming Service</Card.Title>
116-
<Card.Description>GRPC transaction streaming service, consumed by the Indexer</Card.Description>
119+
<Card href="indexer/indexer-sdk/documentation">
120+
<Card.Title>Documentation</Card.Title>
121+
<Card.Description>Read documentation about the Indexer SDK</Card.Description>
117122
</Card>
118-
<Card href="indexer/self-hosted">
119-
<Card.Title>Self-hosted Indexer API</Card.Title>
120-
<Card.Description>Host your own Indexer API</Card.Description>
123+
</Cards>
124+
125+
## Transaction Stream Service
126+
127+
Transaction Stream Service is a GRPC service that streams raw transactions to your processor or service.
128+
If you're using the Indexer SDK, you'll need an authorization token to connect to Transaction Stream Service.
129+
130+
<Cards>
131+
<Card href="indexer/txn-stream/aptos-hosted-txn-stream">
132+
<Card.Title>Aptos-Hosted Transaction Stream Service</Card.Title>
133+
<Card.Description>Get access to the Aptos-hosted Transaction Stream Service</Card.Description>
121134
</Card>
122135
</Cards>
123136

apps/nextra/pages/en/build/indexer/_meta.tsx

Lines changed: 2 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,13 @@
11
export default {
2-
"---usage---": {
3-
type: "separator",
4-
title: "Usage",
5-
},
6-
"aptos-hosted": {
7-
title: "Indexer API Access",
8-
},
9-
"indexer-reference": {
10-
title: "Indexer API Table Reference",
11-
},
12-
architecture: {
13-
title: "Architecture",
14-
},
15-
"---indexer-customizations---": {
16-
type: "separator",
17-
title: "Indexer Customizations (Advanced)",
2+
"indexer-api": {
3+
title: "Indexer API",
184
},
195
"indexer-sdk": {
206
title: "Indexer SDK",
217
},
228
"txn-stream": {
239
title: "Transaction Stream Service",
2410
},
25-
"self-hosted": {
26-
title: "Self-Hosted Indexer API",
27-
},
28-
"---example-queries---": {
29-
type: "separator",
30-
title: "Example Queries",
31-
},
32-
"fungible-asset-balances": {
33-
title: "Get Fungible Asset Balances",
34-
theme: {
35-
toc: false,
36-
layout: "full",
37-
},
38-
},
39-
"account-transactions": {
40-
title: "Get Transactions Impacting an Account",
41-
theme: {
42-
toc: false,
43-
layout: "full",
44-
},
45-
},
46-
"ans-lookup": {
47-
title: "Get Aptos Name",
48-
theme: {
49-
toc: false,
50-
layout: "full",
51-
},
52-
},
53-
"fungible-asset-info": {
54-
title: "Get Fungible Asset Info",
55-
theme: {
56-
toc: false,
57-
layout: "full",
58-
},
59-
},
60-
"get-nft-collections": {
61-
title: "Get NFT Collections By Account",
62-
theme: {
63-
toc: false,
64-
layout: "full",
65-
},
66-
},
67-
"get-nfts": {
68-
title: "Get NFTs By Account",
69-
theme: {
70-
toc: false,
71-
layout: "full",
72-
},
73-
},
74-
"token-metadata": {
75-
title: "Get Token Metadata",
76-
theme: {
77-
toc: false,
78-
layout: "full",
79-
},
80-
},
81-
"get-delegators": {
82-
title: "Count Delegators in Staking Pool",
83-
theme: {
84-
toc: false,
85-
layout: "full",
86-
},
87-
},
88-
"---legacy---": {
89-
type: "separator",
90-
title: "Legacy",
91-
},
9211
legacy: {
9312
title: "Legacy Indexer",
9413
},

apps/nextra/pages/en/build/indexer/aptos-hosted.mdx renamed to apps/nextra/pages/en/build/indexer/indexer-api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Aptos Labs hosts a public version of the Indexer GraphQL API that anyone can use
1313

1414
You can explore it by hand by viewing the Hasura Explorer below for the network you are interested in.
1515

16-
You can also access the API via the GraphQL endpoints below. For more information on the format of data in each field / table, please see the [table reference page](indexer-reference.mdx).
16+
You can also access the API via the GraphQL endpoints below. For more information on the format of data in each field / table, please see the [table reference page](./indexer-api/indexer-reference.mdx).
1717

1818
## SDK Access (Primary Method)
1919

@@ -61,5 +61,5 @@ The following rate limit applies for the Aptos Labs hosted indexer API:
6161
If you need a higher rate limit, consider the following solutions:
6262

6363
1. Get an API Key from [API Gateway](https://developers.aptoslabs.com/).
64-
2. Run the Aptos Indexer API yourself. See the guide to self-hosting [here](self-hosted.mdx).
64+
2. Run the Aptos Indexer API yourself. See the guide to self-hosting [here](./txn-stream/self-hosted.mdx).
6565

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
export default {
2+
"indexer-reference": {
3+
title: "Indexer API Table Reference",
4+
},
5+
architecture: {
6+
title: "Architecture",
7+
},
8+
"self-hosted": {
9+
title: "Self-Hosted Indexer API",
10+
},
11+
"---example-queries---": {
12+
type: "separator",
13+
title: "Example Queries",
14+
},
15+
"fungible-asset-balances": {
16+
title: "Get Fungible Asset Balances",
17+
theme: {
18+
toc: false,
19+
layout: "full",
20+
},
21+
},
22+
"account-transactions": {
23+
title: "Get Transactions Impacting an Account",
24+
theme: {
25+
toc: false,
26+
layout: "full",
27+
},
28+
},
29+
"ans-lookup": {
30+
title: "Get Aptos Name",
31+
theme: {
32+
toc: false,
33+
layout: "full",
34+
},
35+
},
36+
"fungible-asset-info": {
37+
title: "Get Fungible Asset Info",
38+
theme: {
39+
toc: false,
40+
layout: "full",
41+
},
42+
},
43+
"get-nft-collections": {
44+
title: "Get NFT Collections By Account",
45+
theme: {
46+
toc: false,
47+
layout: "full",
48+
},
49+
},
50+
"get-nfts": {
51+
title: "Get NFTs By Account",
52+
theme: {
53+
toc: false,
54+
layout: "full",
55+
},
56+
},
57+
"token-metadata": {
58+
title: "Get Token Metadata",
59+
theme: {
60+
toc: false,
61+
layout: "full",
62+
},
63+
},
64+
"get-delegators": {
65+
title: "Count Delegators in Staking Pool",
66+
theme: {
67+
toc: false,
68+
layout: "full",
69+
},
70+
},
71+
};

apps/nextra/pages/en/build/indexer/account-transactions.mdx renamed to apps/nextra/pages/en/build/indexer/indexer-api/account-transactions.mdx

File renamed without changes.

apps/nextra/pages/en/build/indexer/ans-lookup.mdx renamed to apps/nextra/pages/en/build/indexer/indexer-api/ans-lookup.mdx

File renamed without changes.

apps/nextra/pages/en/build/indexer/architecture.mdx renamed to apps/nextra/pages/en/build/indexer/indexer-api/architecture.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Here is how the Indexer creates that API at a high-level:
2929
/>
3030
</center>
3131

32-
The Indexer uses the [Transaction Stream Service](./txn-stream.mdx) and custom processors written with the [Indexer SDK](./indexer-sdk.mdx) to update a database with rich tables. Then it exposes an API for Aptos apps to access the consolidated data.
32+
The Indexer uses the [Transaction Stream Service](../txn-stream.mdx) and custom processors written with the [Indexer SDK](../indexer-sdk.mdx) to update a database with rich tables. Then it exposes an API for Aptos apps to access the consolidated data.
3333

34-
For situations where you need to go beyond the Aptos hosted Indexer API data, you will want to create a custom processor with the Indexer SDK (./indexer-sdk.mdx).
34+
For situations where you need to go beyond the Aptos hosted Indexer API data, you will want to create a custom processor with the [Indexer SDK](../indexer-sdk.mdx).
3535

3636
Writing a custom processor can help you:
3737
1. Get access to different types of data.

0 commit comments

Comments
 (0)