# Sparks RE API — Base Gas Price & Network Congestion Lookup

> Sparks RE API — Base Gas Price & Network Congestion Lookup is a paid API for AI agents from sparks-re-api.sparksdigital-re.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-29).

Returns current Base network gas price, congestion level, and agent recommendation for whether to execute a blockchain transaction now.

## Facts

- Endpoint: POST https://sparks-re-api.sparksdigital-re.workers.dev/utilities/base-gas?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sparks-re-api-base-gas-price-network-congestion-lookup-3d214e7b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jMr9W-8c7u2sxJRPsRR1l

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability sparks-re-api-base-gas-price-network-congestion-lookup-3d214e7b -d '<json body>'
```

Example prompt: Before sending that on-chain USDC payment, check the current gas price on the Base network and tell me if now is a good time to execute — give me the congestion level and estimated transfer cost.

## When to prefer this

Use this endpoint when an AI agent needs to make a real-time decision about whether to execute a Base-chain transaction — especially for x402 micropayment flows where gas cost affects ROI. Prefer this over generic gas APIs when you need a direct agent_recommendation signal and USDC-denominated cost estimates rather than raw gwei values alone.

## Known failure modes

- Base RPC node unavailable — may return 503 or stale data
- x402 micropayment not fulfilled — returns 402 Payment Required
- Cloudflare Worker timeout if Base RPC is slow — may return 504
- Malformed request body returns 400 with schema validation error

## How this service works

AI-powered real estate tools for property normalization, FHA compliance scanning, and investor metrics calculation. Powered by x402 micropayments.

## Output

Returns a JSON object with the current Base network (eip155:8453) gas metrics: latest block number, base fee in gwei, gas price in wei and gwei, block gas utilization percentage, estimated USDC transfer cost in USD, a congestion level enum (e.g. LOW/MEDIUM/HIGH), an agent_recommendation string (e.g. EXECUTE_NOW), and a UTC timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "eip155:8453",
  "latest_block": 38291042,
  "base_fee_gwei": 0.0011,
  "gas_price_wei": 1250000,
  "timestamp_utc": "2026-10-25T23:55:00.000Z",
  "gas_price_gwei": 0.00125,
  "congestion_level": "LOW",
  "agent_recommendation": "EXECUTE_NOW",
  "block_gas_utilization_percent": 32.4,
  "estimated_usdc_transfer_gas_usd": 0.000211
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sparks-re-api-base-gas-price-network-congestion-lookup-3d214e7b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from sparks-re-api.sparksdigital-re.workers.dev](https://www.zero.xyz/host/sparks-re-api.sparksdigital-re.workers.dev/llms.txt)
