Skip to main content

API Reference

Complete reference documentation for the Snowtrail API.


Try the API

Explore the live API with interactive documentation at api.snowtrail.ai/docs

Base URL

https://api.snowtrail.ai/

Authentication

All requests must include your API key in the x-api-key header:

x-api-key: your-api-key

Products & Endpoints

All data access is through typed product endpoints. The endpoint pattern is:

GET /{product_id}/{dataset_name}

The following products are available:

ProductEndpoint PrefixDescription
GBSI-US/gbsi_us/Gas Balance Stress Index - US
GBSI-EU/gbsi_eu/Gas Balance Stress Index - EU
PEMI/pemi/Power Event Market Intelligence
GLMI/glmi/Global LNG Marginality Index
WRSI/wrsi/Weather Risk Stress Index
WSSI-US/wssi_us/Weather Storage Shock Index

Each product exposes named dataset endpoints. For example:

GET /gbsi_us/system_stress
GET /gbsi_us/balance_momentum
GET /gbsi_us/storage_surprise
GET /gbsi_eu/system_stress?country=DE
GET /pemi/grid_stress?bidding_zone=DE-LU
GET /glmi/marginality?basin=atlantic
GET /wrsi/forecast_stress?geography=US
GET /wssi_us/demand_shock?region_id=ERCOT
GET /gbsi_us/backtest_summary

Query Parameters

The following query parameters are available on all product endpoints:

ParameterTypeDefaultDescription
latestbooltrueReturn most recent records
date_fromdate (YYYY-MM-DD)n/aFilter from date (overrides latest)
date_todate (YYYY-MM-DD)n/aFilter to date
limitint200Maximum number of rows to return
cursorstringn/aPagination cursor from a previous response
as_ofdate (YYYY-MM-DD)n/aPoint-in-time date. Returns only rows whose str_effective_at is on or before this date, i.e. data that had become knowable by then. Enables backtest-safe queries. See Point-in-Time Integrity

Product-Specific Filters

Some products accept additional filter parameters:

ProductParameterTypeExampleDescription
GBSI-EUcountrystringDE, FR, NLFilter by country
PEMIbidding_zonestringFilter by bidding zone
GLMIbasinstringatlantic, pacific, middle_eastFilter by LNG basin
WRSIgeographystringUS, ERCOTFilter by geography
WRSIregion_typestringFilter by region type
WSSI-USregion_idstringFilter by region identifier
WSSI-USregion_typestringFilter by region type

Example Request

curl -H "x-api-key: your-api-key" \
"https://api.snowtrail.ai/gbsi_us/system_stress?date_from=2024-01-01&date_to=2024-06-30&as_of=2024-03-15&limit=50"

Pagination

When a response contains more rows than the limit, the has_more field will be true and next_cursor will contain a cursor token. Pass it as the cursor parameter in the next request to retrieve the following page:

curl -H "x-api-key: your-api-key" \
"https://api.snowtrail.ai/gbsi_us/system_stress?date_from=2024-01-01&limit=50&cursor=eyJsYXN0X2lkIjogNTB9"

Response Format

{
"product_id": "gbsi_us",
"count": 100,
"has_more": true,
"next_cursor": "eyJsYXN0X2lkIjogMTAwfQ",
"data": [...],
"metadata": {
"retrieved_at": "2026-01-24T15:00:00Z",
"total_count": 250,
"record_id": "req_abc123",
"data_latest_date": "2026-01-24",
"data_age_hours": 0.5
}
}

HTTP Status Codes

CodeDescription
200Success
400Bad Request
401Unauthorized (missing or invalid API key)
403Forbidden
404Not Found
429Rate Limit Exceeded
500Internal Server Error