Blockscout-compatible APIs

Blockscout API v2 endpoints served from Routescan’s index. Wallets, apps and scripts built on the Blockscout API read any supported API chain by changing the host and adding an API key.

Base URL

Every request names its chain in the first path segment:

textCopy code
1https://blockscout.routescan.io/{chainId}/api/v2
  • {chainId} is the Routescan chain id, for example 1 for Ethereum or 43114 for Avalanche C-Chain. Mainnet and testnet chains share the same host.
  • Every chain marked with API support in Supported chains is available. One request covers one chain; there is no all shortcut.
  • Paths after /api/v2 are the Blockscout ones, listed in the reference pages above.

Authentication

The Blockscout-compatible APIs are part of the paid Routescan API plans. Send the key of a paid plan in the x-api-key header, as Blockscout expects:

bashCopy code
1curl "https://blockscout.routescan.io/1/api/v2/stats" \
2 -H "x-api-key: YourApiKeyToken"

The apikey query parameter works too, handy for quick tests in a browser:

bashCopy code
1curl "https://blockscout.routescan.io/43114/api/v2/blocks?type=block&apikey=YourApiKeyToken"

It is the same key you use for the Data API and Etherscan-compatible API. Keyless requests and keys of the free plan are refused:

StatusWhenMessage
401No API key, or a key Routescan does not knowA paid Routescan API key is required
403Key of the free planThe Blockscout API requires a paid Routescan API plan
403Disabled keyForbidden
429Plan limit reachedToo Many Requests

Get a paid key on the pricing page.

Rate limits

Requests count against the limits of your plan, on the same counters as api.routescan.io: a call to the Blockscout-compatible API, Data API or Etherscan-compatible APIs uses the same rate and daily quota. Over the limit the API answers 429. The x-ratelimit-limit, x-ratelimit-remaining and x-ratelimit-reset response headers show where you stand. See Rate limits for the numbers of each plan.

Pagination and parameters

  • Lists return up to 50 items and a next_page_params object. Pass its cursor value as the cursor query parameter to get the next page. next_page_params is null on the last page.
  • As on Blockscout, a query parameter the endpoint does not accept is rejected with a 422 that names it. Each reference page lists the accepted parameters.
Questions? Contact us