NEAR Protocol Legacy / Blocks API

Deprecated.

Operations 4

GET /v1/blocks Get blocks by pagination #
GET /v1/blocks/count Get estimated total blocks count #
GET /v1/blocks/latest Get the latest blocks #
GET /v1/blocks/{hash} Get block info #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/near-legacy-blocks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

near-legacy-blocks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: NearBlocks REST API for the NEAR Protocol block explorer. Provides endpoints to access blockchain data including accounts, transactions, blocks, tokens, NFTs, and staking.
  title: NearBlocks Explorer Legacy / Blocks API
  version: 1.0.0
servers:
- description: Mainnet
  url: https://api.nearblocks.io
- description: Testnet
  url: https://api-testnet.nearblocks.io
tags:
- description: Deprecated.
  name: Legacy / Blocks
paths:
  /v1/blocks:
    get:
      summary: Get blocks by pagination
      tags:
      - Legacy / Blocks
      parameters:
      - in: query
        name: cursor
        description: Next page cursor, takes precedence over 'page' if provided
        schema:
          type: string
      - in: query
        name: page
        description: Page number
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 1
      - in: query
        name: per_page
        description: Number of items per page. Each increment of 25 will count towards rate limit. For example, per page 50 will use 2 credits.
        schema:
          type: integer
          minimum: 1
          maximum: 250
          default: 25
      responses:
        '200':
          description: Success response
      operationId: getV1Blocks
      x-operation-id-source: derived
  /v1/blocks/count:
    get:
      summary: Get estimated total blocks count
      tags:
      - Legacy / Blocks
      responses:
        '200':
          description: Success response
      operationId: getV1BlocksCount
      x-operation-id-source: derived
  /v1/blocks/latest:
    get:
      summary: Get the latest blocks
      tags:
      - Legacy / Blocks
      parameters:
      - in: query
        name: limit
        description: Number of latest blocks to retrieve
        schema:
          type: integer
          minimum: 1
          maximum: 10
          default: 10
      responses:
        '200':
          description: Success response
      operationId: getV1BlocksLatest
      x-operation-id-source: derived
  /v1/blocks/{hash}:
    get:
      summary: Get block info
      tags:
      - Legacy / Blocks
      parameters:
      - in: path
        name: hash
        required: true
        description: Block hash
        schema:
          type: string
        examples:
          hash:
            value: example-block-hash
      responses:
        '200':
          description: Success response
      operationId: getV1BlocksByHash
      x-operation-id-source: derived
components:
  securitySchemes:
    BearerAuth:
      scheme: bearer
      type: http