Skip to content
Alchemy Logo

Starknet API FAQ

Frequently asked questions about the Starknet API

Starknet is a decentralized Validity-Rollup (often referred to as ZK-Rollup). It operates as a Layer 2 network over Ethereum, enabling any app to achieve massive scale without compromising Ethereum's composability and security.

The Starknet API lets you connect to a Starknet node that is part of the Starknet network. You can interact with onchain data and send different types of transactions to the network using the endpoints provided by the API. The API follows a JSON-RPC standard -- a stateless, lightweight, remote procedure call (RPC) protocol encoded in JSON.

Explained in the Starknet API Quickstart Guide.

Alchemy currently supports v0_6, v0_7, v0_8, and v0_9. We strongly recommend using the latest version, v0_9.

To access v0_6 (notice the underscore) you can use the following URLs to make requests:

  • Mainnet: https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0_6/{apiKey}
  • Testnet: https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/v0_6/{apiKey}

To access v0_7 (notice the underscore) you can use the following URLs to make requests:

  • Mainnet: https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0_7/{apiKey}
  • Testnet: https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/v0_7/{apiKey}

To access v0_8 (notice the underscore) you can use the following URLs to make requests:

  • Mainnet: https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0_8/{apiKey}
  • Testnet: https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/v0_8/{apiKey}

To access v0_9 (notice the underscore) you can use the following URLs to make requests:

  • Mainnet: https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/v0_9/{apiKey}
  • Testnet: https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/v0_9/{apiKey}

You can also directly try these APIs from browser in our API references for Starknet

Starknet is not compatible with the Ethereum Virtual Machine (EVM). It uses Cairo, a Turing-complete programming language, which can be used to write smart contracts and compile them to run on Starknet.

Starknet also has a tool called Warp, developed by the Nethermind team, which is a transpiler that translates Solidity to Cairo. This allows Starknet to be compatible with Solidity and support smart contract deployment written in Solidity, although it is not directly EVM-compatible.

Starknet uses the JSON-RPC API standard as its API. The Starknet JSON-RPC API serves as the backbone for the Starknet network and powers any blockchain interaction.

This API suite lets you read block/transaction data, query chain information, execute smart contracts, store data onchain, and more. You interact with Starknet’s base JSON-RPC APIs to communicate with its decentralized network of nodes.

When accessing the Starknet network via a node provider like Alchemy, you use an API key to send and receive transactions from the network.

For the best development experience, we recommend you sign up for a free API key.

Several libraries are available for Starknet development and interaction, including:

Additionally, Protostar is a development framework for Starknet smart contract development.

Many programming languages work with Starknet including JavaScript, Python, Cairo, and Shell. JavaScript and Cairo are some of the best languages to use -- Cairo for smart contracts and JavaScript for offchain requests.

Starknet does not have its own separate native token. Instead, it uses ETH, the native token of the Ethereum network, for transactions, gas fees, and other network activities. Users can bridge their ETH tokens from Ethereum to Starknet using a dedicated bridge.

Use the Starknet Sepolia testnet. By connecting to this testnet, you can launch smart contracts, execute transactions, and test applications on the Starknet network.

You can also obtain test tokens from the Sepolia testnet and use the StarkGate bridge to transfer these tokens to the Starknet testnet. This lets you test the capabilities of the Starknet network in a testnet environment before deploying to mainnet.

You can find the list of all the methods Alchemy support for the Starknet API on the Starknet API Endpoints page.

If you have any questions or feedback, contact us at [email protected] or open a ticket in the Alchemy Dashboard.

Was this page helpful?