Starkscan
Getting started

Concepts

Terms you will see across Starkscan docs—URLs, auth, pagination, and API tiers.

Concepts

Short definitions shared by the Quickstart, REST guide, and Build pages.

New to the API? Start with Get your first API key. For the details behind these terms see Authentication, Base URLs and chains, and Pagination and cursors.

Host and path

TermMeaning
STARKSCAN_BASE_URLOptional override for preview or self-hosted API roots: API-host roots or app-host /api bases. Hosted clients default to https://api.starkscan.co when this is unset.
STARKSCAN_RPC_URLFull Starkscan JSON-RPC provider URL shape. Use https://starkscan.co/rpc/v0_10/SN_MAIN/<starkscan_api_key> when a client only accepts a node URL, or https://api.starkscan.co/v1/SN_MAIN/rpc with header auth when a client can attach X-Starkscan-Api-Key. For preview or self-hosted deployments, replace the hosted app/API host with your deployment's host before copying these examples. See Starkscan RPC.
/v1/{chain}Chain segment in the path. SN_MAIN is Starknet mainnet. Full example: https://api.starkscan.co/v1/SN_MAIN/status.
Same-origin /v1/*Inside the web app, the browser may call /v1/... via proxy. Integrators following these docs use the API host /v1/...; app-host /api/v1/... remains compatibility.

Auth

TermMeaning
X-Starkscan-Api-KeyHeader you send on every API request. No Bearer prefix—just the key value for the key issued to your integration.
401Key missing or not accepted. Fix credentials before retrying.
403Key valid but route or tier not allowed (common on batch utility routes).
429Rate limit reached for the current route class. Honor Retry-After before retrying.

Lists and data shape

TermMeaning
Cursor paginationList responses use items and often nextCursor. Pass the cursor back to get the next page. Offsets are not the default model.
limitCap on how many rows one response returns. Keep it modest on hosted APIs.

Route tiers

TierMeaning
Official public APIDefault documented contract in Scalar and starkscan-openapi.yaml. Start here.
Advanced utilitiesSupported batch helpers (e.g. tx previews, tx detail hydration, address summaries). Often need a broader key. See Advanced utilities.
Starkscan RPC provider betaJSON-RPC route shape at https://api.starkscan.co/v1/{chain}/rpc with X-Starkscan-Api-Key; use https://starkscan.co/rpc/v0_10/{chain}/{token} for SDKs/tools that require a single nodeUrl. Replace the hosted app/API host with your deployment's host for preview or self-hosted installs. Hosted production is open to Starkscan API-key holders for RPC reads and batch requests; preview/self-hosted deployments may require batch or utility scope unless configured open. Signed transaction submission requires a write-scoped key.
Protocol routesProtocol-domain reads that are hidden until Starkscan exposes them explicitly.
Internal-onlyApp or operations traffic—not part of your integration contract unless Starkscan documents it for you.

Route certification

Every public OpenAPI operation carries x-starkscan-certification. Agents should read it before deciding whether a route is safe for unattended production use.

StateMeaning
certifiedProduction-safe route: stable schema, monitored path, and current correctness evidence against Starknet RPC or the declared source of truth.
betaUsable by named clients, but still has incomplete parity breadth, partner scoping, or known operational limits.
experimentalInternal or partner preview. Do not build hard dependencies without explicit agreement.
unsupportedNot a client contract.

For launch, the certified set is intentionally narrow: status, block-by-id, timestamp-to-block, tx-by-hash, token total supply, and token balance-of. Indexed analytics and protocol-specific routes graduate only after their reconciliation gates are in place.

block-at-timestamp is certified for accounting workflows that resolve an instant such as 2025-12-31T23:59:59Z with closest=before, then pass the returned block number to certified balance-of. It does not certify portfolio-wide historical holdings or ticker-symbol inference.

The public state stays intentionally small. Internal evidence dimensions such as x-starkscan-oracle, x-starkscan-evidence-level, x-starkscan-certification-scope, and x-starkscan-slo-class describe how the route was proved. See Route Certification.

Responses you should handle

SignalAction
X-Request-IdInclude it when you report a bug or ask for support.
X-Starkscan-Route-ClassRoute budget class agents can use for class-specific backoff (light, heavy, or batch).
Retry-AfterHonor it on retries instead of hammering the API.
exact / truncated (holdings)For portfolio-style decisions, treat holdings as complete only when exact=true, truncated=false, and completeness.reasonCode="complete".

Surfaces

REST, the TypeScript SDK, and the CLI share the public REST contract. MCP exposes the same objects through a separate tool surface. Starkscan RPC is an authenticated HTTP beta for clients that need Starknet RPC method names instead of REST routes. It requires a Starkscan API key and is not a full unrestricted provider replacement.

SurfaceRole
RESTDirect HTTP; see API reference.
Starkscan RPCStarknet JSON-RPC provider beta; see Starkscan RPC.
TypeScript SDKTyped client; see SDK.
CLIShell; see Agent CLI.
MCPTools for coding agents over the MCP / JSON-RPC surface; see MCP quickstart.

On this page