Public Node API
Public Node API provides features identical to KAS Node API without authentication and authorization. It makes you able to execute JSON-RPC functions without implementing your own node.
Public Node API is a service by Krust and KAS for you to learn how to develop blockchain applications on Klaytn. It provides features identical to KAS Klaytn Node API without authentication and authorization. It lets you execute JSON-RPC functions (query data, send transactions) without implementing your own node. The list of Node APIs supported on KAS can be found in Node API List.
Before Getting Started
The intended users of Public Node API are:
Using Non-custodial wallet
e.g., Users of MetaMask, or Kaikas
Education
e.g., Beginners in blockchain or preparing to build blockchain service
Research
e.g., Researchers in blockchain technology
Since Public EN is limited to 5000 RPS, the user experience may be affected during high traffic. It is different from KAS Node API in terms of usability; therefore, it is not recommended to use Public EN at the production level. Instead, you can use KAS. Please refer to the comparison table below for more details.
Comparison of Public Node API and KAS
Rate limit per a second
All users share 5000 RPS
Each user has an individual rate limit
Daily Request limit
Unlimited
Depends on the KAS Pricing Plan
Productivity
Only Node API
Different APIs including Wallet, KIP, Token History, Metadata etc.
Availability
H/A
H/A
Technical Support
-
KAS Help Center/Jira
Abusing
Action against specific accounts/IP
-
Public Node API is not intended for the usability of production-level applications. Please take into consideration that it is intended for educational and testing purposes. Overuse may lead to disadvantages.
Public Node API Domain
Set the domain depending on whether you are on Cypress or Baobab. You can make Klaytn JSON-RPC requests without an authentication header.
Cypress(Klaytn Mainnet):
https://public-node-api.klaytnapi.com/v1/cypressBaobab(Klaytn Testnet):
https://public-node-api.klaytnapi.com/v1/baobab
For more details on Klaytn JSON-RPC API, please refer to Tutorial.
Connecting Non-Custodial Wallet
Below is the information you need to connect Public Node APIs to a non-custodial wallet.
Newtork Name
Klaytn Cypress (Klaytn Mainnet) or Klaytn Baobab (Klaytn Testnet)
RPC URL
Cypress: https://public-node-api.klaytnapi.com/v1/cypress or
Baobab: https://public-node-api.klaytnapi.com/v1/baobab
Chain ID
8217 (Cypress) or 1001 (Baobab)
Currency
KLAY
Explorer URL
Cypress: https://scope.klaytn.com/ or Baobab: https://baobab.scope.klaytn.com/
Connecting Kaikas
Kaikas is a cryptocurrency wallet provided by Klaytn. The RPC URLs for Cypress and Baobab are set as default, but you can change the RPC URL using Public Node API following the instructions below.
1. Run Kaikas

2. Click Network > Add Network

3. Enter the Klaytn chain data to connect to EN and Save

Connecting MetaMask
1. Run MetaMask

2. Click Network > Add Network

3. Enter the Klaytn chain data to connect to EN and Save
|
Checking the Latest Block Number
To retrieve the latest information on your balance, account key type etc. using Node API, you need the number of the latest block. You can do this by making this JSON-RPC request: { "method": "klay_blockNumber", "id": 1 }.
API Request
API Response
If the API request is successful, it returns the following:
List of Currently Supported JSON-RPC API Methods
You can execute other methods in the same way explained above. But please note that KAS doesn't support all of the methods. For a comprehensive list of supported Node API methods, please refer to Node API List.
Last updated
Was this helpful?