# Ethereum API reference guide

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

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

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

# What is the Ethereum protocol API?

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

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

When communicating with an Ethereum RPC node, the Ethereum 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 Ethereum API

To use the Ethereum API, you need access to an Ethereum RPC node.

Follow these steps to sign up on Chainstack, deploy an Ethereum 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 Ethereum blockchain and use the Ethereum API to build.

Find useful Ethereum tools in the Chainstack docs.

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

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

# Install web3 libraries

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

# Install Web3.js

Web3.js (opens new window) is a JavaScript library that allows you to communicate with an EVM node through HTTP and WebSocket.

To install, run:

npm install web3

# Install Web3.py

Web3.py (opens new window) is a Python library that allows you to communicate with an EVM node through HTTP and WebSocket.

To install, run:

pip install web3

# Install Eth.rb

Eth.rb (opens new window) is a Ruby gem that allows you to communicate with an EVM node through HTTP.

To install, run:

gem install eth