# Gas History Export (lab.paidapis.net)

> Gas History Export (lab.paidapis.net) is a paid API for AI agents from lab.paidapis.net, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns historical Base mainnet gas price samples (in Gwei) for a specified time range, exportable as JSON or CSV.

## Facts

- Endpoint: GET https://lab.paidapis.net/api/gas-history-export
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gas-history-export-lab-paidapis-net-a31a35d4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-adACMOei7dMERW6N64t_

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-history-export-lab-paidapis-net-a31a35d4
```

Example prompt: Can you pull the Base mainnet gas price history from January 1, 2025 to January 31, 2025 and give it to me as a CSV?

## When to prefer this

Choose this endpoint when you need historical gas price time-series data specifically from the Base mainnet chain, particularly when you want flexible date-range querying and the option to export as CSV for downstream analytics or reporting. Prefer it over generic blockchain explorers when you need clean, structured gas history data consumable by an agent or pipeline without scraping.

## Known failure modes

- Missing required 'from' or 'to' fields returns a 400 validation error
- Invalid ISO 8601 date strings cause a parsing error
- Date range with no available data may return an empty samples array with sampleCount 0
- Very large date ranges may time out or return truncated results
- Payment failure (insufficient USDC or x402 handshake issue) results in 402 response before data is returned

## How this service works

Historical data export: raw Ethereum gas price samples over a date range (?from=, ?to=, ISO 8601, max 24h; ?format=json|csv). Priced at $0.0005/sample (min $0.005) — the real row count for your range, not a flat fee.

## Output

A JSON object containing the requested date range boundaries, an array of timestamped gas price samples (each with a timestamp string and gasPriceGwei number), and a total sample count integer. If CSV format is requested, output is formatted accordingly.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "to",
  "from"
 ],
 "properties": {
  "to": {
   "type": "string",
   "description": "ISO 8601 range end."
  },
  "from": {
   "type": "string",
   "description": "ISO 8601 range start."
  },
  "format": {
   "enum": [
    "json",
    "csv"
   ],
   "type": "string",
   "description": "Either \"json\" (default) or \"csv\"."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string"
  },
  "from": {
   "type": "string"
  },
  "samples": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "timestamp": {
      "type": "string"
     },
     "gasPriceGwei": {
      "type": "number"
     }
    }
   }
  },
  "sampleCount": {
   "type": "integer"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gas-history-export-lab-paidapis-net-a31a35d4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from lab.paidapis.net](https://www.zero.xyz/host/lab.paidapis.net/llms.txt)
