This API ships with every fullnode. It is a simple, low-latency, low-level way to read state, submit transactions, and simulate transactions on Aptos. For NFTs, objects, historical activity, and aggregated tables, use the [Indexer GraphQL API](/build/indexer) instead.

Base URL (Aptos Labs): `https://api.{network}.aptoslabs.com/v1` — for example `https://api.mainnet.aptoslabs.com/v1`. `fullnode.{network}.aptoslabs.com` is an alias of the same service.

## Spec and explorers

[](#spec-and-explorers)

The Node API is OpenAPI 3.0 (`Aptos Node API` 1.2.0). This site publishes the spec and a generated reference; each network also hosts a live Swagger UI.

[REST API reference](/rest-api) Browsable docs generated from aptos-spec.json

[OpenAPI spec (JSON)](/aptos-spec.json) Machine-readable Aptos Node API specification

[Mainnet explorer](https://api.mainnet.aptoslabs.com/v1/spec#/) Live Swagger UI for Mainnet

[Testnet explorer](https://api.testnet.aptoslabs.com/v1/spec#/) Live Swagger UI for Testnet

[Devnet explorer](https://api.devnet.aptoslabs.com/v1/spec#/) Live Swagger UI for Devnet

The spec YAML on a node is `GET /v1/spec.yaml`. Health is `GET /v1/-/healthy`. Ledger info (chain ID, version, epoch, role) is `GET /v1`. Node identity is `GET /v1/info`.

```
curl "https://api.mainnet.aptoslabs.com/v1"
```

## Authentication and rate limits

[](#authentication-and-rate-limits)

Anonymous access is limited per IP. Attach a [Geomi](https://geomi.dev/) API key for higher limits:

```
curl "https://api.mainnet.aptoslabs.com/v1/accounts/0x1" \  -H "Authorization: Bearer YOUR_API_KEY"
```

Labs-hosted Node and Indexer APIs bill in compute units and also enforce HTTP rate limits. See the [Geomi billing docs](https://geomi.dev/docs/admin/billing).

## Common operations

[](#common-operations)

<table><thead><tr><th>Operation</th><th>Method and path</th><th>Reference</th></tr></thead><tbody><tr><td>Ledger info</td><td><code dir="auto">GET /v1</code></td><td><a href="/rest-api/operations/get_ledger_info">get_ledger_info</a></td></tr><tr><td>Health</td><td><code dir="auto">GET /v1/-/healthy</code></td><td><a href="/rest-api/operations/healthy">healthy</a></td></tr><tr><td>Account</td><td><code dir="auto">GET /v1/accounts/{address}</code></td><td><a href="/rest-api/operations/get_account">get_account</a></td></tr><tr><td>Coin or FA balance</td><td><code dir="auto">GET /v1/accounts/{address}/balance/{asset_type}</code></td><td><a href="/rest-api/operations/get_account_balance">get_account_balance</a></td></tr><tr><td>View function</td><td><code dir="auto">POST /v1/view</code></td><td><a href="/rest-api/operations/view">view</a></td></tr><tr><td>Submit transaction</td><td><code dir="auto">POST /v1/transactions</code></td><td><a href="/rest-api/operations/submit_transaction">submit_transaction</a></td></tr><tr><td>Simulate transaction</td><td><code dir="auto">POST /v1/transactions/simulate</code></td><td><a href="/rest-api/operations/simulate_transaction">simulate_transaction</a></td></tr><tr><td>Transaction by version</td><td><code dir="auto">GET /v1/transactions/by_version/{txn_version}</code></td><td><a href="/rest-api/operations/get_transaction_by_version">get_transaction_by_version</a></td></tr><tr><td>Account transactions</td><td><code dir="auto">GET /v1/accounts/{address}/transactions</code></td><td><a href="/rest-api/operations/get_account_transactions">get_account_transactions</a></td></tr><tr><td>Events by handle</td><td><code dir="auto">GET /v1/accounts/{address}/events/{event_handle}/{field_name}</code></td><td><a href="/rest-api/operations/get_events_by_event_handle">get_events_by_event_handle</a></td></tr></tbody></table>

`asset_type` for [get\_account\_balance](/rest-api/operations/get_account_balance) can be a coin type such as `0x1::aptos_coin::AptosCoin` or a fungible asset metadata address such as `0xa` (APT). After the [Fungible Asset migration](/build/smart-contracts/fungible-asset), prefer this endpoint (or SDK helpers such as `getAccountAPTAmount`) over reading a `CoinStore` resource.

## Viewing current and historical state

[](#viewing-current-and-historical-state)

Most integrations need both current and historical state. Aptos provides historical transactions, state, and events as the result of transaction execution.

*   Historical transactions include execution status, output, and related events. Each transaction has a unique **version** that is its global sequential position in the ledger.
*   State at a version is the accumulation of all transaction outputs up to and including that version.
*   Executing transactions may emit [events](/network/blockchain/events), which hint at on-chain data changes.

Note

The [fullnode](/network/nodes/networks) you query must have reached the version that contains your data. Public fullnodes lag [validator fullnodes](/network/blockchain/fullnodes), which follow [validator nodes](/network/blockchain/validator-nodes).

Nodes prune old ledger history (and can prune state) to bound disk use. The default window keeps the most recent 150 million transactions; almost all Mainnet and Testnet nodes use that default. Disable or resize pruning only if you run your own node — see [Data Pruning](/network/nodes/configure/data-pruning). For historical data beyond a pruned window, use the [Indexer](/build/indexer).

Account transaction queries return sequence-number transactions from that account. They do not return [orderless](/build/guides/orderless-transactions) transactions sent from the account.

## Reading state with the View function

[](#reading-state-with-the-view-function)

View functions do not modify blockchain state when you call them through the API. A view function and its arguments can compute complex on-chain state in Move — for example, the highest bid in an auction. The REST operation is [POST /view](/rest-api/operations/view).

The call looks like simulation, but it has no side effects and returns the function output. You pass the module, function name, type arguments, and values. A function does not have to be immutable to use `#[view]`; if it is mutable, the API still will not commit state. Prefer making such functions private so they cannot be called as entry functions at runtime.

Framework modules already expose view functions, so you do not need to publish a module to try the endpoint:

```
curl -X POST "https://api.mainnet.aptoslabs.com/v1/view" \  -H "Content-Type: application/json" \  -d '{"function":"0x1::chain_id::get","type_arguments":[],"arguments":[]}'
```

```
aptos move view --function-id 0x1::chain_id::get
```

```
import { Aptos, AptosConfig, Network, type InputViewFunctionData } from "@aptos-labs/ts-sdk";
const aptos = new Aptos(new AptosConfig({ network: Network.MAINNET }));const payload: InputViewFunctionData = {  function: "0x1::chain_id::get",};const [chainId] = await aptos.view<[number]>({ payload });
```

For your own module, [publish it](/build/cli/working-with-move-contracts) with the [Aptos CLI](/build/cli), then call `aptos move view --function-id <address>::<module>::<function>`.

The response is a JSON array of return values. You can also request Binary Canonical Serialization (BCS) by setting the appropriate `Accept` / content type on the REST call.