DOCUMENTATION

Quickstart.

Start with ForecastAPI in 5 minutes. This guide shows you how to make your first forecast request.

PREREQUISITES

You need an API key to start. Sign up for a free account to get your key and 200 free API calls per month.

Get your API key.

  1. Sign up
    for a free account at /register
  2. Find your API keys
    Navigate to your Dashboard and click "API Keys"
  3. Generate a key
    Click "Generate New Key" and copy your API key

Prepare your data.

ForecastAPI works with time series data in a simple JSON format. Your data should include:

  • identifier: A unique identifier for the data series (e.g., SKU, product ID)
  • date: The time period (YYYY-MM-DD) in UTC
  • value: The numeric value for that period

Example Data Format

{
  "identifier": "SKU-12345",
  "data": [
    {"date": "2024-01-01", "value": 120},
    {"date": "2024-02-27", "value": 135},
    {"date": "2024-03-31", "value": 155},
    {"date": "2024-04-01", "value": 142},
    {"date": "2024-05-01", "value": 168}
  ],
  "periods": 6,
  "frequency": "M",
  "data_type": "sales"
}

Make your first request.

forecastapi.com
curl -X POST https://forecastapi.com/v2/forecast \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "identifier": "SKU-12345",
    "data": [
      {"date": "2024-01", "value": 120},
      {"date": "2024-02", "value": 135},
      {"date": "2024-03", "value": 155}
    ],
    "periods": 6,
    "frequency": "M"
  }'

# Response in 287ms
{
  "forecast": [
    {"date": "2024-04", "value": 168.5, "lower": 162.3, "upper": 174.7},
    {"date": "2024-05", "value": 175.2, "lower": 168.1, "upper": 182.3},
    ...
  ],
  "method": "exponential_smoothing",
  "confidence": 0.80
}

Understand the response.

ForecastAPI returns your forecast with details on how it produced the forecast:

RESPONSE
{
  "result": {
    "identifier": "SKU-12345",
    "tenant_context": null,
    "forecasts": [
      { "period": 1, "date": "2024-06-01", "forecast": 175.2, "lower": 168.1, "upper": 182.3 },
      { "period": 2, "date": "2024-07-01", "forecast": 181.5, "lower": 173.8, "upper": 189.2 }
    ],
    "model_info": {
      "best_model": "AutoETS",
      "models_evaluated": ["AutoETS", "AutoARIMA", "AutoTheta", "SeasonalNaive"],
      "selection_metric": "smape",
      "interval_source": "conformal"
    }
  },
  "meta": {
    "selection_metric": "smape",
    "timing": { "validation": 8.2, "selection": 45.6, "forecasting": 72.1, "total": 125.9 }
  }
}

Response Fields

result.forecasts
Array of forecast periods — each has period, date, forecast, and lower/upper bounds
result.identifier
This echoes the series identifier you sent in the request.
result.model_info
The model that the API automatically selected, the models evaluated, and their back-testing scores
meta
The selection metric used and per-stage timings (in milliseconds)

Common parameters.

Data type

Specify your data type for optimized model selection:

  • "sales" - Sales data (uses intermittent demand methods for sparse data)
  • "demand" - Demand forecasting
  • "inventory" - Inventory levels
  • "web_traffic" - Website analytics
  • Custom values - Any string for custom data types
Frequency

Specify your data frequency:

  • "D" - Daily
  • "W" - Weekly
  • "M" - Monthly
  • "Q" - Quarterly
  • "Y" - Yearly
  • "H" - Hourly

What is next.

LAST UPDATED — 14 AUG 2026 · FORECASTAPI DOCS
WAS THIS USEFUL? YES NO