Eth2 Basic Metrics API Documentation
About the Crawler List API
Please feel free to query our crawler list API!
In this API you will be able to check our currently running crawlers.
Please follow the following link to use it!
Results | If a crawler is standing a "1", it means that it is currently up. If a crawler is standing a "0", it means that it is currently down. |
Sample response:
{
"eth-cl-mainnet": "1",
"gnosis-mainnet": "1",
}
Use examples
import requests response = requests.get("http://migalabs.es/api/v1/crawler-list")
curl -X GET "http://migalabs.es/api/v1/crawler-list"
const request = require('request'); request('https://migalabs.es/api/v1/crawler-list', { json: true }, (err, res, body) => { if (err) { return console.log(err); } console.log(body); });
About the Client Distribution API
Please feel free to query our client distribution API!
In this API you will be able to check the current client distribution of the clients from any of the supported Networks (Currently only Ethereum Consensus Layer)
clients:
Prysm, Lighthouse, Teku, Nimbus, Lodestar and Grandine.
Please follow the following link to use it!
Argument | Type | Values |
---|---|---|
crawler | String | Any of the crawlers from the above API: "eth-cl-mainnet" Frankfurt (default) "gnosis-mainnet", Frankfurt |
Results | The distribution of clients and the number detected |
Sample response:
{
"Grandine": 30,
"Lighthouse": 666,
"Lodestar": 3,
"Nimbus": 157,
"Others": 2,
"Prysm": 1630,
"Teku": 302
}
Use examples
import requests response = requests.get("https://migalabs.es/api/v1/client-distribution?crawler=eth-cl-mainnet")
curl -X GET "https://migalabs.es/api/v1/client-distribution?crawler=eth-cl-mainnet"
const request = require('request'); request('https://migalabs.es/api/v1/client-distribution?crawler=eth-cl-mainnet', { json: true }, (err, res, body) => { if (err) { return console.log(err); } console.log(body); });
About the Active Nodes API
Please feel free to query our active nodes API!
In this API you will be able to check the current number of Active Nodes from the supported Networks (Currently only Ethereum Consensus Layer)
Please follow the following link to use it!
Argument | Type | Values |
---|---|---|
crawler | String | Any of the crawlers from the above API: "eth-cl-mainnet" Frankfurt (default) "gnosis-mainnet", Frankfurt |
Results | The distribution of active nodes |
Sample response:
{
"active_nodes": 4001,
}
Use examples
import requests response = requests.get("https://migalabs.es/api/v1/active-nodes?crawler=eth-cl-mainnet")
curl -X GET "https://migalabs.es/api/v1/active-nodes?crawler=eth-cl-mainnet"
const request = require('request'); request('https://migalabs.es/api/v1/active-nodes?crawler=eth-cl-mainnet, { json: true }, (err, res, body) => { if (err) { return console.log(err); } console.log(body); });
About the Geographical Distribution API
Please feel free to query our Geographical distribution API!
In this API you will be able to check the current number of Active Nodes in each country of the world for any supported Networks (Currently only Ethereum Consensus Layer)
Please follow the following link to use it!
Argument | Type | Values |
---|---|---|
crawler | String | Any of the crawlers from the above API: "eth-cl-mainnet" Frankfurt (default) "gnosis-mainnet", Frankfurt |
Results | The distribution of nodes among countries |
Sample response:
{
"---": 1,
"ARE": 1,
"AUS": 4,
"BGR": 2,
"CAN": 9,
"CHE": 3,
...
}
Use examples
import requests response = requests.get("https://migalabs.es/api/v1/geo-distribution?crawler=eth-cl-mainnet")
curl -X GET "https://migalabs.es/api/v1/geo-distribution?crawler=eth-cl-mainnet"
const request = require('request'); request('https://migalabs.es/api/v1/geo-distribution?crawler=eth-cl-mainnet, { json: true }, (err, res, body) => { if (err) { return console.log(err); } console.log(body); });
About the IP Distribution API
Please feel free to query our IP distribution API!
In this API you will be able to check the current number of Active Nodes hosted under the same IP for any supported Networks (Currently only Ethereum Consensus Layer)
Please follow the following link to use it!
Argument | Type | Values |
---|---|---|
crawler | String | Any of the crawlers from the above API: "eth-cl-mainnet" Frankfurt (default) "gnosis-mainnet", Frankfurt |
Results | The distribution of shared IPs among nodes |
Sample response:
Explanation: 3861 unique IPs hosting a single node, or 69 IPs hosting 2 nodes
{
"1": 3861,
"2": 69,
"3": 3,
"4": 4,
"5": 1,
...
}
Use examples
import requests response = requests.get("https://migalabs.es/api/v1/ip-distribution?crawler=eth-cl-mainnet")
curl -X GET "https://migalabs.es/api/v1/ip-distribution?crawler=eth-cl-mainnet"
const request = require('request'); request('https://migalabs.es/api/v1/ip-distribution?crawler=eth-cl-mainnet, { json: true }, (err, res, body) => { if (err) { return console.log(err); } console.log(body); });
About the Round Trip Time (RTT) Distribution API
Please feel free to query our RTT distribution API!
In this API you will be able to check the current RTT distribution between the crawler and the nodes of any supported Networks (Currently only Ethereum Consensus Layer)
Please follow the following link to use it!
Argument | Type | Values |
---|---|---|
crawler | String | Any of the crawlers from the above API: "eth-cl-mainnet" Frankfurt (default) "gnosis-mainnet", Frankfurt |
Results | The RTT distribution of the active nodes |
Sample response:
Explanation: 3629 nodes with a RTT between 0.0s and 0.0+0.5s
{
"0.0": 3629,
"0.5": 400,
"1.0": 8,
"1.5": 2,
...
}
Use examples
import requests response = requests.get("https://migalabs.es/api/v1/rtt-distribution?crawler=eth-cl-mainnet")
curl -X GET "https://migalabs.es/api/v1/rtt-distribution?crawler=eth-cl-mainnet"
const request = require('request'); request('https://migalabs.es/api/v1/rtt-distribution?crawler=eth-cl-mainnet, { json: true }, (err, res, body) => { if (err) { return console.log(err); } console.log(body); });
Troubleshooting
CORS: Access-Control-Allow-Origin
This happens because when you navigate through a front end, a header is set with the origin of the backend domain. In every other request you perform, this header is attached to verify where you come from. See a detailed explanation here.

But don't worry! We have a solution for this issue. There are two options to solve this problem:
Solution 1: Implement an API endpoint in the backend
You may expose an endpoint where your front end can make this query to. Then, your backend should implement a call to our API and return it to the front end. This way the call to our API is not done from an web environment, but it would be similar to a curl or wget, with no session involved, thus not having an initial "origin" header.

Solution 2: Implement a CORS proxy to receive such requests
So, if you a very minimalistic backend you may not be able to implement the previous solution. You may check the possibility to implement a CORS proxy. This proxy will basically receive the request from the front end, remove the origin header and query the external API, returning the result. You may follow this guide on how to do this.
Keep in mind that the front end should now query this proxy, instead of the external API.