The live, cross-domain state of Earth — in one call
Earthpulse already integrates ~30 authoritative feeds into one normalized, geolocated view. /api/snapshot exposes that as an open read API so you can ask cross-domain questions — “which populations are breathing wildfire smoke right now?” — without wiring up a dozen sources yourself.
The endpoint
GET /api/snapshotReturns every current event across these kinds, each with lat, lng, a normalized time, the upstream source, and the feed’s own fields:
quake · storm · fire · air · volcano · disaster · tornado · tsunami · event
Query params
kinds— comma-separated subset, e.g.kinds=fire,air,quakebbox—minLng,minLat,maxLng,maxLatspatial filtersince— ISO date or epoch ms; drops timestamped items older than thisformat—json(default) orgeojson(drops into QGIS / geopandas / Kepler.gl)
Worked example: who’s breathing wildfire smoke?
Pull fires + air-quality in one call and join by proximity — a cross-domain question that’s a few lines instead of two API integrations:
const snap = await (
await fetch("https://earthpulse-teal.vercel.app/api/snapshot?kinds=fire,air")
).json();
const fires = snap.events.filter((e) => e.kind === "fire");
const badAir = snap.events.filter((e) => e.kind === "air" && e.aqi >= 150);
const km = (a, b, c, d) => {
const R = 6371, r = (x) => (x * Math.PI) / 180;
const p = Math.sin(r(c - a) / 2) ** 2 +
Math.cos(r(a)) * Math.cos(r(c)) * Math.sin(r(d - b) / 2) ** 2;
return 2 * R * Math.asin(Math.sqrt(p));
};
// unhealthy-air stations with an active fire within 150 km (likely smoke)
const exposed = badAir.filter((s) =>
fires.some((f) => km(s.lat, s.lng, f.lat, f.lng) <= 150)
);Provenance & licensing
Every event carries its source, and the response’s sources object lists each feed’s license and URL. Terms vary by feed (USGS/NOAA/NASA are public domain; AQICN is CC BY-NC-SA with attribution required) — respect the upstream license for the kinds you use.
Caveats — read before citing
- Some feeds are sampled. Fire and air are thinned for the globe (flagged
sampled: trueinsources). Treat counts as indicative, not exhaustive — full-fidelity access is on the roadmap. - Proximity isn’t causation. A fire near a polluted station is a signal to investigate, not proof — wind and dispersion decide actual exposure.
- It’s a “right now” mirror. No history yet; poll to build your own time series (a persistent archive is planned).