Skip to main content

Agents on FastNear

This page is for AI agents, crawlers, and automation runtimes that need to use the FastNear APIs or ingest the FastNear docs. It lists the surfaces, their base URLs, how to authenticate, and where to get clean docs into a prompt.

The site at a glance

FastNear serves one canonical RPC plus a family of indexed REST APIs over NEAR Protocol. Each surface below is a separate host with its own shape; a single FastNear API key works across all of them.

SurfaceBase URLsWhat lives here
RPC Referencerpc.mainnet.fastnear.com, rpc.testnet.fastnear.com, archival variantsCanonical JSON-RPC: account state, blocks and chunks, contract view calls, transaction submission, validator and protocol data.
FastNear APIapi.fastnear.com, test.api.fastnear.comIndexed REST views of balances, NFTs, fungible tokens, staking positions, public-key lookups, combined account snapshots.
Transactions APItx.main.fastnear.com, tx.test.fastnear.comIndexed transaction, receipt, account-history, and block-history queries.
Transfers APItransfers.main.fastnear.comAccount-centric NEAR and FT transfer history. Mainnet only today.
NEAR Data APImainnet.neardata.xyz, testnet.neardata.xyzCached and archived block-family reads, optimistic and finalized block polling, redirect helpers.
KV FastData APIkv.main.fastnear.com, kv.test.fastnear.comRead-only key–value lookups over indexed FastData.
SnapshotsSee child pagesCurated snapshot flows for operators standing up RPC or archival nodes. Not an application-level query path.

Each surface has its own index page with a full list of operations, request and response shapes, and live examples.

Route the agent's question to one surface

  • "What is this account's on-chain state right now?"RPC Reference (view_account, view_access_key).
  • "What does this account own — balances, NFTs, staking?"FastNear API.
  • "What is this account's recent activity or transaction history?"Transactions API.
  • "Only transfer events?"Transfers API.
  • "What changed in the most recent blocks?"NEAR Data API.
  • "Key–value write history for a contract?"KV FastData API.
  • "Stand up infrastructure, not query data."Snapshots.

Full decision table with side-by-side tradeoffs: Choosing the Right Surface.

Authenticate once, reuse everywhere

Public endpoints work without a key. Add a key for higher limits or paid access patterns. The same key works across every surface above; send it either as an HTTP header or a URL parameter:

Authorization header
curl "https://rpc.mainnet.fastnear.com" \
-H "Authorization: Bearer ${API_KEY}" \
-H "Content-Type: application/json" \
--data '{"method":"block","params":{"finality":"final"},"id":1,"jsonrpc":"2.0"}'
URL parameter
curl "https://rpc.mainnet.fastnear.com?apiKey=${API_KEY}"

Get a key from dashboard.fastnear.com. Operational posture for non-interactive runtimes: Auth for Agents — keys go in env vars or a secret manager, never in browser storage, chat logs, or prompts. Full flow and header details: Auth & Access.

Pull clean docs into a prompt

  • Every page has a Copy Markdown button in the top-right toolbar. It emits a navigation-chrome-free Markdown version of the page, ready to paste into a prompt or RAG store.
  • The llms.txt convention is mirrored here:
  • Machine-readable site structure for graph-aware ingestion: /structured-data/site-graph.json (mirrored in /ru/).
  • Per-page Markdown mirrors live under the same slug with a .md suffix (e.g. /rpc.md, /api.md, /agents.md) if you prefer direct fetches over the Copy Markdown button.

Per-call hints an agent should know

  • Parameter names, response fields, and example payloads are rendered live on each endpoint page. The underlying registry lives at src/data/generatedFastnearPageModels.json — use it if you are mirroring the schema into another system.
  • ?network=testnet is supported on specific pages only. Each page calls out its network support in the Auth and availability section; do not assume it works globally.
  • Pagination tokens (resume_token, page_token) are opaque. Reuse them verbatim and only with the same endpoint plus filters that produced them.
  • Status routes: every REST family ships a /status and /health path for liveness and sync-latency inspection.

Playbooks and deeper guides

When the agent's caller is a human developer

The root chooser is tuned for humans picking a first surface. Send human collaborators there and keep this page for programmatic consumption.