> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.isoview.io/llms.txt.
> For full documentation content, see https://docs.isoview.io/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.isoview.io/_mcp/server.

# Get Gas Price Forecast

GET /v1/gas/forecast

Retrieve the most recent natural gas price forecast for one or more trading hubs.

Historical forecasts are available by specifying a `forecasted_by` time.

Historical data is only available from January 1, 2026 onwards.

All timestamps are in the period-beginning (day beginning) format.

**Access:** Requires `core` subscription level.

Reference: https://docs.isoview.io/api-reference/isoview-api/gas/forecast-gas-forecast-get

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: openapi
  version: 1.0.0
paths:
  /gas/forecast:
    get:
      operationId: forecast-gas-forecast-get
      summary: Get Gas Price Forecast
      description: >-
        Retrieve the most recent natural gas price forecast for one or more
        trading hubs.


        Historical forecasts are available by specifying a `forecasted_by` time.


        Historical data is only available from January 1, 2026 onwards.


        All timestamps are in the period-beginning (day beginning) format.


        **Access:** Requires `core` subscription level.
      tags:
        - subpackage_gas
      parameters:
        - name: forecasted_by
          in: query
          description: >-
            Only return forecasts that were created at or before this timestamp
            (UTC). 
          required: false
          schema:
            type: string
            format: date-time
        - name: model
          in: query
          description: Weather model to use for forecasts.
          required: false
          schema:
            $ref: '#/components/schemas/GasForecastGetParametersModel'
        - name: id
          in: query
          description: >-
            Unique identifier of the specific target (region, plant, county, or
            hub). If omitted, returns all available targets for the specified
            ISO.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeseriesResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
servers:
  - url: /v1
components:
  schemas:
    GasForecastGetParametersModel:
      type: string
      enum:
        - optimized
        - iso
        - normal
      default: optimized
      description: Weather model to use for forecasts.
      title: GasForecastGetParametersModel
    TimeseriesResponse:
      type: object
      properties:
        model:
          type:
            - string
            - 'null'
          description: >-
            Identifier of the weather model used for this forecast (e.g.,
            'optimized', 'iso'). Null for historical actuals or composite
            responses.
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Timestamp (UTC) when this forecast was created/published. Represents
            the model run time. Null for continuous/stitched forecasts or
            historical actuals.
        units:
          type: string
          description: >-
            Measurement units for all data values in the response. Common
            values: 'MW' (megawatts), '°C' (degrees Celsius), 'USD/MWh',
            '$/MMBtu'.
        timezone:
          type: string
          format: zoneinfo
          description: >-
            IANA timezone identifier used for the `time_local` field. Typically
            matches the region's local timezone.
        time_utc:
          type: array
          items:
            type: string
            format: date-time
          description: >-
            Array of timestamps in Coordinated Universal Time (UTC). Each entry
            corresponds to one row in the `values` matrix. Always
            timezone-aware.
        time_local:
          type: array
          items:
            type: string
            format: date-time
          description: >-
            Array of timestamps in local time (timezone specified in `timezone`
            field). Each entry corresponds to one row in the `values` matrix.
            Parallel to `time_utc`.
        columns:
          type: array
          items:
            type: array
            items:
              type: string
          description: >-
            Metadata describing each column in the `values` matrix. Each entry
            is a list of one or more level labels — single-level columns are
            returned as length-1 sublists (e.g. ['pjm_total']); naturally
            multi-level data uses one entry per level (e.g. ['pjm_total',
            'demand']). Clients can rebuild a pandas MultiIndex via
            `pd.MultiIndex.from_tuples(columns)`.
        values:
          type: array
          items:
            type: array
            items:
              type:
                - number
                - 'null'
              format: double
          description: >-
            2D matrix of numeric forecast or actual values in column-major
            order. Each inner list represents a series (corresponding to
            `columns`), and each element within that list corresponds to a
            timestamp (corresponding to `time_utc`/`time_local`). Missing or
            unavailable data is represented as null.
      required:
        - model
        - created_at
        - units
        - timezone
        - time_utc
        - time_local
        - columns
        - values
      description: >-
        Standardized timeseries data response format.


        This is the primary response structure for all forecast and historical
        data endpoints.

        It efficiently represents matrix-like timeseries data with parallel
        arrays for timestamps

        (both UTC and local time) and values. The format is optimized for
        client-side processing

        and visualization.


        **Structure:** Data is in column-major order. Each inner list in
        `values` corresponds to

        a series described in `columns`. Each element within that list
        corresponds to a timestamp

        in `time_utc`/`time_local`.
      title: TimeseriesResponse
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationErrorCtx:
      type: object
      properties: {}
      title: ValidationErrorCtx
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
        input:
          description: Any type
        ctx:
          $ref: '#/components/schemas/ValidationErrorCtx'
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key for authentication. Can also be provided in the api_key query
        parameter.

```

## SDK Code Examples

```python
import requests

url = "https://v1/gas/forecast"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://v1/gas/forecast';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://v1/gas/forecast"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://v1/gas/forecast")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://v1/gas/forecast")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://v1/gas/forecast');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://v1/gas/forecast");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://v1/gas/forecast")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```