# Base Gas Facts API

> Base Gas Facts API is a paid API for AI agents from base-facts.yankii.fr, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Returns real-time on-chain gas metrics from the Base mainnet, including gas price, base fee, priority fee, gas used, gas limit, and block number.

## Facts

- Endpoint: GET https://base-facts.yankii.fr/v1/gas?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-gas-facts-api-a09d8215
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JCVcRGSmjwlke9HAB9I0m

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 base-gas-facts-api-a09d8215
```

Example prompt: What are the current gas fees on Base mainnet right now — give me the base fee, priority fee, and gas price in wei?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call lookup of live Base mainnet gas metrics without setting up your own RPC connection. Ideal for agents that need occasional gas checks on Base L2 rather than continuous node access.

## Known failure modes

- RPC node unavailability causing stale or missing data
- Network timeout if Base mainnet RPC is congested
- Invalid or malformed response if the block is being reorganized
- Payment failure (402) if USDC balance is insufficient for the $0.001 call fee

## How this service works

Get current gas price information (base fee, priority fee suggestion, gas price)

## Output

A JSON object containing real-time Base mainnet gas data including: gas price, base fee per gas, max priority fee per gas, gas used, gas limit, current block number, timestamp, and the unit (wei) and RPC source used.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "unit": "wei",
  "source": "base-mainnet-rpc",
  "gasUsed": "36000000",
  "gasLimit": "300000000",
  "gasPrice": "6000000",
  "timestamp": "1700000000",
  "blockNumber": "52130000",
  "baseFeePerGas": "5000000",
  "maxPriorityFeePerGas": "1000000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-gas-facts-api-a09d8215/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-facts.yankii.fr](https://www.zero.xyz/host/base-facts.yankii.fr/llms.txt)
