Gas Fee Predictor Mainnet API

Ethereum mainnet gas data

GitHub OpenAPI

Operations 3

GET /api/dashboard Aggregated homepage payload #
GET /api/gas-predictions Mainnet gas snapshot + 24h forecast #
GET /api/gas-history Historical mainnet gas prices #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gasfeepredictor-com:gasfeepredictor-com-mainnet-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gasfeepredictor-com-mainnet-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Gas Fee Predictor Mainnet API
  description: 'Free public JSON API for live Ethereum mainnet + Layer 2 gas fees, with active failover across multiple public RPCs, pattern-based 24h forecasts, and full wallet-fee estimates including L1 data fees on OP Stack chains. No API key, no signup. Methodology: https://gasfeepredictor.com/methodology'
  version: 1.0.0
  license:
    name: CC BY 4.0
    url: https://creativecommons.org/licenses/by/4.0/
  contact:
    name: Gas Fee Predictor
    url: https://gasfeepredictor.com
servers:
- url: https://api.gasfeepredictor.com
  description: Production (DNS-only subdomain — reachable from servers, workers, and curl; not behind the bot challenge)
tags:
- name: mainnet
  description: Ethereum mainnet gas data
paths:
  /api/dashboard:
    get:
      tags:
      - mainnet
      summary: Aggregated homepage payload
      description: 'Single round-trip for the data the homepage dashboard needs: current Ethereum mainnet gas, ETH/USD price, 24h prediction series, next-best transaction window, and a compact recent-history series. Use this when you need most of the gas data; use the individual endpoints when you want a thinner payload.'
      responses:
        '200':
          description: Live aggregated payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DashboardResponse'
      operationId: getApiDashboard
      x-operation-id-source: derived
  /api/gas-predictions:
    get:
      tags:
      - mainnet
      summary: Mainnet gas snapshot + 24h forecast
      description: Live mainnet gas (low/average/high tiers) plus a pattern-based forecast of hourly gas prices with isLowFeeWindow flags. Use this when you need the full forecast without the dashboard's extra fields.
      parameters:
      - name: timeframe
        in: query
        schema:
          type: string
          enum:
          - 6h
          - 12h
          - 24h
          - 7d
          default: 24h
        description: Forecast horizon
      responses:
        '200':
          description: Gas snapshot + predictions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GasPredictionsResponse'
      operationId: getApiGasPredictions
      x-operation-id-source: derived
  /api/gas-history:
    get:
      tags:
      - mainnet
      summary: Historical mainnet gas prices
      description: Bucketed historical gas prices for the requested window. Sourced from a 90-second-cadence writer persisting each gas snapshot to Postgres.
      parameters:
      - name: range
        in: query
        schema:
          type: string
          enum:
          - 10m
          - 30m
          - 2h
          - 6h
          - 1d
          - 7d
          - 30d
          default: 1d
        description: Look-back window. Bucket size scales with range to keep payloads under ~300 points.
      responses:
        '200':
          description: Historical gas series
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GasHistoryResponse'
      operationId: getApiGasHistory
      x-operation-id-source: derived
components:
  schemas:
    Decision:
      type: object
      properties:
        recommendation:
          type: string
          enum:
          - wait
          - send_now
        expectedSavingsPct:
          type: number
        expectedGas:
          type: number
        nextBestEtaMinutes:
          type: number
        nextBestAt:
          type: string
          format: date-time
        confidence:
          type:
          - number
          - 'null'
          minimum: 0
          maximum: 1
          description: 'Always null for now: the forecast has no calibrated confidence. Reserved for a value derived from measured accuracy (see /accuracy).'
    GasPredictionsResponse:
      allOf:
      - $ref: '#/components/schemas/ApiMeta'
      - type: object
        properties:
          current:
            allOf:
            - $ref: '#/components/schemas/GasTier'
            - type: object
              properties:
                source:
                  type: string
          historical:
            type: array
            items:
              type: object
          predictions:
            type: array
            items:
              $ref: '#/components/schemas/Prediction'
          nextBestTime:
            type:
            - object
            - 'null'
          decision:
            $ref: '#/components/schemas/Decision'
          timeframe:
            type: string
          dataPoints:
            type: integer
          lastUpdated:
            type: string
            format: date-time
          usingFallbackData:
            type: boolean
    Prediction:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        low:
          type: number
        average:
          type: number
        high:
          type: number
        isLowFeeWindow:
          type: boolean
          description: True if this hour is in the cheapest quarter of the returned forecast series
        confidence:
          type:
          - number
          - 'null'
          minimum: 0
          maximum: 1
          description: 'Always null for now: the forecast has no calibrated confidence. Reserved for a value derived from measured accuracy (see /accuracy).'
    EthPriceCompact:
      type: object
      properties:
        usd:
          type:
          - number
          - 'null'
        change_24h:
          type:
          - number
          - 'null'
        updatedAt:
          type: string
          format: date-time
    DashboardResponse:
      allOf:
      - $ref: '#/components/schemas/ApiMeta'
      - type: object
        properties:
          currentGas:
            allOf:
            - $ref: '#/components/schemas/GasTier'
            - type: object
              properties:
                source:
                  type: string
          decision:
            $ref: '#/components/schemas/Decision'
          ethPrice:
            $ref: '#/components/schemas/EthPriceCompact'
          nextBestWindow:
            $ref: '#/components/schemas/NextBestWindow'
          predictions:
            type: array
            items:
              $ref: '#/components/schemas/Prediction'
          compactHistory:
            type: array
            items:
              type: object
          lastUpdated:
            type: string
            format: date-time
    GasTier:
      type: object
      properties:
        low:
          type: number
          description: Low-priority tier (slow inclusion)
        average:
          type: number
          description: Standard tier (typical inclusion)
        high:
          type: number
          description: High tier (fast inclusion, ≈ Blocknative 99% confidence)
    ApiMeta:
      type: object
      description: Every public endpoint includes these fields. citation is a copy-paste-ready attribution string for AI agents and integrators. tier indicates the API tier (currently always 'free').
      properties:
        citation:
          type: string
          description: 'Stable attribution string. Format: ''Gas data from Gas Fee Predictor, gasfeepredictor.com, updated <ISO-8601>''.'
          example: Gas data from Gas Fee Predictor, gasfeepredictor.com, updated 2026-05-26T16:30:00Z
        tier:
          type: string
          enum:
          - free
          description: API tier. Currently 'free' for all requests.
      required:
      - citation
      - tier
    GasHistoryResponse:
      allOf:
      - $ref: '#/components/schemas/ApiMeta'
      - type: object
        properties:
          range:
            type: string
          points:
            type: array
            items:
              type: object
              properties:
                timestamp:
                  type: string
                  format: date-time
                gasPrice:
                  type: number
          meta:
            type: object
            properties:
              requestedRange:
                type: string
              renderedRangeStart:
                type:
                - string
                - 'null'
                format: date-time
              renderedRangeEnd:
                type:
                - string
                - 'null'
                format: date-time
              pointCount:
                type: integer
              source:
                type: string
    NextBestWindow:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        gasPrices:
          $ref: '#/components/schemas/GasTier'
        confidence:
          type:
          - number
          - 'null'
          minimum: 0
          maximum: 1
          description: 'Always null for now: the forecast has no calibrated confidence. Reserved for a value derived from measured accuracy (see /accuracy).'
x-provenance:
  method: harvested
  publisher: Gas Fee Predictor
  source: https://api.gasfeepredictor.com/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)