Back to Worldmonitor

World Monitor — API Reference

docs/Docs_To_Review/API_REFERENCE.md

2.5.2360.2 KB
Original Source

World Monitor — API Reference

Comprehensive reference for all Vercel Edge Function endpoints powering the World Monitor intelligence dashboard.

Base URL: All endpoints are relative to /api/ (e.g., https://worldmonitor.app/api/earthquakes).


Table of Contents


Quick Reference

MethodPathAuthCache TTLRate LimitDomain
GET/api/acledACLED_ACCESS_TOKEN + ACLED_EMAIL600 s10 req/minGeopolitical
GET/api/acled-conflictACLED_ACCESS_TOKEN + ACLED_EMAIL600 s10 req/minGeopolitical
GET/api/ucdpNone86 400 s (24 h)Geopolitical
GET/api/ucdp-eventsNone21 600 s (6 h)15 req/minGeopolitical
GET/api/gdelt-docNoneCDN 300 sGeopolitical
GET/api/gdelt-geoNoneCDN 300 sGeopolitical
GET/api/nga-warningsNoneCDN 3 600 sGeopolitical
POST/api/country-intelGROQ_API_KEY7 200 s (2 h)Geopolitical
GET/api/finnhubFINNHUB_API_KEYCDN 60 sMarkets
GET/api/yahoo-financeNoneCDN 60 sMarkets
GET/api/coingeckoNone120 sMarkets
GET/api/stablecoin-marketsNoneIn-mem 120 sMarkets
GET/api/etf-flowsFINNHUB_API_KEYIn-mem 900 sMarkets
GET/api/stock-indexNone3 600 s (1 h)Markets
GET/api/fred-dataFRED_API_KEY3 600 sMarkets
GET/api/macro-signalsFRED_API_KEY, FINNHUB_API_KEYIn-mem 300 sMarkets
GET/api/polymarketNone300 sMarkets
GET/api/openskyNoneCDN 15 sMilitary
GET/api/ais-snapshotWS_RELAY_URL3-tier 4–8 sMilitary
GET/api/theater-postureNone3-tier 5 min–7 dMilitary
GET/api/cyber-threatsABUSEIPDB_API_KEY (opt.)600 s20 req/minMilitary
GET/api/earthquakesNoneCDN 300 sNatural Events
GET/api/firms-firesNASA_FIRMS_API_KEY600 sNatural Events
GET/api/climate-anomaliesNone21 600 s (6 h)15 req/minNatural Events
POST/api/classify-batchGROQ_API_KEY86 400 s (24 h)AI / ML
GET/api/classify-eventGROQ_API_KEY86 400 s (24 h)AI / ML
POST/api/groq-summarizeGROQ_API_KEY3 600 sAI / ML
POST/api/openrouter-summarizeOPENROUTER_API_KEY3 600 sAI / ML
GET/api/cloudflare-outagesCLOUDFLARE_API_TOKEN600 sInfrastructure
GET/api/service-statusNoneIn-mem 60 sInfrastructure
GET/api/faa-statusNoneCDN 300 sInfrastructure
GET/api/unhcr-populationNone86 400 s (24 h)20 req/minHumanitarian
GET/api/hapiHDX_APP_IDENTIFIER (opt.)21 600 s (6 h)Humanitarian
GET/api/worldpop-exposureNone604 800 s (7 d)30 req/minHumanitarian
GET/api/worldbankNone86 400 s (24 h)Humanitarian
GET/api/rss-proxyNoneCDN 300 sContent
GET/api/hackernewsNoneCDN 300 sContent
GET/api/github-trendingGITHUB_TOKEN (opt.)3 600 sContent
GET/api/tech-eventsNone21 600 s (6 h)Content
GET/api/arxivNoneCDN 3 600 sContent
GET/api/versionGITHUB_TOKEN (opt.)CDN 600 sMeta
GET/api/cache-telemetryNoneno-storeMeta
GET/api/debug-envNoneMeta
GET/api/downloadNoneMeta
GET/api/og-storyNoneMeta
GET/api/storyNoneMeta
GET/api/risk-scoresNone600 sRisk
GET/POST/api/temporal-baselineNone7 776 000 s (90 d)Risk
GET/api/eia/*EIA_API_KEYCDN 3 600 sProxy
GET/api/pizzint/*NoneCDN 120 sProxy
GET/api/wingbits/*WINGBITS_API_KEYCDN 15–300 sProxy
GET/api/youtube/*NoneProxy

Overview

World Monitor exposes 60+ serverless endpoints deployed as Vercel Edge Functions (unless noted otherwise). Every endpoint:

  1. Applies CORS middleware — only whitelisted origins may call the API.
  2. Optionally applies IP-based rate limiting via a sliding-window algorithm.
  3. Leverages a multi-tier caching strategy: CDN edge (Cache-Control + s-maxage), Upstash Redis, and in-memory Maps.
  4. Returns JSON with consistent error envelopes (see Error Handling).

Common Response Headers

Access-Control-Allow-Origin: <origin>
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Cache-Control: public, s-maxage=<TTL>, stale-while-revalidate=<TTL*2>
Content-Type: application/json; charset=utf-8

Common Patterns

  • OPTIONS pre-flight: Every endpoint responds to OPTIONS with 204 + CORS headers.
  • Graceful degradation: When credentials are missing, most endpoints return { success: true, data: [] } or { unavailable: true } instead of erroring.
  • Query hashing: Composite cache keys use hashString() from _upstash-cache.js to generate deterministic hashes of query parameters.

Shared Middleware

All middleware modules live in the api/ directory, prefixed with _ to prevent Vercel from deploying them as standalone routes.


_cors.js

Cross-origin request gating applied to every endpoint.

Allowed Origin Patterns

Eight regex patterns control access:

#PatternMatches
1worldmonitor\.app$https://worldmonitor.app
2\.worldmonitor\.app$https://*.worldmonitor.app
3\.vercel\.app$Vercel preview deploys
4localhost(:\d+)?$http://localhost:*
5127\.0\.0\.1(:\d+)?$IPv4 loopback
6\[::1\](:\d+)?$IPv6 loopback
7tauri://localhostTauri desktop shell
8https://tauri\.localhostTauri (alternative scheme)

Exports

typescript
/** Returns CORS headers object for the given request and allowed methods. */
function getCorsHeaders(
  req: Request,
  methods?: string   // default "GET, OPTIONS"
): Record<string, string>;

/** Returns true if the request origin is NOT on the allowlist. */
function isDisallowedOrigin(req: Request): boolean;

Behaviour

  • getCorsHeaders reflects the request Origin back in Access-Control-Allow-Origin if it matches any pattern; otherwise the header is omitted.
  • isDisallowedOrigin returns true for origins matching none of the 8 patterns. Endpoints can use this to short-circuit with 403.

_cache-telemetry.js

Per-instance, in-memory cache telemetry recorder used to track HIT/MISS/STALE ratios per endpoint.

Exports

typescript
/** Record a cache outcome for a named endpoint. */
function recordCacheTelemetry(
  endpoint: string,
  outcome: "HIT" | "MISS" | "STALE"
): void;

/** Return the current telemetry snapshot. */
function getCacheTelemetrySnapshot(): Record<string, {
  hit: number;
  miss: number;
  stale: number;
  total: number;
  hitRate: number;   // 0–1 float
}>;

Configuration

ConstantDefaultDescription
MAX_ENDPOINTS128Max distinct endpoint keys tracked before oldest is evicted
LOG_EVERY50Console-log telemetry summary every N recordings

_ip-rate-limit.js

Sliding-window IP rate limiter with LRU cleanup, used by endpoints that call expensive or quota-limited upstream APIs.

Factory

typescript
function createIpRateLimiter(opts?: {
  limit?: number;              // default 60
  windowMs?: number;           // default 60_000 (1 min)
  maxEntries?: number;         // default 10_000
  cleanupIntervalMs?: number;  // default 300_000 (5 min)
}): {
  check(ip: string): { allowed: boolean; retryAfter?: number };
  size(): number;
};

Defaults

ParameterDefaultDescription
limit60Max requests per window
windowMs60 000Sliding window duration (ms)
maxEntries10 000Max tracked IPs before LRU eviction
cleanupIntervalMs300 000Interval for stale-entry cleanup (ms)

Behaviour

  • When check(ip) returns { allowed: false }, the endpoint responds with 429 Too Many Requests and the Retry-After header set to the number of seconds until the window resets.
  • LRU eviction ensures memory stays bounded on long-lived Edge instances.

_upstash-cache.js

Dual-mode distributed cache — Upstash Redis in production, in-memory Map with disk persistence in sidecar/local mode.

Mode Selection

Env VarModeBackend
UPSTASH_REDIS_REST_URL + UPSTASH_REDIS_REST_TOKEN setCloudUpstash Redis REST API
SIDECAR=trueSidecarIn-memory Map + disk persist to ./data/upstash-cache.json

Exports

typescript
/** Retrieve cached JSON by key. Returns null on miss. */
async function getCachedJson<T = unknown>(key: string): Promise<T | null>;

/** Store JSON with a TTL in seconds. */
async function setCachedJson(key: string, value: unknown, ttlSeconds: number): Promise<void>;

/** Batch-get multiple keys. Returns array in same order (null for misses). */
async function mget<T = unknown>(...keys: string[]): Promise<(T | null)[]>;

/** Deterministic hash for building cache keys. */
function hashString(str: string): string;

Sidecar Mode Details

ConstantValueDescription
MAX_PERSIST_ENTRIES5 000Max entries persisted to disk
Persist path./data/upstash-cache.jsonLocation of disk snapshot

In sidecar mode, entries are evicted LRU-style when the Map exceeds MAX_PERSIST_ENTRIES.
The disk snapshot is read on cold start and written periodically.


Endpoints by Domain


Geopolitical

Eight endpoints covering armed conflict, protest tracking, news intelligence, and maritime warnings.


GET /api/acled

ACLED protest and political violence events.

Query Parameters

ParamTypeDefaultDescription
countrystringISO country name filter (optional)
limitnumber500Max events to return

Auth & External API

Env VarRequiredUpstream URL
ACLED_ACCESS_TOKENYeshttps://api.acleddata.com/acled/read
ACLED_EMAILYes

Caching

LayerTTLKey
CDNs-maxage=600
Upstash600 sacled:{query_hash}

Rate Limit: 10 req/min via createIpRateLimiter

Response

typescript
interface AcledResponse {
  success: true;
  data: AcledEvent[];
}

interface AcledEvent {
  event_id_cnty: string;
  event_date: string;        // "YYYY-MM-DD"
  event_type: string;
  sub_event_type: string;
  actor1: string;
  country: string;
  latitude: number;
  longitude: number;
  fatalities: number;
  notes: string;
}

Error Responses

StatusCondition
429IP rate limit exceeded
500Upstream ACLED API failure
503Missing credentials — returns { success: true, data: [] } gracefully

GET /api/acled-conflict

ACLED conflict-specific events: battles, violence against civilians, explosions/remote violence.

Query Parameters

ParamTypeDefaultDescription
countrystringISO country name filter (optional)
limitnumber500Max events to return
daysnumber30Lookback window in days

Auth & External API

Env VarRequiredUpstream URL
ACLED_ACCESS_TOKENYeshttps://api.acleddata.com/acled/read (with event_type filter)
ACLED_EMAILYes

Caching

LayerTTLKey
CDNs-maxage=600
Upstash600 sacled-conflict:{query_hash}

Rate Limit: 10 req/min

Response: Same shape as /api/acled.


GET /api/ucdp

UCDP conflict catalog (paginated).

Query Parameters

ParamTypeDefaultDescription
pagenumber1Page number
pagesizenumber100Items per page

Auth & External API

Env VarRequiredUpstream URL
https://ucdpapi.pcr.uu.se/api/

Caching

LayerTTLKey
Upstash86 400 s (24 h)ucdp:{page}:{pagesize}

Response

typescript
interface UcdpCatalogResponse {
  Result: UcdpConflict[];
  TotalCount: number;
  NextPageUrl: string | null;
  PreviousPageUrl: string | null;
}

GET /api/ucdp-events

UCDP georeferenced events with automatic version discovery.

Query Parameters

ParamTypeDefaultDescription
pagesizenumber1000Items per page
pagenumber1Page number

Auth & External API

Env VarRequiredUpstream URL
https://ucdpapi.pcr.uu.se/api/gedevents/

The endpoint auto-discovers the current-year version of the UCDP GED dataset.

Caching

LayerTTLKey
Upstash21 600 s (6 h)ucdp-events:{version}:{page}:{pagesize}

Rate Limit: 15 req/min

Response

typescript
interface UcdpEventsResponse {
  Result: UcdpGeoEvent[];
}

interface UcdpGeoEvent {
  id: number;
  type_of_violence: number;   // 1=state, 2=non-state, 3=one-sided
  country: string;
  latitude: number;
  longitude: number;
  date_start: string;
  date_end: string;
  deaths_a: number;
  deaths_b: number;
  deaths_civilians: number;
  best: number;               // best estimate of total fatalities
}

GET /api/gdelt-doc

GDELT article search.

Query Parameters

ParamTypeDefaultDescription
querystring(required)Search query
modestring"ArtList"GDELT query mode
maxrecordsnumber75Max articles
timespanstring"2d"Lookback window
formatstring"json"Response format
sourcelangstringLanguage filter (optional)
domainstringDomain filter (optional)

Auth & External API

Env VarRequiredUpstream URL
https://api.gdeltproject.org/api/v2/doc/doc

Caching

LayerTTL
CDNs-maxage=300
Upstash— (not cached)

Response: Passthrough JSON from GDELT API.

Error Responses

StatusCondition
400Missing query parameter
502Upstream GDELT failure

GET /api/gdelt-geo

GDELT geographic data.

Query Parameters

ParamTypeDefaultDescription
querystring(required)Search query
formatstringGeoJSON, JSON, or CSV
timespanstringLookback window
modestringGDELT geo mode

Auth & External API

Env VarRequiredUpstream URL
https://api.gdeltproject.org/api/v2/geo/geo

Caching

LayerTTL
CDNs-maxage=300

Validation: Strict input validation on all parameters; malformed values are rejected.

Response: GeoJSON FeatureCollection (when format=GeoJSON) or raw JSON/CSV passthrough.


GET /api/nga-warnings

NGA maritime warnings.

Auth & External API

Env VarRequiredUpstream URL
https://msi.gs.mil/api/publications/broadcast-warn

Caching

LayerTTL
CDNs-maxage=3600

Response: Pure passthrough proxy — whatever the NGA API returns is forwarded as-is.


POST /api/country-intel

AI-generated country intelligence brief via Groq LLM.

Request Body (max 50 KB)

typescript
interface CountryIntelRequest {
  country: string;       // required — country name or ISO code
  context?: object;      // optional additional context for the LLM
}

Auth & External API

Env VarRequiredUpstream URL
GROQ_API_KEYYesGroq API (llama3 model)

Caching

LayerTTLKey
Upstash7 200 s (2 h)country-intel:{country_hash}

Response

typescript
interface CountryIntelResponse {
  brief: string;   // markdown-formatted intelligence brief
}

Error Responses

StatusCondition
400Missing country in request body
413Payload exceeds 50 KB
500LLM processing failure

Markets & Finance

Nine endpoints covering equities, crypto, macro signals, and prediction markets.


GET /api/finnhub

Batch stock quotes (max 20 symbols per request).

Query Parameters

ParamTypeDefaultDescription
symbolsstring(required)Comma-separated ticker symbols (max 20)

Auth & External API

Env VarRequiredUpstream URL
FINNHUB_API_KEYYeshttps://finnhub.io/api/v1/quote

Caching

LayerTTL
CDNs-maxage=60

Response

typescript
interface FinnhubResponse {
  [symbol: string]: {
    c: number;    // current price
    d: number;    // change (delta)
    dp: number;   // percent change (delta %)
    h: number;    // high of the day
    l: number;    // low of the day
    o: number;    // open price
    pc: number;   // previous close
    t: number;    // timestamp (unix)
  };
}

Error Responses

StatusCondition
400Missing symbols or more than 20 symbols
502Upstream Finnhub failure

GET /api/yahoo-finance

Single-symbol chart data from Yahoo Finance.

Query Parameters

ParamTypeDefaultDescription
symbolstring(required)Ticker symbol
rangestring"1d"Time range (1d, 5d, 1mo, 3mo, 6mo, 1y, 5y, max)
intervalstring"5m"Data interval (1m, 5m, 15m, 1d, 1wk, 1mo)

Auth & External API

Env VarRequiredUpstream URL
https://query1.finance.yahoo.com/v8/finance/chart/

Caching

LayerTTL
CDNs-maxage=60

Response: Passthrough chart data with OHLCV (open, high, low, close, volume) arrays.


GET /api/coingecko

Cryptocurrency prices and market data from CoinGecko (free tier).

Query Parameters

ParamTypeDefaultDescription
vs_currencystring"usd"Fiat currency for prices
idsstringComma-separated CoinGecko coin IDs (optional)
per_pagenumber50Results per page
sparklinebooleantrueInclude 7-day sparkline data

Auth & External API

Env VarRequiredUpstream URL
https://api.coingecko.com/api/v3/coins/markets

Caching

LayerTTLKey
Upstash120 scoingecko:{hash}

Response

typescript
type CoinGeckoResponse = CoinGeckoMarket[];

interface CoinGeckoMarket {
  id: string;
  symbol: string;
  name: string;
  current_price: number;
  market_cap: number;
  total_volume: number;
  price_change_24h: number;
  price_change_percentage_24h: number;
  sparkline_in_7d?: { price: number[] };
  // ...additional CoinGecko fields
}

GET /api/stablecoin-markets

Stablecoin health monitoring and depeg detection.

Auth & External API

Env VarRequiredUpstream URL
CoinGecko (specific stablecoin IDs: tether, usd-coin, dai, frax, trueusd, etc.)

Caching

LayerTTL
In-memory120 s

Response

typescript
interface StablecoinMarketsResponse {
  coins: StablecoinData[];
  timestamp: number;
  unavailable?: boolean;     // true when upstream is unreachable
}

interface StablecoinData {
  id: string;
  symbol: string;
  name: string;
  current_price: number;
  peg_deviation: number;     // deviation from $1.00
  price_change_24h: number;
  high_24h: number;
  low_24h: number;
  market_cap: number;
}

GET /api/etf-flows

Bitcoin spot ETF flow estimation across 10 major ETFs.

Tracked ETFs: IBIT, FBTC, GBTC, ARKB, BITB, HODL, BRRR, EZBC, BTCW, BTCO

Auth & External API

Env VarRequiredUpstream URL
FINNHUB_API_KEYYesFinnhub (volume-based flow estimation)

Caching

LayerTTL
In-memory900 s (15 min)

Response

typescript
interface ETFFlowsResponse {
  etfs: ETFFlow[];
  totalNetFlow: number;
  timestamp: number;
  unavailable?: boolean;
}

interface ETFFlow {
  symbol: string;
  name: string;
  volume: number;
  estimatedFlow: number;
  price: number;
}

GET /api/stock-index

Country-level stock indices for 42 countries.

Query Parameters

ParamTypeDefaultDescription
symbolsstringAll 42Comma-separated index symbols (optional)

Auth & External API

Env VarRequiredUpstream URL
Yahoo Finance (batch)

Caching

LayerTTLKey
Upstash3 600 s (1 h)stock-index:{hash}

Response

typescript
interface StockIndexResponse {
  indices: StockIndex[];
  timestamp: number;
}

interface StockIndex {
  symbol: string;
  name: string;
  country: string;
  price: number;
  change: number;
  changePercent: number;
}

GET /api/fred-data

FRED (Federal Reserve Economic Data) series observations.

Query Parameters

ParamTypeDefaultDescription
series_idstring(required)FRED series ID (e.g., DGS10, UNRATE)
limitnumber10Max observations
sort_orderstring"desc"Sort order (asc or desc)

Auth & External API

Env VarRequiredUpstream URL
FRED_API_KEYYeshttps://api.stlouisfed.org/fred/series/observations

Caching

LayerTTLKey
Upstash3 600 s (1 h)fred:{series_id}:{limit}

Response

typescript
interface FredDataResponse {
  observations: FredObservation[];
}

interface FredObservation {
  date: string;     // "YYYY-MM-DD"
  value: string;    // numeric string
}

GET /api/macro-signals

Six-source macro signal aggregation producing a BUY/CASH investment verdict.

Auth & External API

Env VarRequiredUpstream URLs
FRED_API_KEYYesFRED API
FINNHUB_API_KEYYes (partial)Finnhub
CoinGecko, alternative.me (Fear & Greed), blockchain.info

Caching

LayerTTL
In-memory300 s (5 min)

Response

typescript
interface MacroSignalsResponse {
  verdict: "BUY" | "CASH";
  confidence: number;          // 0–1
  signals: MacroSignal[];
  timestamp: number;
  unavailable?: boolean;
}

interface MacroSignal {
  name: string;
  // One of: liquidity, flowStructure, macroRegime,
  //         technicalTrend, hashRate, miningCost, fearGreed
  value: number;
  signal: "BUY" | "CASH" | "NEUTRAL";
  weight: number;
  source: string;
}

GET /api/polymarket

Prediction markets from Polymarket's Gamma API.

Query Parameters

ParamTypeDefaultDescription
limitnumber20Max markets to return
activebooleantrueOnly return active markets

Auth & External API

Env VarRequiredUpstream URL
https://gamma-api.polymarket.com/markets

Caching

LayerTTLKey
CDNs-maxage=300
Upstash300 sPolymarket cache key

Response

typescript
type PolymarketResponse = PredictionMarket[];

interface PredictionMarket {
  id: string;
  question: string;
  outcomePrices: string[];    // array of price strings
  volume: number;
  endDate: string;
  active: boolean;
}

Military & Security

Four endpoints covering aviation tracking, vessel tracking, theater readiness, and cyber threat intelligence.


GET /api/opensky

Real-time aircraft flight states within a geographic bounding box.

Query Parameters

ParamTypeDefaultDescription
laminnumber(required)Latitude min (south)
lominnumber(required)Longitude min (west)
lamaxnumber(required)Latitude max (north)
lomaxnumber(required)Longitude max (east)

Auth & External API

Env VarRequiredUpstream URL
https://opensky-network.org/api/states/all

Caching

LayerTTL
CDNs-maxage=15

Response

typescript
interface OpenSkyResponse {
  time: number;
  states: FlightState[][];
}

// FlightState tuple indices:
// [0]  icao24          string   – ICAO 24-bit address
// [1]  callsign        string   – callsign (trimmed)
// [2]  origin_country  string
// [3]  time_position   number   – unix timestamp
// [4]  last_contact    number   – unix timestamp
// [5]  longitude       number
// [6]  latitude        number
// [7]  baro_altitude   number   – barometric altitude (m)
// [8]  on_ground       boolean
// [9]  velocity        number   – m/s
// [10] true_track       number   – heading (degrees)
// [11] vertical_rate   number   – m/s
// [12] sensors         number[]
// [13] geo_altitude    number   – geometric altitude (m)
// [14] squawk          string
// [15] spi             boolean  – special purpose indicator
// [16] position_source number   – 0=ADS-B, 1=ASTERIX, 2=MLAT

GET /api/ais-snapshot

AIS vessel data from custom WebSocket relay.

Auth & External API

Env VarRequiredUpstream
WS_RELAY_URLYesCustom WebSocket relay (configurable)

Caching — 3-tier

LayerTTL
CDNs-maxage=8
Upstash8 s
In-memory4 s

Response

typescript
interface AISSnapshotResponse {
  vessels: AISVessel[];
  timestamp: number;
  count: number;
}

interface AISVessel {
  mmsi: number;
  name?: string;
  lat: number;
  lon: number;
  cog: number;       // course over ground
  sog: number;       // speed over ground (knots)
  heading?: number;
  shipType?: number;
  destination?: string;
  timestamp: number;
}

GET /api/theater-posture

Nine-theater military posture analysis combining aviation and Wingbits data.

Auth & External API

Env VarRequiredUpstream URLs
OpenSky Network, Wingbits API

Caching — 3-tier Upstash with graduated TTLs

KeyTTLPurpose
theater-posture:fresh300 s (5 min)Hot data
theater-posture:warm86 400 s (24 h)Warm fallback
theater-posture:cold604 800 s (7 d)Cold fallback

No per-request rate limit — the endpoint is aggressively cached.

Response

typescript
interface TheaterPostureResponse {
  theaters: TheaterPosture[];
  globalReadiness: number;     // 0–1 composite score
  timestamp: number;
}

interface TheaterPosture {
  region: string;              // e.g., "EUCOM", "INDOPACOM"
  alertLevel: string;          // "LOW" | "ELEVATED" | "HIGH" | "CRITICAL"
  flightActivity: number;
  assessment: string;          // human-readable assessment
}

GET /api/cyber-threats

Five-source cyber threat intelligence aggregation with geolocation hydration.

Auth & External API

Env VarRequiredUpstream URLs
ABUSEIPDB_API_KEYOptionalAbuseIPDB
Feodo Tracker, URLhaus, C2IntelFeeds, AlienVault OTX

Caching

LayerTTLKey
Upstash600 s (10 min)cyber-threats:v2

Rate Limit: 20 req/min

Response

typescript
interface CyberThreatsResponse {
  threats: CyberThreat[];
  sources: string[];
  timestamp: number;
}

interface CyberThreat {
  ip: string;
  type: string;           // "botnet" | "c2" | "malware" | "scanner" | ...
  source: string;         // originating feed
  country: string;
  latitude: number;
  longitude: number;
  confidence: number;     // 0–100
  tags: string[];
}

Natural Events

Three endpoints for seismology, active fires, and climate anomaly data.


GET /api/earthquakes

USGS earthquakes M4.5+ for the past week (GeoJSON).

Auth & External API

Env VarRequiredUpstream URL
https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/4.5_week.geojson

Caching

LayerTTL
CDNs-maxage=300

Response: Standard USGS GeoJSON FeatureCollection.

typescript
interface EarthquakeFeature {
  type: "Feature";
  properties: {
    mag: number;
    place: string;
    time: number;          // unix ms
    url: string;
    tsunami: number;       // 0 or 1
    type: string;
  };
  geometry: {
    type: "Point";
    coordinates: [number, number, number];  // [lon, lat, depth_km]
  };
}

GET /api/firms-fires

NASA FIRMS satellite fire detections across 9 global regions.

Query Parameters

ParamTypeDefaultDescription
regionstringAll 9 regionsSpecific region filter (optional)
daysnumber1Lookback in days

Auth & External API

Env VarRequiredUpstream URL
NASA_FIRMS_API_KEYYeshttps://firms.modaps.eosdis.nasa.gov/api/area/csv/

Caching

LayerTTLKey
Upstash600 sPer-region key

Response

typescript
interface FIRMSResponse {
  fires: FIRMSFire[];
  count: number;
  regions: string[];
}

interface FIRMSFire {
  latitude: number;
  longitude: number;
  brightness: number;
  frp: number;              // fire radiative power (MW)
  confidence: string;       // "low" | "nominal" | "high"
  acq_date: string;         // "YYYY-MM-DD"
  acq_time: string;         // "HHMM" UTC
  satellite: string;        // "MODIS" | "VIIRS" | ...
}

GET /api/climate-anomalies

Temperature and precipitation anomalies for 15 global climate zones.

Auth & External API

Env VarRequiredUpstream URL
NOAA Climate Monitoring

Caching

LayerTTLKey
Upstash21 600 s (6 h)climate-anomalies:v1

Rate Limit: 15 req/min

Response

typescript
interface ClimateAnomaliesResponse {
  zones: ClimateZone[];
  globalAnomaly: number;
  timestamp: number;
}

interface ClimateZone {
  name: string;
  tempAnomaly: number;       // °C above/below baseline
  precipAnomaly: number;     // mm above/below baseline
  severity: string;          // "normal" | "moderate" | "severe" | "extreme"
}

AI / ML

Four endpoints for LLM-powered classification and summarization.


POST /api/classify-batch

Batch threat/event classification (max 20 items per request).

Request Body

typescript
interface ClassifyBatchRequest {
  items: ClassifyItem[];     // max 20
}

interface ClassifyItem {
  title: string;
  description?: string;
}

Auth & External API

Env VarRequiredUpstream
GROQ_API_KEYYesGroq (llama3)

Caching

LayerTTLKey
Upstash86 400 s (24 h)Per-item hash

Response

typescript
interface ClassifyBatchResponse {
  results: Classification[];
}

interface Classification {
  category: string;
  severity: string;         // "low" | "medium" | "high" | "critical"
  confidence: number;       // 0–1
  tags: string[];
}

GET /api/classify-event

Single event classification.

Query Parameters

ParamTypeDefaultDescription
titlestring(required)Event title
descriptionstringEvent description (optional)

Auth & External API

Env VarRequiredUpstream
GROQ_API_KEYYesGroq (llama3)

Caching

LayerTTLKey
Upstash86 400 s (24 h)classify:{hash}

Response

typescript
interface ClassifyEventResponse {
  category: string;
  severity: string;
  confidence: number;
  tags: string[];
}

POST /api/groq-summarize

News article summarization via Groq LLM (primary).

Request Body (max 50 KB)

typescript
interface SummarizeRequest {
  text: string;          // article text to summarize
  type?: string;         // content type hint
  panelId?: string;      // originating panel identifier
}

Auth & External API

Env VarRequiredUpstream
GROQ_API_KEYYesGroq API

Caching

LayerTTLKey
Upstash3 600 s (1 h)summary:{hash} (shared with openrouter-summarize)

Note: The cache key is shared with /api/openrouter-summarize — a summary cached by one endpoint is served by the other.

Response

typescript
interface SummarizeResponse {
  summary: string;
}

POST /api/openrouter-summarize

Fallback summarization via free-tier OpenRouter models.

Request Body: Same as /api/groq-summarize (max 50 KB).

Auth & External API

Env VarRequiredUpstream
OPENROUTER_API_KEYYesOpenRouter (free-tier models)

Caching

LayerTTLKey
Upstash3 600 s (1 h)summary:{hash} (shared with groq-summarize)

Response: Same as /api/groq-summarize.


Infrastructure

Three endpoints for monitoring internet outages, service health, and airspace status.


GET /api/cloudflare-outages

Cloudflare Radar internet outage annotations.

Auth & External API

Env VarRequiredUpstream URL
CLOUDFLARE_API_TOKENYeshttps://api.cloudflare.com/client/v4/radar/annotations/outages

Caching

LayerTTL
CDNs-maxage=600
Upstash600 s

Response

typescript
interface CloudflareOutagesResponse {
  outages: CloudflareOutage[];
  count: number;
}

interface CloudflareOutage {
  id: string;
  name: string;
  scope: string;
  asns: number[];
  locations: string[];
  startDate: string;
  endDate?: string;
  eventType: string;
}

GET /api/service-status

Aggregated operational status of 33 major internet services.

Auth & External API

Env VarRequiredUpstream URLs
33 public status pages (*.statuspage.io, status.*)

Monitored Services (selection): GitHub, Cloudflare, AWS, Stripe, Vercel, Datadog, PagerDuty, Twilio, Heroku, Atlassian, npm, PyPI, and more.

Caching

LayerTTL
CDNs-maxage=60
In-memory60 s

Response

typescript
interface ServiceStatusResponse {
  services: ServiceStatus[];
}

interface ServiceStatus {
  name: string;
  status: "operational" | "degraded" | "major" | "critical";
  url: string;
  indicator: string;
}

GET /api/faa-status

FAA National Airspace System status.

Auth & External API

Env VarRequiredUpstream URL
https://soa.smext.faa.gov/asws/api/airport/status (XML)

Caching

LayerTTL
CDNs-maxage=300

Response: XML-to-JSON passthrough of FAA airport status data.


Humanitarian

Four endpoints covering refugee displacement, conflict events, population exposure, and development indicators.


GET /api/unhcr-population

UNHCR displacement data (paginated).

Query Parameters

ParamTypeDefaultDescription
yearnumberFilter by year (optional)
limitnumber100Results per page
pagenumber1Page number

Auth & External API

Env VarRequiredUpstream URL
https://api.unhcr.org/population/v1/

Caching

LayerTTLKey
Upstash86 400 s (24 h)unhcr:{hash}

Rate Limit: 20 req/min

Response

typescript
interface UNHCRResponse {
  items: DisplacementRecord[];
  pagination: {
    page: number;
    pages: number;
    total: number;
  };
}

interface DisplacementRecord {
  year: number;
  country_of_origin: string;
  country_of_asylum: string;
  refugees: number;
  asylum_seekers: number;
  internally_displaced: number;
  stateless: number;
}

GET /api/hapi

HDX HAPI (Humanitarian API) conflict events.

Query Parameters

ParamTypeDefaultDescription
limitnumber1000Max events to return

Auth & External API

Env VarRequiredUpstream URL
HDX_APP_IDENTIFIEROptionalhttps://hapi.humdata.org/api/v2/coordination/conflict-event

Caching

LayerTTL
Upstash21 600 s (6 h)

Response

typescript
interface HapiResponse {
  data: HapiConflictEvent[];
}

interface HapiConflictEvent {
  event_type: string;
  admin1: string;
  admin2: string;
  location_name: string;
  country: string;
  date: string;
  fatalities: number;
  latitude: number;
  longitude: number;
}

GET /api/worldpop-exposure

Population exposure analysis for conflict zones, earthquakes, floods, and fires.

Query Parameters

ParamTypeDefaultDescription
countrystring(required)ISO 3166-1 alpha-3 code
modestring(required)Analysis mode: conflict, earthquake, flood, or fire

Auth & External API

Env VarRequiredUpstream URL
WorldPop (raster data)

Caching

LayerTTLKey
Upstash604 800 s (7 d)worldpop:{country}:{mode}

Rate Limit: 30 req/min

Response

typescript
interface PopulationExposure {
  country: string;
  mode: "conflict" | "earthquake" | "flood" | "fire";
  exposedPopulation: number;
  totalPopulation: number;
  percentage: number;         // 0–100
}

GET /api/worldbank

World Bank development indicators for 47 countries.

Query Parameters

ParamTypeDefaultDescription
indicatorstring(required)World Bank indicator code (e.g., NY.GDP.MKTP.CD)
countrystringAll 47ISO country code filter (optional)

Auth & External API

Env VarRequiredUpstream URL
https://api.worldbank.org/v2/

Caching

LayerTTL
Upstash86 400 s (24 h)

Response

typescript
interface WorldBankResponse {
  data: WorldBankIndicator[];
}

interface WorldBankIndicator {
  country: { id: string; value: string };
  date: string;
  value: number | null;
  indicator: { id: string; value: string };
}

Content

Five endpoints for news feeds, trending repositories, tech events, and research papers.


GET /api/rss-proxy

RSS/Atom feed proxy with a domain allowlist (~150 domains).

Query Parameters

ParamTypeDefaultDescription
urlstring(required)Full RSS/Atom feed URL

Auth & External API

Env VarRequiredUpstream
The URL provided (if domain is on allowlist)

Caching

LayerTTL
CDNs-maxage=300

Security

  • ~150 allowed domains hardcoded in the endpoint
  • Requests to non-allowed domains are rejected with 403
  • 12-second fetch timeout

Response: Raw RSS/Atom XML passthrough with appropriate Content-Type.

Error Responses

StatusCondition
400Missing url parameter
403Domain not on allowlist
504Upstream fetch timeout (> 12 s)

GET /api/hackernews

Hacker News stories feed.

Query Parameters

ParamTypeDefaultDescription
typestring"top"Feed type: top, new, best, ask, show, job
limitnumber30Max stories to return

Auth & External API

Env VarRequiredUpstream URL
https://hacker-news.firebaseio.com/v0/

Caching

LayerTTL
CDNs-maxage=300

Response

typescript
type HackerNewsResponse = HNStory[];

interface HNStory {
  id: number;
  title: string;
  url?: string;
  score: number;
  by: string;
  time: number;            // unix timestamp
  descendants: number;     // comment count
}

GET /api/github-trending

GitHub trending repositories.

Query Parameters

ParamTypeDefaultDescription
sincestring"daily"Time window: daily, weekly, monthly
languagestringProgramming language filter (optional)

Auth & External API

Env VarRequiredUpstream URL
GITHUB_TOKENOptional (higher rate limits)GitHub API v3 (search/repositories) + HTML scrape fallback

Caching

LayerTTL
Upstash3 600 s (1 h)

Response

typescript
type GitHubTrendingResponse = TrendingRepo[];

interface TrendingRepo {
  name: string;
  owner: string;
  description: string;
  stars: number;
  forks: number;
  language: string | null;
  todayStars: number;
  url: string;
}

GET /api/tech-events

Tech conferences and events with automated geocoding.

Query Parameters

ParamTypeDefaultDescription
daysnumber90Forward-looking window in days
limitnumber50Max events to return

Auth & External API

Env VarRequiredUpstream
Scraped from tech event sources

Caching

LayerTTL
Upstash21 600 s (6 h)

Response

typescript
type TechEventsResponse = TechEvent[];

interface TechEvent {
  name: string;
  date: string;
  location: string;
  lat: number;
  lng: number;
  category: string;
  url: string;
}

Note: The endpoint includes a 500+ city geocoding lookup table for resolving event locations to coordinates.


GET /api/arxiv

ArXiv research paper search (XML passthrough).

Query Parameters

ParamTypeDefaultDescription
search_querystring(required)ArXiv query string
max_resultsnumber10Max papers to return

Auth & External API

Env VarRequiredUpstream URL
https://export.arxiv.org/api/query

Caching

LayerTTL
CDNs-maxage=3600

Response: XML Atom feed passthrough (Content-Type: application/xml).


Meta

Six utility endpoints for version checking, telemetry, downloads, and social sharing.


GET /api/version

Latest GitHub release version info.

Auth & External API

Env VarRequiredUpstream
GITHUB_TOKENOptionalGitHub Releases API

Caching

LayerTTL
CDNs-maxage=600

Response

typescript
interface VersionResponse {
  version: string;           // e.g., "1.4.2"
  url: string;               // release page URL
  published_at: string;      // ISO 8601 date
}

GET /api/cache-telemetry

In-memory cache telemetry snapshot (diagnostic).

Caching: Cache-Control: no-store — never cached.

Response: Output of getCacheTelemetrySnapshot() — per-endpoint hit/miss/stale counts and hit rates. See _cache-telemetry.js for the schema.


GET /api/debug-env

Dead endpoint — always returns 404.

Response

json
{ "error": "Not available" }

Status: 404


GET /api/download

Platform-specific desktop installer redirect.

Query Parameters

ParamTypeDefaultDescription
platformstring(required)Target platform: macos-arm64, macos-x64, windows, linux

Response: 302 redirect to the corresponding GitHub release asset URL.


GET /api/og-story

SVG social preview card generator.

Runtime: Node.js (NOT Edge Function)

Query Parameters

ParamTypeDefaultDescription
titlestringCard title
subtitlestringCard subtitle
variantstringVisual variant (optional)

Response: SVG image (Content-Type: image/svg+xml).


GET /api/story

OG meta page for social sharing — serves HTML with Open Graph tags to crawlers and redirects real users.

Runtime: Node.js (NOT Edge Function)

Query Parameters

ParamTypeDefaultDescription
idstring(required)Story ID

Response:

  • Bot user-agents: HTML page with <meta property="og:*"> tags
  • Real browsers: 302 redirect to the dashboard with the story pre-selected

Risk & Baseline

Two endpoints for pre-computed risk scores and temporal statistical baselines.


GET /api/risk-scores

Pre-computed Country Instability Index (CII) for 20 Tier-1 countries.

Auth & External API

Env VarRequiredUpstream
Pre-computed (no external calls at request time)

Caching

LayerTTLKey
Upstash600 s (10 min)risk-scores:v1

Response

typescript
interface RiskScoresResponse {
  scores: RiskScore[];
  timestamp: number;
}

interface RiskScore {
  country: string;
  countryCode: string;
  cii: number;                // Country Instability Index (0–100)
  components: {
    conflict: number;
    economic: number;
    governance: number;
    social: number;
  };
  trend: "improving" | "stable" | "deteriorating";
}

GET /api/temporal-baseline / POST /api/temporal-baseline

Welford's online algorithm for maintaining streaming temporal baselines.

GET — Read Baseline

Query Parameters

ParamTypeDefaultDescription
keystring(required)Baseline key

Response

typescript
interface BaselineReadResponse {
  mean: number;
  variance: number;
  stddev: number;
  count: number;
  lastUpdated: string;      // ISO 8601
}
POST — Update Baseline

Request Body

typescript
interface BaselineUpdateRequest {
  key: string;
  value: number;
}

Response

typescript
interface BaselineUpdateResponse {
  updated: true;
  stats: {
    mean: number;
    variance: number;
    stddev: number;
    count: number;
  };
}

Caching

LayerTTLKey
Upstash7 776 000 s (90 d)baseline:{key}

Proxy / Passthrough Subdirectories

Four catch-all proxy groups that forward requests to external APIs, injecting credentials where needed.


GET /api/eia/*

EIA (Energy Information Administration) energy data proxy.

Auth & External API

Env VarRequiredUpstream URL
EIA_API_KEYYeshttps://api.eia.gov/v2/ — path suffix is appended

Caching

LayerTTL
CDNs-maxage=3600

Behaviour: The API key is injected server-side; the request path after /api/eia/ is forwarded to the EIA API verbatim.


GET /api/pizzint/*

Proxy to pizzint.watch intelligence APIs.

Endpoints

PathPurpose
/api/pizzint/dashboard-dataDashboard data
/api/pizzint/gdelt/batchGDELT batch queries

Auth & External API

Env VarRequiredUpstream URL
https://pizzint.watch/

Caching

LayerTTL
CDNs-maxage=120

GET /api/wingbits/*

Wingbits aircraft tracking data proxy.

Endpoints

PathCache TTLPurpose
/api/wingbits/flightss-maxage=15Live flight positions
/api/wingbits/detailss-maxage=300Aircraft details
/api/wingbits/batchs-maxage=15Batch flight queries

Auth & External API

Env VarRequiredUpstream URL
WINGBITS_API_KEYYeshttps://data.wingbits.com/

GET /api/youtube/*

YouTube integration endpoints.

Endpoints

PathPurposeResponse
/api/youtube/embedHTML embed player pageHTML document
/api/youtube/liveChannel live video scraper{ videoId: string }

Auth: None — uses public YouTube pages.


Error Handling

All endpoints return errors in a consistent JSON envelope:

typescript
interface ErrorResponse {
  error: string;               // human-readable message
  status?: number;             // HTTP status code (sometimes included)
  details?: string;            // additional context (dev-mode only)
}

Standard HTTP Status Codes

StatusMeaningCommon Trigger
400Bad RequestMissing or invalid required parameters
403ForbiddenCORS origin not on allowlist
404Not FoundInvalid endpoint path
405Method Not AllowedWrong HTTP method (e.g., POST to a GET-only endpoint)
413Payload Too LargeRequest body exceeds size limit (e.g., 50 KB for LLM endpoints)
429Too Many RequestsIP rate limit exceeded — includes Retry-After header
500Internal Server ErrorUnhandled exception or upstream processing failure
502Bad GatewayUpstream API returned an error
503Service UnavailableMissing credentials; some endpoints degrade gracefully
504Gateway TimeoutUpstream API did not respond within timeout

Graceful Degradation

Many endpoints are designed to never hard-fail on credential or upstream issues:

  • Missing ACLED_* credentials → { success: true, data: [] }
  • Unreachable upstream → { unavailable: true, ... } with stale cached data when available
  • The 3-tier cache (fresh → warm → cold) ensures theater-posture almost always returns data

Rate Limiting

Global Defaults

The default rate limiter configuration (from _ip-rate-limit.js):

ParameterValue
Requests per window60
Window duration60 seconds
Max tracked IPs10 000
Cleanup interval5 minutes

Per-Endpoint Overrides

EndpointLimitWindow
/api/acled10 req1 min
/api/acled-conflict10 req1 min
/api/ucdp-events15 req1 min
/api/climate-anomalies15 req1 min
/api/cyber-threats20 req1 min
/api/unhcr-population20 req1 min
/api/worldpop-exposure30 req1 min

Rate Limit Response

http
HTTP/1.1 429 Too Many Requests
Retry-After: 42
Content-Type: application/json

{
  "error": "Rate limit exceeded",
  "retryAfter": 42
}

Caching Architecture

World Monitor uses a multi-tier caching strategy to minimize upstream API calls, reduce latency, and stay within third-party rate limits.

Tier Overview

┌──────────────────────────────────────────────────┐
│                   Client                         │
└──────────────────┬───────────────────────────────┘
                   │
┌──────────────────▼───────────────────────────────┐
│  Tier 1: Vercel CDN Edge Cache                   │
│  ─────────────────────────────────               │
│  • Cache-Control: s-maxage=<TTL>                 │
│  • stale-while-revalidate=<TTL*2>                │
│  • Fastest — zero origin hit on cache hit        │
│  • TTLs: 15 s (real-time) to 3600 s (static)    │
└──────────────────┬───────────────────────────────┘
                   │ (CDN MISS)
┌──────────────────▼───────────────────────────────┐
│  Tier 2: Upstash Redis                           │
│  ─────────────────────────────────               │
│  • Distributed, shared across all Edge instances │
│  • Key-value with per-key TTL                    │
│  • Used for expensive/quota-limited upstreams    │
│  • TTLs: 120 s (crypto) to 7 776 000 s (90 d)   │
│  • Sidecar mode: in-memory Map + disk persist    │
└──────────────────┬───────────────────────────────┘
                   │ (Upstash MISS)
┌──────────────────▼───────────────────────────────┐
│  Tier 3: In-Memory Map (per-instance)            │
│  ─────────────────────────────────               │
│  • Process-local, fastest read path              │
│  • Used as write-through for hot endpoints       │
│  • Bounded by MAX_PERSIST_ENTRIES (5000)         │
│  • Survives within a single Edge invocation      │
└──────────────────┬───────────────────────────────┘
                   │ (All MISS)
┌──────────────────▼───────────────────────────────┐
│  Origin: External API                            │
│  ─────────────────────────────────               │
│  • Actual upstream fetch                         │
│  • Result written back to all applicable tiers   │
└──────────────────────────────────────────────────┘

Cache Key Conventions

PatternExampleUsed By
{endpoint}:{hash}acled:a1b2c3d4Most endpoints
{endpoint}:{param}:{param}ucdp:1:100Simple paginators
{endpoint}:v{N}cyber-threats:v2Versioned caches
{endpoint}:{tier}theater-posture:freshMulti-tier graduated
summary:{hash}summary:e5f6g7h8Shared across groq + openrouter
baseline:{key}baseline:earthquake-rateTemporal baselines

Cache Telemetry

The _cache-telemetry.js module records HIT/MISS/STALE per endpoint, accessible via GET /api/cache-telemetry. This provides per-instance visibility into cache performance:

json
{
  "acled": { "hit": 142, "miss": 8, "stale": 3, "total": 153, "hitRate": 0.928 },
  "earthquakes": { "hit": 891, "miss": 12, "stale": 0, "total": 903, "hitRate": 0.987 }
}

TTL Reference Table

TTLDurationEndpoints
8–15 sReal-timeais-snapshot, opensky, wingbits/flights
60 s1 minfinnhub, yahoo-finance, service-status
120 s2 mincoingecko, stablecoin-markets, pizzint/*
300 s5 mingdelt-doc, gdelt-geo, rss-proxy, hackernews, polymarket, theater-posture:fresh
600 s10 minacled, acled-conflict, firms-fires, cyber-threats, cloudflare-outages, risk-scores, version
900 s15 minetf-flows
3 600 s1 hnga-warnings, stock-index, fred-data, groq-summarize, openrouter-summarize, github-trending, arxiv, eia/*
7 200 s2 hcountry-intel
21 600 s6 hucdp-events, climate-anomalies, hapi, tech-events
86 400 s24 hucdp, unhcr-population, worldbank, classify-batch, classify-event, theater-posture:warm
604 800 s7 dworldpop-exposure, theater-posture:cold
7 776 000 s90 dtemporal-baseline

Environment Variables Reference

Complete list of environment variables used across all endpoints:

VariableRequired ByDescription
ACLED_ACCESS_TOKENacled, acled-conflictACLED API access token
ACLED_EMAILacled, acled-conflictACLED registered email
ABUSEIPDB_API_KEYcyber-threats (optional)AbuseIPDB API key
CLOUDFLARE_API_TOKENcloudflare-outagesCloudflare Radar API token
EIA_API_KEYeia/*EIA energy data API key
FINNHUB_API_KEYfinnhub, etf-flows, macro-signalsFinnhub stock data API key
FRED_API_KEYfred-data, macro-signalsFRED economic data API key
GITHUB_TOKENversion, github-trending (optional)GitHub API token for higher rate limits
GROQ_API_KEYclassify-batch, classify-event, groq-summarize, country-intelGroq LLM API key
HDX_APP_IDENTIFIERhapi (optional)HDX HAPI app identifier
NASA_FIRMS_API_KEYfirms-firesNASA FIRMS fire data API key
OPENROUTER_API_KEYopenrouter-summarizeOpenRouter API key
UPSTASH_REDIS_REST_URL_upstash-cache (cloud mode)Upstash Redis REST endpoint
UPSTASH_REDIS_REST_TOKEN_upstash-cache (cloud mode)Upstash Redis REST token
WINGBITS_API_KEYwingbits/*Wingbits aircraft data API key
WS_RELAY_URLais-snapshotAIS WebSocket relay URL
SIDECAR_upstash-cache (sidecar mode)Set to "true" for local disk-backed cache