MigaLabs Logo

MigaLabs

Blockchain Ecosystem Observatory

Quickstart

Introduction to some common element about the MigaLabs API

Introduction: Understanding Network Health Welcome to the official documentation for the Migalabs API. This resource is designed to provide access to critical insights regarding the Ethereum network.

Here you will find information about the available endpoints and how to use them with examples in different languages

API Key Required: An API key is required for all requests. Access is not permitted without a valid key. Limits: All users are subject to a limit of 1000 request per month How to Get? You can get your free api key

We are committed to providing transparency and accuracy in all the data we expose, empowering you to better secure and understand the Ethereum ecosystem.

API support a Our website showscase all the information that you can get using our API

Authentication

All our endpoints require and API key to access you can get yours for free at our website

The API keys are added at the headers with the name of X-Api-Key

If the request doesn't contain the api key an error will be returned with the following body

{
  "type": "about:blank",
  "title": "Invalid Api key",
  "status": 401,
  "detail": "The provided api key is invalid",
  "instance": "/api/eth/v1/beacon/consensus/blocks/",
  "errors": [
    {
      "detail": "No API key provided",
      "parameter": "Authorization: X-Api-Key"
    }
  ]
}

Pagination

All paginated endpoints utilize two standard query parameters to manage the size and position of the data response:

  • limit Controls the maximum number of items (page size) included in the response.
  • page pecifies which sequential page of results to retrieve. The API uses 0-based indexing for pages, meaning page=0 returns the first set of results (based on the provided limit). For instance, if limit=50, then page=2 retrieves results 51 through 100. If the endpoint is paginated the meta field in the response will contain the current page and limit
{
  "data": [
    {
      .....
    }
  ],
  "meta": {
    "network": "mainnet",
    "limit": 10,
    "page": 0,
    "totalCount": 7959593
  }

Networks

Almost all endpoints of the API require the query param network we currently support he following networks:

  • mainnet
  • hoodi
  • sepolia if the network is not specified an error will be returned:
{
  "type": "about:blank",
  "title": "Invalid Parameters",
  "status": 400,
  "detail": "One or more parameters in the request are invalid.",
  "instance": "/api/eth/v1/beacon/consensus/blocks/",
  "errors": [
    {
      "detail": "Network is a required field on query",
      "parameter": "network"
    }
  ]
}