Data API

Programmatic access to PaCE forecast data. Updated automatically on the 1st of each month.

API Endpoints

All URLs are stable and permanent. Only data content updates monthly.

Country Forecasts

6-month and 12-month ahead forecasts, updated monthly on the 1st.

GET https://forecastlab.org/data/forecasts/latest/forecasts_h6.csv
GET https://forecastlab.org/data/forecasts/latest/forecasts_h12.csv
GET https://forecastlab.org/data/forecasts/latest/Hist.csv
GET https://forecastlab.org/data/forecasts/latest/metadata.json

Grid Forecasts (PRIO-GRID)

Spatial forecasts by month. Replace {period} with YYYY-MM (e.g., 2026-03). For bulk downloads, see Grid Downloads below.

GET https://forecastlab.org/api/v1/grid/{period}/points-m1.json
GET https://forecastlab.org/api/v1/grid/{period}/points-m2.json
GET https://forecastlab.org/api/v1/grid/{period}/points-m3.json
GET https://forecastlab.org/api/v1/grid/{period}/points-m4.json
GET https://forecastlab.org/api/v1/grid/{period}/points-m5.json
GET https://forecastlab.org/api/v1/grid/{period}/points-m6.json

Historical Archive

Access any historical forecast period. Replace YYYY-MM with the desired period.

GET https://forecastlab.org/data/forecasts/archive/YYYY-MM/forecasts_h6.csv
GET https://forecastlab.org/data/forecasts/archive/YYYY-MM/forecasts_h12.csv
GET https://forecastlab.org/data/forecasts/archive/YYYY-MM/Hist.csv
GET https://forecastlab.org/data/forecasts/archive/YYYY-MM/metadata.json
GET https://forecastlab.org/data/forecasts/archive/YYYY-MM/forecasts-YYYY-MM.zip

Code Examples

Python

import pandas as pd

# Load latest 6-month forecasts
url = "https://forecastlab.org/data/forecasts/latest/forecasts_h6.csv"
df = pd.read_csv(url, index_col=0)

# Load metadata to understand forecast periods
metadata_url = "https://forecastlab.org/data/forecasts/latest/metadata.json"
metadata = pd.read_json(metadata_url, typ='series')
print(f"Forecast start: {metadata['forecast_start_date']}")

# Get forecasts for a specific country
afghanistan_forecast = df["Afghanistan"]
print(afghanistan_forecast)

R

library(readr)
library(jsonlite)

# Load latest 12-month forecasts
url <- "https://forecastlab.org/data/forecasts/latest/forecasts_h12.csv"
forecasts <- read_csv(url)

# Load metadata
metadata_url <- "https://forecastlab.org/data/forecasts/latest/metadata.json"
metadata <- fromJSON(metadata_url)
cat("Forecast start:", metadata$forecast_start_date, "\n")

# Extract specific country
syria_forecast <- forecasts$Syria

curl / wget

# Download latest forecasts
curl -O https://forecastlab.org/data/forecasts/latest/forecasts_h6.csv

# Download complete bundle for specific period
curl -O https://forecastlab.org/data/forecasts/archive/2026-03/forecasts-2026-03.zip

# Download grid forecast for month 1
curl "https://forecastlab.org/api/v1/grid/2026-03/points-m1.json" > grid_m1.json

JavaScript / Node.js

// Fetch grid forecast data
const response = await fetch(
  'https://forecastlab.org/api/v1/grid/2026-03/points-m1.json'
);
const gridData = await response.json();

// Fetch metadata
const metaResponse = await fetch(
  'https://forecastlab.org/data/forecasts/latest/metadata.json'
);
const metadata = await metaResponse.json();
console.log('Forecast period:', metadata.forecast_start_date);

Historical Archive

Complete archive of monthly forecasts from 1989-01 to present. Each period includes all forecast files, historical data, and metadata.

Data Formats

Metadata (JSON)

Contains forecast period information and data coverage details.

{
  "run_date": "2026-03-01T01:15:43.123456",
  "data_end_date": "2026-02",
  "forecast_start_date": "2026-03",
  "h6_end_date": "2026-08",
  "h12_end_date": "2027-02",
  "training_window_months": 24,
  "historical_start_date": "1989-01",
  "total_historical_months": 445
}

Forecast CSVs

Country-level forecasts with rows as forecast months and columns as countries.

  • Rows: 0-5 (h6) or 0-11 (h12), starting from forecast_start_date
  • Columns: Country names
  • Values: Predicted monthly fatalities
  • Variants: mean (default), min, max

Historical CSV

Observed fatality data from UCDP, 1989-present.

  • First column: Date (YYYY-MM-DD format)
  • Other columns: Country names
  • Values: Observed monthly fatalities

Grid JSON

GeoJSON FeatureCollection with point geometries for each grid cell.

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {"type": "Point", "coordinates": [lon, lat]},
      "properties": {"value": 2.34}
    }
  ]
}

Error Responses

404 Not Found

Requested period or file does not exist. Check available periods in the archive table.

429 Too Many Requests

Rate limit exceeded. Cache responses locally. Data updates monthly only.

503 Service Unavailable

Temporary server issue. Retry after a few minutes. Use GitHub fallback if persistent.

GitHub Fallback: If website endpoints are unavailable, use raw GitHub URLs:

https://raw.githubusercontent.com/conflictlab/Pace-map-risk/main/forecasts_h6.csv
https://raw.githubusercontent.com/conflictlab/Pace-map-risk/main/forecasts_h12.csv
https://raw.githubusercontent.com/conflictlab/Pace-map-risk/main/Hist.csv
https://raw.githubusercontent.com/conflictlab/Pace-map-risk/main/forecast_metadata.json

Grid Downloads

Bulk download options for grid forecasts (period 2026-03).

CSV Files

0 selected
Format
Monthly: lat,lon,value
Combined: lat,lon,m1,m2...m6

GeoJSON Files

0 selected
Format
Point geometries with forecast values

Usage & License

License

CC BY-NC 4.0 (Attribution-NonCommercial). For commercial use, contact us.

Rate Limits

Cache responses locally. Data updates monthly on the 1st only. Excessive requests may be rate-limited.

Update Schedule

Forecasts generated on the 24th and 1st at 01:00 UTC. Data available by 03:00 UTC same day.

Citation

Schincariol, T., Frank, H., & Chadefaux, T. (2025). Accounting for variability in conflict dynamics: A pattern-based predictive model. Journal of Peace Research. DOI: 10.1177/00223433251330790

See full citation guidelines.

Support

Questions, issues, or feature requests: