RPC Reference
FastNear RPC gives you direct JSON-RPC access to NEAR nodes for state queries, block and chunk inspection, transaction submission, validator data, and protocol introspection.
Endpoints
Regular RPCs keep the most recent epochs of state and are the default choice for most application traffic:
https://rpc.mainnet.fastnear.com
https://rpc.testnet.fastnear.com
Archival RPCs expose the full chain history when you need older blocks, receipts, or historical contract state:
https://archival-rpc.mainnet.fastnear.com
https://archival-rpc.testnet.fastnear.com
Common starting points
Account: account, access key, and key-list queries.Block: finalized or height/hash-based block lookup.Contract: view calls, code lookup, and state inspection.Protocol: status, health, gas price, config, network, and experimental protocol methods.Transaction: submission and execution status methods.Validators: current and epoch-scoped validator views.
Use RPC when
- You want protocol-native request and response shapes.
- You need canonical node-backed behavior for state queries or block lookups.
- You are submitting transactions or inspecting execution outcomes.
- You want the lowest-level surface before adding indexed or product-specific views.
Skip RPC when
- You want wallet-style balances, NFTs, staking positions, or public-key lookups in one call.
- You need indexed transaction history by account instead of polling and stitching together node responses.
- You are optimizing for product simplicity over raw protocol control.
In those cases, move to the indexed REST families such as FastNear API, Transactions API, or NEAR Data API.
Auth and limits
- FastNear API keys are optional for the docs experience and higher-limit access patterns.
- Browser-based docs demos can use the in-page API key flow, but production traffic should move to a backend-controlled key strategy.
- Start with Auth & Access if you need paid access or production guidance.
Troubleshooting
My request worked locally but fails in production
Check whether you relied on the docs UI to append an API key for you. Production backends should inject credentials explicitly and never depend on browser storage.
I need older state than the default RPC returns
Switch from the regular RPC endpoint to the archival RPC endpoint.
I need a simpler response than JSON-RPC gives me
That usually means you want an indexed REST family instead of raw RPC. Use the chooser page to pick the higher-level surface.