Get protocol - Platform API

GET /protocols/{id} returns everything needed to build a valid create-token request for one protocol: its networks, the sync modes per network, the API types per mode, and the regions per API type.

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

Read the response downwards. Pick a network, then a mode it offers, then an API in that mode, then a region listed for that API. A combination assembled any other way may not exist.

Parameters

ParameterTypeRequiredDescription
idstringYesPath parameter. Protocol id, such as eth. Case-insensitive.

Request Example

bashcurl https://public-api.getblock.io/api/v1/protocols/eth \
  -H "Authorization: Bearer $GETBLOCK_API_KEY"
javascriptconst protocolId = 'eth';

const response = await fetch(`https://public-api.getblock.io/api/v1/protocols/${protocolId}`, {
  headers: { Authorization: `Bearer ${process.env.GETBLOCK_API_KEY}` }
});
const body = await response.json();

console.log(body.networks.map((n) => n.id));
pythonimport os
import requests

protocol_id = "eth"

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

print([n["id"] for n in body["networks"]])

Response Example

json{
  "id": "eth",
  "name": "Ethereum",
  "based_on": "",
  "networks": [
    {
      "id": "mainnet",
      "name": "Mainnet",
      "paid_regions": [],
      "modes": [
        {
          "id": "full",
          "apis": [
            {
              "id": "json-rpc",
              "name": "JSON-RPC",
              "regions": ["eu-central-1", "us-east-1"]
            },
            {
              "id": "ws",
              "name": "WebSocket",
              "regions": ["eu-central-1", "us-east-1"]
            },
            {
              "id": "graphql",
              "name": "GraphQL",
              "regions": ["eu-central-1"]
            }
          ],
          "addons": [
            {
              "id": "mevprotected",
              "name": "MEV protected",
              "apis": [
                {
                  "id": "json-rpc",
                  "name": "JSON-RPC",
                  "regions": ["eu-central-1", "us-east-1"]
                }
              ]
            }
          ]
        },
        {
          "id": "archive",
          "apis": [
            {
              "id": "json-rpc",
              "name": "JSON-RPC",
              "regions": ["eu-central-1", "us-east-1"]
            }
          ],
          "addons": []
        }
      ]
    },
    {
      "id": "sepolia",
      "name": "Sepolia",
      "paid_regions": [],
      "modes": [
        {
          "id": "full",
          "apis": [
            {
              "id": "json-rpc",
              "name": "JSON-RPC",
              "regions": ["eu-central-1"]
            }
          ],
          "addons": []
        }
      ]
    }
  ]
}

Response shortened. The live catalog also lists other networks, such as Hoodi.

Response Parameters

FieldTypeDescription
idstringProtocol id.
namestringDisplay name.
based_onstringThe protocol this one is compatible with. Empty when it stands on its own.
networks[].idstringWhat to send as network.
networks[].namestringDisplay name.
networks[].paid_regionsarray of stringsRegions that need a paid plan. Creating a token in one on a free plan is refused with 403.
networks[].modes[].idstringWhat to send as mode: full or archive.
networks[].modes[].apis[]array of objectsAPI types the mode serves. id is what to send as api; regions lists the only regions that serve it.
networks[].modes[].addons[]array of objectsAdd-ons available in the mode. id is what to send as addon; apis lists the API types the add-on is served on, which may be fewer than the mode's own.

Add-on descriptions and documentation links are in GET /addons.

Use Cases

  • Validate a token configuration before sending it
  • Let an AI agent pick a valid network, mode, API, and region
  • Check whether a region needs a paid plan

Error Handling

HTTPCause
401Missing or invalid API key.
404No such protocol in the catalog. A protocol with nothing currently available answers the same way.
502A GetBlock service behind the API did not answer. Retry later.

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