# Gas Price Lookup (Base & Ethereum)

> Gas Price Lookup (Base & Ethereum) is a paid API for AI agents from x402-micro-pay.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-20).

Returns current gas prices (base fee, priority fee percentiles, suggested max fee) for Base and/or Ethereum chains, paid per-call via x402 USDC microtransaction.

## Facts

- Endpoint: POST https://x402-micro-pay.com/api/skills/gas-price?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gas-price-lookup-base-ethereum-f00c2fcf
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JrHVDeDUGi3KbE6ndzTKo

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 gas-price-lookup-base-ethereum-f00c2fcf -d '<json body>'
```

Example prompt: What are the current gas prices on Base and Ethereum — give me the base fee, priority fee percentiles, and suggested max fee in gwei right now?

## When to prefer this

Choose this endpoint when an AI agent needs live gas fee data for Base or Ethereum without maintaining an API key or subscription. Ideal for autonomous agents that need to decide whether to submit on-chain transactions, estimate costs, or compare gas across chains. The x402 micropayment model makes it trivially cheap ($0.001 per call) and frictionless — no account setup required.

## Known failure modes

- HTTP 402 returned if payment not provided — agent must pay via x402 USDC on Base and retry
- Invalid chain name returns validation error
- Network timeout if the on-chain RPC is slow or unavailable
- Stale data if blockchain node is lagging — confidence field may be lower

## How this service works

41 pay-per-call JSON APIs for AI agents. No account or API key: an unpaid POST returns HTTP 402, pay in USDC on Base with x402 v2, retry. Prices from $0.001 per call.

## Output

Returns a JSON object containing: block number, chain name and chain ID, base fee in gwei, ETH transfer cost in USD, priority fee percentiles (p25/p50/p90) in gwei, and suggested max fee in gwei. Also includes data freshness timestamp, confidence score, warnings, and suggested related skills.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "chains": {
   "type": "array",
   "items": {
    "enum": [
     "base",
     "ethereum"
    ],
    "type": "string"
   },
   "default": [
    "base"
   ],
   "maxItems": 2,
   "minItems": 1,
   "uniqueItems": true
  },
  "request_id": {
   "type": "string",
   "pattern": "^[A-Za-z0-9._:-]+$",
   "maxLength": 64,
   "minLength": 1,
   "description": "Optional idempotency key. Echoed back; a credit-pack redemption with the same request_id and body is charged once."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "as_of": "2026-10-24T14:00:00Z",
   "results": [
    {
     "block": 22000000,
     "chain": "base",
     "chain_id": 8453,
     "base_fee_gwei": 0.012,
     "eth_transfer_usd": 0.000001,
     "priority_fee_gwei": {
      "p25": 0,
      "p50": 0.001,
      "p90": 0.01
     },
     "suggested_max_fee_gwei": 0.025
    }
   ]
  },
  "next": [
   "erc20_meta",
   "token_price"
  ],
  "skill": "gas_price",
  "charged": true,
  "service": "gas_price",
  "sources": [
   {
    "url": "chain:8453",
    "name": "base eth_feeHistory",
    "fetched_at": "2026-10-24T14:00:00Z"
   }
  ],
  "summary": "base base=0.012 tip~0.001 gwei",
  "version": "1.0.0",
  "warnings": [],
  "confidence": 0.95,
  "data_as_of": "2026-10-24T14:00:00Z",
  "generated_at": "2026-10-24T14:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gas-price-lookup-base-ethereum-f00c2fcf/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-micro-pay.com](https://www.zero.xyz/host/x402-micro-pay.com/llms.txt)
