Base URLs and chains
Use https://api.starkscan.co/v1/{chain}/... for hosted integrations, and discover the chain from the API instead of assuming one.
Base URLs and chains
One rule for the base URL
External integrations call:
https://api.starkscan.co/v1/{chain}/...The hosted production base is https://api.starkscan.co. The CLI, SDK, and MCP launcher use that default when STARKSCAN_BASE_URL is unset. Set STARKSCAN_BASE_URL only for preview or self-hosted hosts, and append /v1/{chain}/... to that base for raw HTTP calls.
curl -H "X-Starkscan-Api-Key: $STARKSCAN_API_KEY" \
"https://api.starkscan.co/v1/SN_MAIN/status"Inside the explorer web app the browser may call /v1/... directly on the same origin, and app-host compatibility maps /api/v1/... to the same backend. If you are pinned to an app host such as https://starkscan.co, use https://starkscan.co/api/v1/{chain}/...; new hosted integrations should use https://api.starkscan.co/v1/{chain}/....
The {chain} segment
{chain} selects the network: SN_MAIN is Starknet mainnet and SN_SEPOLIA is the Sepolia testnet.
A deployment is typically single-chain, so do not hard-code a chain list. Discover the chains a host serves and use the returned id in your paths:
curl -H "X-Starkscan-Api-Key: $STARKSCAN_API_KEY" \
"https://api.starkscan.co/v1/meta/chains"