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.
Base URLs
Regular RPCs keep the most recent epochs of state and are the default choice for most application traffic:
https://rpc.mainnet.fastnear.comhttps://rpc.testnet.fastnear.comArchival RPCs expose the full chain history when you need older blocks, receipts, or historical contract state:
https://archival-rpc.mainnet.fastnear.comhttps://archival-rpc.testnet.fastnear.comCommon starting points
view_account,view_access_key,view_access_key_listfor account and key-list queries.blockfor height or hash lookup;block_effectsfor changes within a block.call_function,view_code,view_statefor contract introspection.status,health,gas_pricefor node and protocol diagnostics.send_txfor transaction submission;txfor execution status.validatorsfor the current epoch's validator set.
Need a workflow?
Use RPC Examples for worked examples like exact state checks, block inspection, contract view calls, and send-and-confirm transaction work.
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; the public endpoints work without one.
- Higher-limit or standardized authenticated access goes through Auth & Access, where the same key works on both the regular and archival RPC hosts as either an
Authorization: Bearerheader or an?apiKey=URL parameter.
Shareable live examples
- Use
Copy example URLon any interactive RPC page to share the selected network, example tab, finality, and filled inputs. - Shared example URLs run automatically on load whenever they include operation state.
- Saved API keys and tokens are never included in those shared docs URLs.
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.
The same FastNear key and the same header or query-param transport work on both hosts.
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.