# Solana API reference

# Start building on Solana using the JSON-RPC Solana API

This page is a collection of JSON-RPC API call examples for the Solana API using:

For a detailed description of all the available Solana API JSON-RPC methods, see Solana JSON-RPC API (opens new window).

# What is the Solana API

The Solana API allows developers to communicate with the Solana blockchain to build applications.

To read data from and send transactions to the Solana blockchain, an application must connect to an Solana RPC node.

When communicating with a Solana RPC node, the Solana client implements a JSON-RPC specification, a communication protocol allowing one to make remote calls and execute them as if they were made locally.

# How to start using the Solana API

To use the Solana API, you need access to a Solana RPC node.

Follow these steps to sign up on Chainstack, deploy a Solana RPC node, and find your endpoint credentials:

  1. Sign up with Chainstack.
  2. Deploy a node.
  3. View node access and credentials.

Now you are ready to connect to the Solana blockchain and use the Solana API to build.

Find useful Solana tools in the Chainstack docs.

The best way to use the Solana API is to use a web3 library such as Solana web3.js (opens new window) if using JavaScript or Solana.py (opens new window) using Python.

A web3 library makes using the Solana API to communicate with the Solana blockchain easy and efficient.

# Install web3 libraries

You will need to install the web3 libraries to be able to use them.

# Install Solana Web3.js

Solana web3.js (opens new window) is a JavaScript library that allows you to communicate with a Solana RPC node through HTTP.

To install, run:

npm install --save @solana/web3.js

# Install Solana.py

Solana.py (opens new window) is a Python library that allows you to communicate with a Solana RPC node through HTTP.

To install, run:

pip install solana