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},mainnetortestnet.{chainId}, the numeric chain id (for example1for Ethereum,43114for 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
429means 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.nextTokenback as thenextquery parameter for the following page (andprevTokenasprev). limitcontrols page size;count=trueincludes 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
- OpenAPI spec: https://api.routescan.io/v2/documentation/json
- /docs/llms.txt, index of every docs page for LLMs.
- /docs/llms-full.txt, the full documentation as plain text.
- Append
.mdto any API reference page (e.g./docs/api/addresses.md) for its Markdown. - MCP server, see Build with AI.