# Blockscout — Retrieve recent blocks as displayed on Blockscout homepage

Read recent Blockscout main-page blocks via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Blockscout, pass parameters such as Set, and retrieve structured data including block hash, block height, block timestamp, reported transaction count, and reported gas used for explorer homepage, and network widgets, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/blockscout/blockscout-retrieve-recent-blocks-as-displayed-on-blockscout-homepage/b447423c-9413-4dc6-8180-f818180f7972/
API ID: b447423c-9413-4dc6-8180-f818180f7972
Provider: blockscout
Contract revision: 4
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/blockscout/{chain_id}/api/v2/main-page/blocks
Page update time: 2026-12-03T02:49:24.170Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
The published contract currently has no usage charge. Authentication and service limits still apply.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:49:23.482Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Blockscout Recent Blocks API

Call main-page/blocks with chain\_id. The result is a root array of block objects, without an items wrapper. This selected route has no query inputs for pagination, filtering or choosing a result count.

## What You Can Build

- **Explorer homepage**: Show recent block summaries.
- **Network widgets**: Link block heights and hashes to detail views.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `[].hash` | Block hash |
| `[].height` | Block height |
| `[].timestamp` | Block timestamp |
| `[].transactions_count` | Reported transaction count |
| `[].gas_used` | Reported gas used |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Blockscout — Retrieve recent blocks as displayed on Blockscout homepage request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {
        "chain_id": {
          "type": "string",
          "description": "The ID of the blockchain"
        }
      },
      "required": [
        "chain_id"
      ]
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "base_fee_per_gas": {
        "type": "string"
      },
      "burnt_fees": {
        "type": "string"
      },
      "burnt_fees_percentage": {
        "type": "integer"
      },
      "difficulty": {
        "type": "string"
      },
      "gas_limit": {
        "type": "string"
      },
      "gas_target_percentage": {
        "type": "integer"
      },
      "gas_used": {
        "type": "string"
      },
      "gas_used_percentage": {
        "type": "integer"
      },
      "hash": {
        "type": "string"
      },
      "height": {
        "type": "integer"
      },
      "internal_transactions_count": {
        "type": "integer"
      },
      "is_pending_update": {
        "type": "boolean"
      },
      "miner": {
        "type": "object",
        "properties": {
          "ens_domain_name": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "implementations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "address_hash": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              }
            }
          },
          "is_contract": {
            "type": "boolean"
          },
          "is_scam": {
            "type": "boolean"
          },
          "is_verified": {
            "type": "boolean"
          },
          "metadata": {
            "type": "object",
            "properties": {
              "tags": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "meta": {
                      "type": "object",
                      "properties": {}
                    },
                    "name": {
                      "type": "string"
                    },
                    "ordinal": {
                      "type": "integer"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "tagType": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "name": {
            "type": "string"
          },
          "proxy_type": {
            "type": "string"
          },
          "reputation": {
            "type": "string"
          }
        }
      },
      "nonce": {
        "type": "string"
      },
      "parent_hash": {
        "type": "string"
      },
      "priority_fee": {
        "type": "string"
      },
      "rewards": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "reward": {
              "type": "string"
            },
            "type": {
              "type": "string"
            }
          }
        }
      },
      "size": {
        "type": "integer"
      },
      "timestamp": {
        "type": "string"
      },
      "total_difficulty": {
        "type": "string"
      },
      "transaction_fees": {
        "type": "string"
      },
      "transactions_count": {
        "type": "integer"
      },
      "type": {
        "type": "string"
      },
      "uncles_hashes": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "hash": {
              "type": "string"
            }
          }
        }
      },
      "withdrawals_count": {
        "type": "integer"
      }
    }
  }
}
```

## Request example
Scenario: Schema template · Schema template (not executed)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/blockscout/%3Cchain_id%3E/api/v2/main-page/blocks' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Response illustration only. Placeholder values and unknown business fields are not recorded API results. Replace request placeholders before use.
Response template · not a real response · Documented HTTP 200
```json
[
  {
    "base_fee_per_gas": "<base_fee_per_gas>",
    "burnt_fees": "<burnt_fees>",
    "burnt_fees_percentage": 0,
    "difficulty": "<difficulty>",
    "gas_limit": "<gas_limit>",
    "gas_target_percentage": 0,
    "gas_used": "<gas_used>",
    "gas_used_percentage": 0,
    "hash": "<hash>",
    "height": 0,
    "internal_transactions_count": 0,
    "is_pending_update": false,
    "miner": {
      "ens_domain_name": "<ens_domain_name>",
      "hash": "<hash>",
      "implementations": [
        {
          "address_hash": "<address_hash>",
          "name": "<name>"
        }
      ],
      "is_contract": false,
      "is_scam": false,
      "is_verified": false,
      "metadata": {
        "tags": [
          {
            "meta": {},
            "name": "<name>",
            "ordinal": 0,
            "slug": "<slug>",
            "tagType": "<tagType>"
          }
        ]
      },
      "name": "<name>",
      "proxy_type": "eip1167",
      "reputation": "ok"
    },
    "nonce": "<nonce>",
    "parent_hash": "<parent_hash>",
    "priority_fee": "<priority_fee>",
    "rewards": [
      {
        "reward": "<reward>",
        "type": "<type>"
      }
    ],
    "size": 0,
    "timestamp": "<timestamp>",
    "total_difficulty": "<total_difficulty>",
    "transaction_fees": "<transaction_fees>",
    "transactions_count": 0,
    "type": "block",
    "uncles_hashes": [
      {
        "hash": "<hash>"
      }
    ],
    "withdrawals_count": 0
  }
]
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Is the response wrapped in items?
No. Iterate over the root JSON array.

### Can I request the next page here?
This main-page route exposes no continuation or page-size input. Use an appropriate block-list route for a paginated task.

### Does this include full transaction lists?
It returns block objects and transaction counts. Retrieve transactions using the appropriate block-transactions endpoint.

### Is this a push notification feed?
No. It is a GET response. Repeated fetching and refresh scheduling are client operations.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Check the pricing area for the selected implementation. Follow its billing unit and any request-dependent rules before sending the request.

## Available implementations
- blockscout: https://openany.si/blockscout/blockscout-retrieve-recent-blocks-as-displayed-on-blockscout-homepage/b447423c-9413-4dc6-8180-f818180f7972/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
