NEAR Data Server by FASTNEAR

For more information, visit GitHub

LIVE LATENCY TEST

Block type:

Recommended: Rust Crate

The best option to consume Neardata is using the Rust crate: fastnear-neardata-fetcher.
Source code is available at github.com/fastnear/libs/tree/main/neardata-fetcher.

Rate Limits & Authentication

The public access rate limit is 180 requests per minute per IP.

To increase your rate limits, get a subscription at https://fastnear.com/.

To authenticate your requests with a FastNear Subscription API key, attach the following query string to the URL: ?apiKey={API_KEY}

Example: /v0/block/98765432?apiKey=YOUR_API_KEY

Note: Authentication using the Authorization: Bearer header requires you to manually handle redirects, since the redirect URL will not pass the header through and the redirected request will not be authenticated.

API

GET /v0/block

Returns the finalized block by block height.

Example: /v0/block/100000000

GET /v0/block/:block_height/headers

Logic is similar to the GET /v0/block/ but returns only the .block key from the big response. This will include the block header with chunk headers

Example: /v0/block/100000000/headers

GET /v0/block/:block_height/chunk/:shard_id

Returns a single chunk of the block :block_height of the shard :shard_id

Example: /v0/block/100000000/chunk/0

GET /v0/block/:block_height/shard/:shard_id

Returns a single shard of the block :block_height of the shard :shard_id

Example: /v0/block/100000000/shard/0

GET /v0/block_opt

Returns the optimistic block by block height or redirects to the finalized block.

Example: /v0/block_opt/122000000

GET /v0/first_block

Redirects to the first block after genesis.

The block is guaranteed to exist and will be returned immediately.

Example: /v0/first_block

GET /v0/last_block/final

Redirects to the latest finalized block.

The block is guaranteed to exist and will be returned immediately.

Example: /v0/last_block/final

GET /v0/last_block/optimistic

Redirects to the latest optimistic block.

The block is guaranteed to exist and will be returned immediately.

Example: /v0/last_block/optimistic