> For the complete documentation index, see [llms.txt](/llms.txt).

# Get the base fee history

Returns the base fee history of the specified blockchain network for the previous 500 blocks. This method uses [80 credits](/services/get-started/pricing/) from your daily balance.

The base fee is a part of the EIP-1559 upgrade to the Ethereum network, and it represents the minimum price a user must pay for their transaction to be included in a block.

This method can be useful for applications that need to display or analyze the historical base fee data for a specific blockchain network.

**GET** `https://gas.api.infura.io/networks/${chainId}/baseFeeHistory`

## Parameters[​](#parameters "Direct link to Parameters")

**Path**:

- `chainId`: `string` - ID of the chain to query. See the [list of supported chain IDs](/services/get-started/endpoints/#gas-api).

## Returns[​](#returns "Direct link to Returns")

Array of historical base fees.

## Example[​](#example "Direct link to Example")

### Request[​](#request "Direct link to Request")

Include your [API key](/developer-tools/dashboard/get-started/create-api/)and optional [API key secret](/developer-tools/dashboard/how-to/secure-an-api/api-key-secret/)to authorize your account to use the APIs.

tip

You can call the API with only an API key, and [include it as a path parameter](/services/reference/gas-api/api-reference/#supported-api-request-formats)instead of using the curl authentication option (`-u`).

- curl
- JavaScript

```
curl -X "GET" \
  -u <YOUR-API-KEY>:<YOUR-API-KEY-SECRET> \
  "https://gas.api.infura.io/networks/1/baseFeeHistory"

```

```
const axios = require('axios')

const apiKey = '<YOUR-API-KEY>' // Replace with your API key.
const apiKeySecret = '<YOUR-API-KEY-SECRET>' // Replace with your API key secret.

const Auth = Buffer.from(apiKey + ':' + apiKeySecret).toString('base64')

// The chain ID of the supported network.
const chainId = 1

;(async () => {
  try {
    const { data } = await axios.get(
      `https://gas.api.infura.io/networks/${chainId}/baseFeeHistory`,
      {
        headers: {
          Authorization: `Basic ${Auth}`,
        },
      }
    )
    console.log('Base fee history:', data)
  } catch (error) {
    console.log('Server responded with:', error)
  }
})()

```

### Response[​](#response "Direct link to Response")

```
[
  "14.585610312",
  "16.407222984",
  "16.687763116",
  "16.357094117",
  "15.82929799",
  "15.21546789",
  "17.113938208",
  "16.92324819",
  ...
]

```
