Time Series Forecasting - AI Sales & Demand Forecast avatar

Time Series Forecasting - AI Sales & Demand Forecast

Pricing

from $16.00 / 1,000 series forecasts

Go to Apify Store
Time Series Forecasting - AI Sales & Demand Forecast

Time Series Forecasting - AI Sales & Demand Forecast

Forecast sales, demand, traffic or any time series from CSV, a Google Sheet or JSON with Mistral AI's Timestral model: median forecast, prediction intervals, future dates and an optional backtest. Runs inside the Actor. $0.02 per series; too-short series are free.

Pricing

from $16.00 / 1,000 series forecasts

Rating

0.0

(0)

Developer

Yukai Lin

Yukai Lin

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

What does Time Series Forecasting do?

Forecast any time series in one step: paste a CSV, upload a spreadsheet export, link a Google Sheet or send JSON, and get the median forecast, prediction intervals (any quantiles you choose) and the future dates for every series. Sales, demand, orders, website traffic, prices, sensor readings, KPIs: if it is a column of numbers over time, it can be forecast. $0.02 per series, no start fee; series that are too short or unreadable are free.

The forecasts come from Timestral, the time-series foundation model Mistral AI released in October 2026. It is a zero-shot model: it was trained on a large collection of series, so it forecasts your data directly, with no model fitting, parameter tuning or data-science setup. The model runs on CPU inside this Actor: your data is not sent to any outside API.

  • 📈 Median + intervals: 10th/90th percentiles by default, or any quantiles between 0.01 and 0.99 (e.g. 0.025/0.975 for a 95% interval)
  • 📅 Dates continue your history: daily, business-day, weekly, monthly (month starts or month ends), quarterly, yearly, hourly and minute data are detected from the dates
  • 🧮 Many series per run: one column per series (date,sales,visits), long format (store,date,sales), JSON arrays or objects
  • 🕳️ Messy data is fine: gaps are handled by the model, duplicate dates are combined, dates in most formats are read (2026-10-22, 10/22/2026, 22.10.2026, Oct 2026, 2026-Q4, 2026-W43, Unix time)
  • 🔁 Resample on the way in: choose a coarser frequency to turn daily orders into weekly totals (sum, mean, last, min or max)
  • 🧪 Optional backtest: the Actor hides the last part of your history, forecasts it, and reports the error next to a seasonal-naive baseline, so you can see how far to trust the forecast for your data
  • 📤 Spreadsheet-ready output: one dataset row per series plus FORECAST_CSV, one line per series and future step

How to use it

  1. Paste your data into Data (a header row and a date column work best), or give a file or link (Google Sheets, GitHub, Dropbox, any CSV/JSON URL).
  2. Set the Forecast horizon (how many future steps) or leave it empty for a sensible default per frequency.
  3. Optionally pick quantiles, turn on the backtest, and run.

Input example

{
"data": "date,store_a,store_b\n2026-01-05,120,98\n2026-01-12,131,101\n...",
"horizon": 13,
"quantiles": [0.1, 0.9],
"evaluate": true
}

Long format (one series per id) and JSON work too:

{
"series": [
{ "id": "sku-1", "values": [12, 15, 14, 18, 21, 19, 24, 26, 25, 29], "start": "2026-01-01", "freq": "M" }
],
"horizon": 6
}

A series can also carry its own dates: "timestamps": ["2026-01-05", "2026-01-12", …] next to "values", or "values": [["2026-01-05", 7], ["2026-01-12", 9], …].

Output example (local test run, 22 October 2026: airline passengers, monthly, linked from GitHub)

{
"seriesId": "Passengers",
"success": true,
"charged": true,
"model": "Timestral-123M",
"frequency": "month",
"horizon": 12,
"lastTimestamp": "1960-12-01",
"lastValue": 432,
"forecastStart": "1961-01-01",
"forecastEnd": "1961-12-01",
"nextMedian": 446.494,
"nextLow": 431.479,
"nextHigh": 462.438,
"forecast": [
{ "step": 1, "timestamp": "1961-01-01", "median": 446.494, "q10": 431.479, "q90": 462.438 },
{ "step": 2, "timestamp": "1961-02-01", "median": 417.213, "q10": 398.03, "q90": 436.536 },
{ "step": 3, "timestamp": "1961-03-01", "median": 469.775, "q10": 447.229, "q90": 491.618 }
],
"backtest": {
"holdoutSteps": 12,
"holdoutStart": "1960-01-01",
"maeModel": 9.0749,
"maeSeasonalNaive": 47.8333,
"maseModel": 0.298,
"maseSeasonalNaive": 1.5709,
"errorVsSeasonalNaivePct": -81,
"beatsSeasonalNaive": true,
"intervalLevel": "10-90",
"intervalCoverage": 0.917
},
"runtimeSecs": 0.644
}

FORECAST_CSV in the key-value store has every point in long format, ready for a spreadsheet or BI tool:

series_id,step,timestamp,median,q5,q25,q75,q95
GASREGW,1,2026-10-26,4.21193,4.08957,4.17008,4.25656,4.33909
GASREGW,2,2026-11-02,4.1439,3.90394,4.05963,4.23639,4.39239

A series that cannot be forecast gets a free row, e.g. { "seriesId": "too-short", "success": false, "charged": false, "errorType": "invalid_input", "error": "too short: 3 value(s), at least 8 are needed (not charged)" }. The key-value store also holds SUMMARY (counts, model, time per series, backtest overview, notes about the input).

How accurate is it?

Tested on 9 real public series (rolling origin: the last 5 forecast windows of each series, the model sees only the history before each window). Lower MASE is better; 1.0 is the error of a naive forecast on the history. The baseline repeats the last season (last week, last year).

Series (public source)FrequencyLengthHorizonSeasonal naiveTimestral 28MTimestral 123M10–90% interval hit rate (123M)
Daily minimum temperature, Melbourne 1981–90day3,650300.9390.6670.66280%
Wikipedia page views (log), Prophet exampleday2,905301.3471.0651.03379%
US regular gasoline price (FRED GASREGW)week1,888131.6120.6650.75174%
US initial jobless claims (FRED ICSA)week3,119130.1700.0970.09885%
Airline passengers 1949–60month144121.3340.5540.49480%
Car sales, Quebec 1960–68month108121.0430.9880.95282%
US retail sales, Prophet examplemonth293121.0660.3420.33692%
US real GDP (FRED GDPC1)quarter31882.9354.0965.77978%
Temperature every 5 minutes, Yosemite5 min18,7212880.5780.5510.49096%

The model beats the baseline on 8 of 9 series. The exception is instructive: for GDP the model wins 4 of the 5 windows by a wide margin, but the window that starts right after the 2020 COVID drop extrapolates the crash (a sudden break at the very end of the history). Use the backtest option to check your own data before you rely on a forecast.

How much does it cost?

EventFree / BronzeSilverGold and above
Series forecast$0.02$0.018$0.016

No start fee. Charged: each series that is forecast (median, quantiles and, if on, the backtest). Not charged: series with fewer than 8 values, series that cannot be read, series where the model fails, series not processed because of your limits, and the sample data pre-filled in Data when you also give a file/link or JSON series (the untouched sample is then ignored). Every row says charged: true/false.

Both models cost the same; the 123M model needs 2 GB of memory (default), the 28M model runs in 1 GB. Runs are short: in local tests on one CPU thread a series took 0.3–2.6 s including the backtest, after about 5 s of model loading (50 series of one year of daily data: 21 s in total). On Apify, runs with one or two monthly series took 16–26 s in total, model loading included (October 2026).

How it compares

Checked October 2026 on the Apify Store: searches for "forecast", "time series forecasting", "sales forecast", "demand forecast" and similar phrases found no general-purpose forecasting Actor, only Google Trends scrapers. Outside Apify, hosted forecasting APIs exist (for example on RapidAPI); this Actor's difference is the model (Timestral topped the GIFT-Eval, TIME and fev-bench leaderboards when Mistral AI released it; the 123M version used here is within 0.002 MASE of the largest one), per-series pricing, free failures and spreadsheet-style input.

Control your cost

At the start the run logs its plan, e.g. Plan: 12 series forecast × $0.02 = at most $0.24. It never charges more than your maximum charge per run: series that do not fit are not processed and are listed in SUMMARY.notProcessed. Max series (default 1,000) caps one run. Wide CSV files with many numeric columns are many series: set Value columns to forecast only the ones you need. A run restarted by Apify skips series it already charged.

Use with AI agents (MCP)

Connect Apify's MCP server (https://mcp.apify.com?tools=tidytools/time-series-forecast) to Claude, Cursor or any MCP client, then ask e.g. "Forecast the next 6 months of this sales series with an 80% interval: …".

{ "series": [{ "id": "sales", "values": [120, 131, 128, 140, 152, 149, 160, 171], "start": "2026-01-01", "freq": "M" }], "horizon": 6 }

Failed or too-short series are not charged and carry an errorType.

Integrations

Forecast the output of another Actor: export its dataset as CSV and give the link in Or a file or link (e.g. daily review counts, prices from a product tracker, traffic numbers). Schedule the Actor on Apify to refresh a forecast every week, and read FORECAST_CSV from Google Sheets (=IMPORTDATA(...)) or a BI tool.

Tips and limitations

  • History: at least 8 values per series; two full seasons (e.g. 24 months, 14 days) give the model a seasonal pattern to follow. Up to the last 4,096 steps are used by default ("Max history", up to 32,768).
  • Horizon: up to 1,024 steps. Forecasts further than one or two seasons ahead mostly carry the trend and seasonality forward.
  • Breaks at the end of the history (a crash, a promotion spike, a data error in the last values) can be extrapolated; check the backtest and clean obvious errors first.
  • One series at a time: each series is forecast from its own history. Covariates (prices, holidays) and joint forecasts of related series are not part of this version.
  • Times are used as written: a time-zone suffix is ignored so that daily data stays on its own day; Unix timestamps are read as UTC.
  • Non-negative data stays non-negative: if the history has no negative value, the forecast and its intervals are not below 0.

Model and licence

Forecasts are produced by Timestral (Timestral-123M and Timestral-28M, pinned versions from Hugging Face) with Mistral AI's open-source inference code (Apache-2.0). The model weights are published by Mistral AI under a Modified MIT licence (attribution notice: "2026 - Mistral AI"). Its main extra condition: the licence may not be used by a company whose global consolidated monthly revenue exceeds US$20 million (such companies can ask Mistral AI for a commercial licence). The full licence text is at https://huggingface.co/mistralai/Timestral-123M/blob/main/LICENSE and is shipped next to the weights inside this Actor. This Actor is an independent tool, not a Mistral AI product.

Responsible use

Your series are processed inside the Actor run and stay in your own Apify storage; nothing is sent to Mistral AI or any other service (a link you give is downloaded once). A forecast is a statistical estimate, not a guarantee: use the intervals, not only the median, when you plan stock, staff or budgets.

FAQ

Does the Actor collect usage data? The Actor sends one anonymous usage counter per run (input type, item count range, outcome) to improve the tool; no data values, URLs or account data.

Which model should I choose? Timestral 123M (default) was the more accurate one on 6 of the 9 test series above; 28M is about 4× faster and needs only 1 GB, at the same price. If you start a run with less than about 2 GB of memory, the 28M model is used automatically and the SUMMARY says so.

What does the backtest measure? It hides the last horizon steps (at most a third of the history), forecasts them from the rest, and compares the error (MAE, MASE, sMAPE) with a seasonal-naive forecast of the same steps. intervalCoverage is the share of hidden values inside the 10–90% interval (about 0.8 is well calibrated). It costs nothing extra but roughly doubles the run time.

My CSV has several numeric columns. What is forecast? Every numeric column except the date and id-like columns (id, code, zip, lat/lon, index), each as one charged series. Set Value columns to choose. In long format (an id column such as store or sku and repeated dates), one column is forecast per id: the one named value/sales/y/amount…, otherwise the last numeric column.

My data has gaps or several rows per day. Gaps are left as missing (the model handles them) unless you choose zero or "repeat previous" under Missing steps. Several rows in the same step are combined with Combine values (sum by default; use mean for prices or temperatures).

What if my input is empty or nothing can be forecast? The run still ends normally: you get free rows with errorType: "invalid_input" explaining why (too short, no numeric column, unreadable dates), and SUMMARY.status is NO_RESULTS. Nothing is charged.