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:
{
"frankfurt": "1",
"strasbourg": "1",
"london": "1",
"warsaw": "1",
"beauharnois": "1",
"singapore": "1",
"gravelines": "1",
"sydney": "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 five main Ethereum2
clients:
Prysm, Lighthouse, Teku, Nimbus and Lodestar.
Please follow the following link to use it!
Argument | Type | Values |
---|---|---|
crawler | String | Any of the crawlers from the above API: "frankfurt" (default), "strasbourg", "london", "warsaw", "beauharnois", "singapore", "gravelines", "sydney" |
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=london")
curl -X GET "https://migalabs.es/api/v1/client-distribution?crawler=london"
const request = require('request'); request('https://migalabs.es/api/v1/client-distribution?crawler=london', { 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.