API conventions

Conventions shared by every Routescan endpoint, read this once to call the API correctly.

Base URL and networks

http
1https://api.routescan.io/v2/network/{network}/evm/{chainId}/...
  • {network}, mainnet or testnet.
  • {chainId}, the numeric chain id (for example 1 for Ethereum, 43114 for Avalanche C-Chain). See the supported-chains list for every indexed chain.

Multichain queries

Use {chainId} = all to query across every chain Routescan indexes in a single call. Narrow an all query with includedChainIds / excludedChainIds (comma-separated ids) or ecosystem (e.g. avalanche).

Authentication

The apikey is sent as an HTTP header, not a query parameter. It is optional on the free tier; an API key raises your rate limits.

bash
1curl 'https://api.routescan.io/v2/network/mainnet/evm/1/blocks' \
2 -H 'apikey: YourApiKeyToken'

Rate limits

  • The free tier needs no API key; an API key raises your limits.
  • Paid plans raise these further. A 429 means you have been rate limited. See Rate limits.

Pagination

List endpoints are cursor-paginated and return a link object:

json
1{
2 "items": [ /* ... */ ],
3 "link": {
4 "next": "...&next=<token>",
5 "nextToken": "<token>",
6 "prevToken": "<token>"
7 }
8}
  • Pass link.nextToken back as the next query parameter for the following page (and prevToken as prev).
  • limit controls page size; count=true includes a total count where supported.

Errors

Non-2xx responses carry an error message in the body. Always check the HTTP status code before parsing the response.

Machine-readable resources

Questions? Contact us