ankr Query API

Query methods — blockchain statistics, blocks, logs, transactions, interactions.

Operations 6

POST /query/blockchain-stats Ankr Get Blockchain Stats #
POST /query/blocks Ankr Get Blocks #
POST /query/logs Ankr Get Logs #
POST /query/transactions-by-hash Ankr Get Transactions By Hash #
POST /query/transactions-by-address Ankr Get Transactions By Address #
POST /query/interactions Ankr Get Interactions #

Documentation

Specifications

Schemas & Data

Other Resources

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/ankr-query-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

ankr-query-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ankr Advanced Query API
  description: 'The Ankr Advanced API (AAPI) provides a specifically-tailored collection of JSON-RPC

    methods that optimize, index, cache, and store blockchain data across multiple

    EVM-compatible blockchains. The Advanced API exposes three logical groups:

    NFT, Token, and Query.

    '
  version: 1.0.0
  contact:
    name: Ankr
    url: https://www.ankr.com
    email: support@ankr.com
  license:
    name: Ankr Terms of Service
    url: https://www.ankr.com/terms/
servers:
- url: https://rpc.ankr.com/multichain
  description: Public multichain endpoint
- url: https://rpc.ankr.com/multichain/{API_KEY}
  description: Premium multichain endpoint
  variables:
    API_KEY:
      default: API_KEY
      description: Premium Plan project API key
security:
- {}
- ApiKeyAuth: []
tags:
- name: Query
  description: Query methods — blockchain statistics, blocks, logs, transactions, interactions.
paths:
  /query/blockchain-stats:
    post:
      summary: Ankr Get Blockchain Stats
      description: Returns aggregate statistics about supported blockchains.
      operationId: ankrGetBlockchainStats
      tags:
      - Query
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnkrChainScopedRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonRpcResponse'
        4XX:
          $ref: '#/components/responses/ErrorResponse'
  /query/blocks:
    post:
      summary: Ankr Get Blocks
      description: Returns full block information for a range of block heights.
      operationId: ankrGetBlocks
      tags:
      - Query
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnkrGetBlocksRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonRpcResponse'
        4XX:
          $ref: '#/components/responses/ErrorResponse'
  /query/logs:
    post:
      summary: Ankr Get Logs
      description: Returns event logs from a specified block range.
      operationId: ankrGetLogs
      tags:
      - Query
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnkrGetLogsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonRpcResponse'
        4XX:
          $ref: '#/components/responses/ErrorResponse'
  /query/transactions-by-hash:
    post:
      summary: Ankr Get Transactions By Hash
      description: Returns the full transaction details for the supplied transaction hash.
      operationId: ankrGetTransactionsByHash
      tags:
      - Query
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnkrGetTxnByHashRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonRpcResponse'
        4XX:
          $ref: '#/components/responses/ErrorResponse'
  /query/transactions-by-address:
    post:
      summary: Ankr Get Transactions By Address
      description: Returns the full transaction history for a wallet address.
      operationId: ankrGetTransactionsByAddress
      tags:
      - Query
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnkrGetTxnByAddressRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonRpcResponse'
        4XX:
          $ref: '#/components/responses/ErrorResponse'
  /query/interactions:
    post:
      summary: Ankr Get Interactions
      description: Returns the chains a wallet has interacted with (cross-chain activity index).
      operationId: ankrGetInteractions
      tags:
      - Query
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnkrGetInteractionsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonRpcResponse'
        4XX:
          $ref: '#/components/responses/ErrorResponse'
components:
  responses:
    ErrorResponse:
      description: Error response (JSON-RPC error envelope).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    JsonRpcResponse:
      type: object
      properties:
        jsonrpc:
          type: string
        id:
          type: integer
        result:
          type: object
          additionalProperties: true
    Error:
      type: object
      properties:
        jsonrpc:
          type: string
        id:
          type: integer
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            data:
              type: object
    AnkrChainScopedRequest:
      allOf:
      - $ref: '#/components/schemas/JsonRpcRequest'
      - type: object
        properties:
          params:
            type: object
            properties:
              blockchain:
                oneOf:
                - $ref: '#/components/schemas/AnkrBlockchain'
                - type: array
                  items:
                    $ref: '#/components/schemas/AnkrBlockchain'
    AnkrGetTxnByHashRequest:
      allOf:
      - $ref: '#/components/schemas/JsonRpcRequest'
      - type: object
        properties:
          method:
            type: string
            default: ankr_getTransactionsByHash
          params:
            type: object
            properties:
              transactionHash:
                type: string
              blockchain:
                oneOf:
                - $ref: '#/components/schemas/AnkrBlockchain'
                - type: array
                  items:
                    $ref: '#/components/schemas/AnkrBlockchain'
              includeLogs:
                type: boolean
              decodeLogs:
                type: boolean
              decodeTxData:
                type: boolean
    AnkrGetInteractionsRequest:
      allOf:
      - $ref: '#/components/schemas/JsonRpcRequest'
      - type: object
        properties:
          method:
            type: string
            default: ankr_getInteractions
          params:
            type: object
            properties:
              walletAddress:
                type: string
    JsonRpcRequest:
      type: object
      required:
      - jsonrpc
      - method
      - id
      properties:
        jsonrpc:
          type: string
          default: '2.0'
        id:
          type: integer
          example: 1
        method:
          type: string
        params:
          type: object
    AnkrGetTxnByAddressRequest:
      allOf:
      - $ref: '#/components/schemas/JsonRpcRequest'
      - type: object
        properties:
          method:
            type: string
            default: ankr_getTransactionsByAddress
          params:
            type: object
            properties:
              address:
                type: array
                items:
                  type: string
              blockchain:
                oneOf:
                - $ref: '#/components/schemas/AnkrBlockchain'
                - type: array
                  items:
                    $ref: '#/components/schemas/AnkrBlockchain'
              fromBlock:
                oneOf:
                - type: integer
                - type: string
              toBlock:
                oneOf:
                - type: integer
                - type: string
              fromTimestamp:
                type: integer
              toTimestamp:
                type: integer
              pageSize:
                type: integer
              pageToken:
                type: string
              includeLogs:
                type: boolean
              descOrder:
                type: boolean
    AnkrGetLogsRequest:
      allOf:
      - $ref: '#/components/schemas/JsonRpcRequest'
      - type: object
        properties:
          method:
            type: string
            default: ankr_getLogs
          params:
            type: object
            properties:
              blockchain:
                oneOf:
                - $ref: '#/components/schemas/AnkrBlockchain'
                - type: array
                  items:
                    $ref: '#/components/schemas/AnkrBlockchain'
              address:
                type: array
                items:
                  type: string
              fromBlock:
                oneOf:
                - type: integer
                - type: string
              toBlock:
                oneOf:
                - type: integer
                - type: string
              topics:
                type: array
                items:
                  type: array
                  items:
                    type: string
              pageSize:
                type: integer
              pageToken:
                type: string
              descOrder:
                type: boolean
    AnkrBlockchain:
      type: string
      enum:
      - arbitrum
      - avalanche
      - base
      - bsc
      - eth
      - fantom
      - flare
      - gnosis
      - linea
      - optimism
      - polygon
      - scroll
      - stellar
      - story
      - syscoin
      - taiko
      - telos
      - xai
      - xlayer
    AnkrGetBlocksRequest:
      allOf:
      - $ref: '#/components/schemas/JsonRpcRequest'
      - type: object
        properties:
          method:
            type: string
            default: ankr_getBlocks
          params:
            type: object
            properties:
              blockchain:
                $ref: '#/components/schemas/AnkrBlockchain'
              fromBlock:
                type: integer
              toBlock:
                type: integer
              descOrder:
                type: boolean
              includeLogs:
                type: boolean
              includeTxs:
                type: boolean
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: query
      name: API_KEY
      description: Premium Plan API key passed as the trailing path segment.