API

Blockscout Internal Documentation

To view Modules and API Reference documentation:
  1. 1.
    Generate documentation.
    mix docs
  2. 2.
    View the generated docs.
    open doc/index.html

Blockscout API Usage

Api calls can be accessed from the Blockscout footer or top menu depending on the instance. Blockscout supports several methods:
  1. 1.
    Graphiql: An IDE for exploring GraphQL
  2. 2.
    RPC: API provided for developers transitioning their applications from Etherscan to Blockscout. Supports GET and POST requests.
    1. 1.
      Typically located at https://blockscout.com/instance/networktype/api-docs.
    2. 2.
      For example, Ethereum mainnet docs are located at https://blockscout.com/eth/mainnet/api-docs
  3. 3.
    Eth RPC: Supports the most popular JSON RPC methods.
APIs in header menu
API links in the footer (ie Gnosis Chain instance)

GraphQL

Send Queries to quickly get information. Use the Docs button to quickly find arguments accepted by the schema. More information is available in our Blockscout GraphQL tutorial.
Docs button for GraphQL

ETH RPC

Blockscout supports the following methods. Requests and return data are identical to the documentation.
  • eth_blockNumber
  • eth_call
  • eth_getBalance
  • eth_getCode
  • eth_getBlockByHash
  • eth_getBlockByNumber
  • eth_getTransactionByHash
  • eth_getTransactionByBlockHashAndIndex
  • eth_getTransactionByBlockNumberAndIndex
  • eth_getTransactionReceipt
  • eth_getUncleByBlockHashAndIndex
  • eth_getLogs

API Keys

If My Account is enabled, users can add up to 3 API keys to ensure 10 request/second limits. When API Keys are not used, the global default is 50 requests/second.
Export as PDF
Copy link
On this page
Blockscout Internal Documentation
Blockscout API Usage
GraphQL
ETH RPC
API Keys