API Reference
This route explains what belongs in FastNear's REST layer and how to choose among the REST families before dropping to raw JSON-RPC.
The /api sidebar is intentionally the FastNear API sidebar, not a catch-all REST sidebar. Other REST families such as Transactions API, Transfers API, NEAR Data API, and KV FastData API each live at their own top-level section.
REST families at a glance
| Family | Start here when... | Move elsewhere when... |
|---|---|---|
| FastNear API | you want indexed account, token, NFT, staking, or public-key views | you need canonical protocol-native RPC semantics |
| Transactions API | you want transaction, receipt, account, or block history | you only need transfer events or exact RPC-level behavior |
| Transfers API | the question is specifically about NEAR or FT movement | the question broadens to general execution history |
| NEAR Data API | you want recent optimistic or finalized block-family reads | you need exact canonical block or state follow-up |
| KV FastData API | you want indexed key-value history or latest indexed key state | you need exact current on-chain contract state |
What /api itself is for
Use the FastNear API section when the user wants a product-shaped answer without stitching raw node responses together:
- account summaries
- FT balances
- NFT holdings
- staking positions
- public-key to account resolution
Good starting pages in this sidebar:
When not to use /api
Do not start in this sidebar when:
- the primary job is history; use Transactions API or Transfers API
- the primary job is recent block polling; use NEAR Data API
- the answer must stay close to canonical node request and response shapes; use RPC Reference
For agents
If the caller is an AI agent and the choice is still unclear, use: