---
title: "POST /#X-Amz-Target=AmazonForecast.ListForecasts"
method: POST
path: "/#X-Amz-Target=AmazonForecast.ListForecasts"
---

# POST /#X-Amz-Target=AmazonForecast.ListForecasts

`POST /#X-Amz-Target=AmazonForecast.ListForecasts`

Returns a list of forecasts created using the <a>CreateForecast</a> operation. For each forecast, this operation returns a summary of its properties, including its Amazon Resource Name (ARN). To retrieve the complete set of properties, specify the ARN with the <a>DescribeForecast</a> operation. You can filter the list using an array of <a>Filter</a> objects.

## Query parameters

- `MaxResults` string
- `NextToken` string

## Headers

- `X-Amz-Target` 'AmazonForecast.ListForecasts', required

## Request body

- ListForecastsRequest
  - `NextToken` string — If the result of the previous request was truncated, the response includes a <code>NextToken</code>. To retrieve the next set of results, use the token in the next request. Tokens expire after 24 hours.
  - `MaxResults` integer — The number of items to return in the response.
  - `Filters` Filter[] — <p>An array of filters. For each filter, you provide a condition and a match statement. The condition is either <code>IS</code> or <code>IS_NOT</code>, which specifies whether to include or exclude the forecasts that match the statement from the list, respectively. The match statement consists of a key and a value.</p> <p> <b>Filter properties</b> </p> <ul> <li> <p> <code>Condition</code> - The condition to apply. Valid values are <code>IS</code> and <code>IS_NOT</code>. To include the forecasts that match the statement, specify <code>IS</code>. To exclude matching forecasts, specify <code>IS_NOT</code>.</p> </li> <li> <p> <code>Key</code> - The name of the parameter to filter on. Valid values are <code>DatasetGroupArn</code>, <code>PredictorArn</code>, and <code>Status</code>.</p> </li> <li> <p> <code>Value</code> - The value to match.</p> </li> </ul> <p>For example, to list all forecasts whose status is not ACTIVE, you would specify:</p> <p> <code>"Filters": [ { "Condition": "IS_NOT", "Key": "Status", "Value": "ACTIVE" } ]</code> </p>
    - `Key` string, required — The name of the parameter to filter on.
    - `Value` string, required — The value to match.
    - `Condition` 'IS' | 'IS_NOT', required — The condition to apply. To include the objects that match the statement, specify <code>IS</code>. To exclude matching objects, specify <code>IS_NOT</code>.

## Response `200`

Success

- ListForecastsResponse
  - `Forecasts` ForecastSummary[] — An array of objects that summarize each forecast's properties.
    - `ForecastArn` string — The ARN of the forecast.
    - `ForecastName` string — The name of the forecast.
    - `PredictorArn` string — The ARN of the predictor used to generate the forecast.
    - `CreatedUsingAutoPredictor` boolean — Whether the Forecast was created from an AutoPredictor.
    - `DatasetGroupArn` string — The Amazon Resource Name (ARN) of the dataset group that provided the data used to train the predictor.
    - `Status` string — <p>The status of the forecast. States include:</p> <ul> <li> <p> <code>ACTIVE</code> </p> </li> <li> <p> <code>CREATE_PENDING</code>, <code>CREATE_IN_PROGRESS</code>, <code>CREATE_FAILED</code> </p> </li> <li> <p> <code>CREATE_STOPPING</code>, <code>CREATE_STOPPED</code> </p> </li> <li> <p> <code>DELETE_PENDING</code>, <code>DELETE_IN_PROGRESS</code>, <code>DELETE_FAILED</code> </p> </li> </ul> <note> <p>The <code>Status</code> of the forecast must be <code>ACTIVE</code> before you can query or export the forecast.</p> </note>
    - `Message` string — If an error occurred, an informational message about the error.
    - `CreationTime` string, date-time — When the forecast creation task was created.
    - `LastModificationTime` string, date-time — <p>The last time the resource was modified. The timestamp depends on the status of the job:</p> <ul> <li> <p> <code>CREATE_PENDING</code> - The <code>CreationTime</code>.</p> </li> <li> <p> <code>CREATE_IN_PROGRESS</code> - The current timestamp.</p> </li> <li> <p> <code>CREATE_STOPPING</code> - The current timestamp.</p> </li> <li> <p> <code>CREATE_STOPPED</code> - When the job stopped.</p> </li> <li> <p> <code>ACTIVE</code> or <code>CREATE_FAILED</code> - When the job finished or failed.</p> </li> </ul>
  - `NextToken` string — If the response is truncated, Amazon Forecast returns this token. To retrieve the next set of results, use the token in the next request.

## Other responses

- `480` — InvalidNextTokenException
- `481` — InvalidInputException

---

[API](https://skmtc.net/aws/apis/forecast.md) · [All operations](https://skmtc.net/aws/apis/forecast/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/forecast/revisions/3d1c872d2ac9/schema)
