blocks
analytics

Fetch the recent-block feed (newest first) for the block explorer; ?limit (<=100) / ?offset, or ?cursor= for stable keyset paging under head-of-chain inserts (#1851). A conjunctive (AND-ed) filter set (#1991) narrows the feed: ?author=<ss58>, ?spec_version=<n>, ?from / ?to (observed_at epoch-ms), ?block_start / ?block_end (height range), ?min_extrinsics / ?min_events (non-empty blocks). Pass ?format=csv to download the filtered block rows as CSV. Computed live from the first-party blocks tier (#1345).

get/api/v1/blocks

Request

  • Base URL: https://api.metagraph.sh
  • URL: https://api.metagraph.sh/api/v1/blocks
  • Auth: none required

Query parameters

limitinteger

Maximum number of rows to return in one page (at most 100). A larger value, or a non-positive one, is rejected with 400 invalid_query -- so a short page means the result set is exhausted, not that the server quietly capped you (#9916). Omitted, the server applies 50.

offsetinteger

Number of rows to skip before the page begins. Correct only in combination with the page size the response actually returned -- prefer cursor for anything beyond the first few pages, since a row inserted mid-scan shifts every later offset.

cursorstring

Opaque pagination token: pass back the next_cursor from the previous response verbatim. Its contents are not stable and must not be parsed or constructed. Stable across inserts, unlike a row offset.

authorstring

Filter to blocks authored by this validator, as an SS58 address.

spec_versioninteger

Filter to blocks produced under this runtime spec version.

frominteger

Inclusive first observed_at bound, as epoch MILLISECONDS -- not a block height (use block_start/block_end for that). Omit for an unbounded end. Must not be later than the range's upper bound.

tointeger

Inclusive last observed_at bound, as epoch MILLISECONDS -- not a block height (use block_start/block_end for that). Omit for an unbounded end. Must not be earlier than the range's lower bound.

block_startinteger

Inclusive first block height of the range to read. Omit for an unbounded end. Must not be later than the range's upper bound.

block_endinteger

Inclusive last block height of the range to read. Omit for an unbounded end. Must not be earlier than the range's lower bound.

min_extrinsicsinteger

Inclusive lower bound: only rows at or above this value are returned.

min_eventsinteger

Inclusive lower bound: only rows at or above this value are returned.

format'json' | 'csv'

Response format override. Use csv to download the route rows as text/csv; json keeps the default response envelope.

Response

Canonical artifact wrapped in the Metagraphed API envelope, or route rows as text/csv when CSV is requested.

oktrue required
schema_version1 required

Changes

No recorded changes to this operation across all 1 revision of this API.