List protocols - Platform API

GET /protocols lists the protocols served on Shared Nodes, most prominent first. Every protocol listed can have a token created for it. Each entry is an identity only; its networks, modes, API types, and regions are in GET /protocols/{id}.

GET https://public-api.getblock.io/api/v1/protocols

Parameters

ParameterTypeRequiredDescription
limitintegerNoQuery parameter. Page size. Default 20, at most 100.
offsetintegerNoQuery parameter. Items to skip. Default 0.
searchstringNoQuery parameter. Case-insensitive substring of the id or the name: eth and ether both find Ethereum. Compatibility is not searched: eth does not return every EVM chain.

Request Example

bashcurl 'https://public-api.getblock.io/api/v1/protocols?search=eth' \
  -H "Authorization: Bearer $GETBLOCK_API_KEY"
javascriptconst response = await fetch('https://public-api.getblock.io/api/v1/protocols?search=eth', {
  headers: { Authorization: `Bearer ${process.env.GETBLOCK_API_KEY}` }
});
const body = await response.json();

console.log(body.protocols.map((p) => p.id));
pythonimport os
import requests

body = requests.get(
    "https://public-api.getblock.io/api/v1/protocols",
    headers={"Authorization": f"Bearer {os.environ['GETBLOCK_API_KEY']}"},
    params={"search": "eth"},
).json()

print([p["id"] for p in body["protocols"]])

Response Example

json{
  "total": 3,
  "limit": 20,
  "offset": 0,
  "protocols": [
    {
      "id": "eth",
      "name": "Ethereum",
      "based_on": ""
    },
    {
      "id": "etc",
      "name": "Ethereum Classic",
      "based_on": "eth"
    },
    {
      "id": "etherlink",
      "name": "Etherlink",
      "based_on": "eth"
    }
  ]
}

Response Parameters

FieldTypeDescription
totalintegerProtocols matching the filters, before limit and offset.
limitintegerPage size applied.
offsetintegerItems skipped.
protocols[].idstringWhat to send as protocol when creating a token.
protocols[].namestringDisplay name.
protocols[].based_onstringThe protocol this one is compatible with, such as eth for EVM chains. Empty when it stands on its own.

This is the Shared Node catalog. A token on a Dedicated or Limitless Node takes its protocol and network from the node.

Use Cases

  • Find the protocol id to send to POST /tokens
  • Build a chain picker in an internal tool

Error Handling

HTTPCause
401Missing or invalid API key.
502A GetBlock service behind the API did not answer. Retry later.

Error bodies carry an error message and a request_id. See Errors.