{
  "generated_at": "2026-04-24T15:01:35.625676+00:00",
  "slug": "api-dirtroad-dev-tools-web3-eth-block-number",
  "title": "Dirt Road \u00b7 Get current Ethereum block number",
  "url": "https://api.dirtroad.dev/tools/web3/eth-block-number",
  "category": "data",
  "summary": "Fetch the latest block number for a specified chain as a hex string. Supports CAIP-12 chain identifiers.",
  "seo": {
    "title": "Ethereum Block Number API \u2014 x402 Micropayment",
    "description": "Retrieve current Ethereum block number as hex string via x402. $0.0001 USDC per call. Base network. No API keys required."
  },
  "use_cases": [
    "Monitor blockchain sync status",
    "Validate transaction confirmation depth",
    "Timestamp events against on-chain height"
  ],
  "ideal_buyer": "AI agents requiring lightweight, chain-agnostic block height queries without subscription overhead.",
  "example_prompt": "Get the current block number for Base mainnet and return it as a hex string.",
  "example_request_body": {
    "chain": "base"
  },
  "risk_notes": [],
  "pricing_sanity": {
    "flag": "cheap_outlier",
    "ratio": 0.005,
    "median_category_atomic": 20000
  },
  "pricing_review_required": false,
  "pricing_decimal_suspect": false,
  "trust_tier": "indexed_external",
  "accepts": [
    {
      "scheme": "exact",
      "network": "base",
      "pay_to": "0x71dc0bc68e7f0e2c5aace661b0f3fb995a80aaf4",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "max_amount_required_atomic": "100",
      "max_timeout_seconds": 300,
      "mime_type": "application/json",
      "description": "Retrieve the current block number of a blockchain network. Returns the latest block number as a hex string. Essential for monitoring network progress, transaction confirmation tracking, and determining the current state of the blockchain.",
      "verified": false,
      "hints": {
        "input": {
          "type": "http",
          "method": "POST",
          "bodyType": "json",
          "bodyFields": {
            "chain": {}
          }
        },
        "output": {
          "type": "object",
          "required": [
            "chain",
            "blockNumber"
          ],
          "properties": {
            "chain": {
              "type": "string",
              "description": "CAIP-12 chain identifier"
            },
            "blockNumber": {
              "type": "string",
              "description": "Current block number as hex string"
            }
          }
        }
      }
    }
  ],
  "origin": {
    "slug": "api-dirtroad-dev",
    "host": "api.dirtroad.dev",
    "url": "https://api.dirtroad.dev",
    "favicon": "https://dirtroad.dev/mintlify-assets/_mintlify/favicons/dirtroaddev/hL1CxJhINP8GaPGW/_generated/favicon/favicon.ico"
  },
  "json_ld": {
    "@id": "https://x402all.com/resource/api-dirtroad-dev-tools-web3-eth-block-number",
    "url": "https://x402all.com/resource/api-dirtroad-dev-tools-web3-eth-block-number",
    "name": "Dirt Road \u00b7 Get current Ethereum block number",
    "@type": "WebAPI",
    "offers": {
      "url": "https://x402all.com/resource/api-dirtroad-dev-tools-web3-eth-block-number",
      "@type": "Offer",
      "price": "0.0001",
      "availability": "https://schema.org/InStock",
      "priceCurrency": "USDC",
      "priceSpecification": {
        "@type": "UnitPriceSpecification",
        "price": "0.000100",
        "unitText": "call",
        "priceCurrency": "USDC"
      },
      "eligibleCustomerType": "Agent",
      "additionalProperty": [
        {
          "@type": "PropertyValue",
          "name": "paymentNetwork",
          "value": "base"
        },
        {
          "@type": "PropertyValue",
          "name": "paymentAsset",
          "value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
        }
      ]
    },
    "sameAs": "https://api.dirtroad.dev/tools/web3/eth-block-number",
    "@context": "https://schema.org",
    "provider": {
      "@id": "https://x402all.com/server/api-dirtroad-dev",
      "url": "https://api.dirtroad.dev",
      "name": "api.dirtroad.dev",
      "@type": "Organization"
    },
    "identifier": "api-dirtroad-dev-tools-web3-eth-block-number",
    "description": "Retrieve current Ethereum block number as hex string via x402. $0.0001 USDC per call. Base network. No API keys required.",
    "potentialAction": {
      "@type": "BuyAction",
      "target": "https://axon402.com/test-buy?resource=api-dirtroad-dev-tools-web3-eth-block-number",
      "description": "Test-buy this endpoint on AXON"
    },
    "applicationCategory": "data"
  },
  "axon_deep_link": "https://axon402.com/test-buy?resource=api-dirtroad-dev-tools-web3-eth-block-number"
}
