API Reference
v0.7Source-aware GeoBrief API. Deterministic location intelligence from open hazard, infrastructure, exposure, environmental, and humanitarian datasets.
1. Overview
The Archivist API takes a city name or coordinate pair and returns a structured GeoBrief — a source-aware location intelligence report built from open satellite, weather, seismic, infrastructure, exposure, and humanitarian datasets. It is deterministic, not an AI text generator.
Every response labels which layers ran live, which were served from cache, which were skipped by the selected profile, and which were unavailable. Official alerts are separated from model-derived signals. Source limitations are included in the report, not hidden.
2. Quickstart
Create a free account, generate an API key from the Dashboard, and start requesting GeoBriefs immediately. The Playground can be previewed without an API key, but report generation requires a free account.
API request (with key)
curl "https://archivistgeo.com/api/report?query=Berlin&mode=standard" \ -H "Authorization: Bearer <your_api_key>"
Coordinate input
curl "https://archivistgeo.com/api/report?query=48.856%2C2.352&mode=standard"
FULL profile (Pro subscription required)
curl "https://archivistgeo.com/api/report?query=Rotterdam&mode=full" \ -H "Authorization: Bearer <your_api_key>"
Use mode=standard for most developer use cases — it includes weather, terrain, air quality, seismic, infrastructure, official alerts, and country context.
3. Authentication
Create an API key from your Dashboard. The full secret key is shown once at creation; save it immediately. Key prefixes are identifiers only and cannot be used as secrets.
Bearer token header
Authorization: Bearer <your_api_key>
Account-scoped quota tracking, usage dashboard, cache hit ratio, and request logs. Quota metadata appears in every response under meta.quota.
Playground report generation requires a free account. Anonymous visitors can preview the interface. Daily Playground limits apply per plan. Direct API access may require a Bearer key depending on deployment.
An invalid or revoked key returns 401 INVALID_API_KEY. When an API key is required for direct API access, unauthenticated requests return 401 API_KEY_REQUIRED. If you lose a key, revoke it from the Dashboard and create a new one.
4. Report Profiles
The mode parameter selects which data layers are fetched. Disabled layers return placeholder objects with available: false so the response schema stays consistent across modes.
| Mode | Plan Access | Layers |
|---|---|---|
| basic | FREE | Geocoding, weather, terrain, translation, source health |
| standard | FREE | Basic + air quality, seismic, infrastructure, official alerts, country context, correlation |
| full | Pro | All layers — adds fire, population exposure, humanitarian context, weather baseline, marine, land cover, ESA WorldCover, baseline hazards, earth observation, NASA POWER, volcano |
| custom | Varies | Layers specified via layers= param. Core layers always included. Max 8 optional layers. |
- FREE: Available now. 100 API requests/month. 10 Playground reports/day. BASIC, STANDARD, and limited CUSTOM. FREE API keys use STANDARD when no mode is specified.
- PRO: $19/month via self-serve checkout. 2,500 API requests/month. 100 Playground reports/day. FULL access and higher burst limits.
- BUSINESS: $79/month via self-serve checkout. 10,000 API requests/month. 300 Playground reports/day. FULL access and higher burst limits for teams.
- ENTERPRISE: Custom quota, SLA, and terms. Manual arrangement only.
- FULL: Requires a Pro, Business, or Internal plan. Explicit
mode=fullon a FREE key returns403 PLAN_REQUIRES_UPGRADE. - CUSTOM protected layers: Public and FREE requests may include at most 2 protected layers (fire, population, humanitarian context, earth observation).
Cache is partitioned by mode — a mode=basic and a mode=standard request for the same location produce separate cache entries.
5. Request Parameters
/api/report| Param | Required | Description |
|---|---|---|
| query | required | City name (Paris) or coordinate pair (48.856,2.352 or lat=48.85 lon=2.35). Invalid coordinates return a validation error. |
| mode | optional | basic, standard, full, or custom. Omitting defaults to FULL for authenticated non-FREE requests; FREE API keys default to STANDARD. Invalid values return INVALID_MODE. |
| layers | custom only | Comma-separated list for mode=custom. Example: layers=weather,flood,fire. Invalid names return INVALID_LAYER. |
Ambiguous place names
Archivist scores multiple geocoding candidates using place name, country, admin region, population, feature type, and curated alias boosts for globally famous cities. Explicit country hints are respected when resolving text locations — append the country name after a comma to disambiguate: roma, italy, paris, france, london, uk. For ambiguous place names, include a country or use coordinates for best precision.
GET /api/report?query=roma%2C+italy&mode=standard GET /api/report?query=paris%2C+france&mode=standard GET /api/report?query=48.856%2C2.352&mode=standard
6. Reading the Response
Responses are JSON objects. Key areas:
locationResolved target — name, country, admin1, coordinates, timezone. Coordinate inputs include reverse-geocoded context.
field_assessmentOperational verdict — readiness (READY / CAUTION / AVOID), overall_risk, confidence, warnings, recommended use.
translation.plain_languageReadable interpretation — main risk driver, operational readout, key caveats.
translation.translated_signalsPer-layer explanations — status, severity, summary, evidence, limitations, confidence.
coastal_contextCoastal relevance classification — COASTAL / NEAR_COASTAL / RIVER_OR_WATER_ADJACENT / INLAND / UNKNOWN with confidence and evidence trail.
report_profileProfile used — mode, enabled/disabled layers, cost tier summary, protected layers count.
data_qualityLayer health summary — overall rating, core layer counts, optional layer availability and degradation.
reliabilitySource health detail — overall status, live/cached/stale/degraded/skipped/unavailable layer lists.
source_metaPer-source metadata — source name, freshness, confidence, limitations.
meta.cacheCache state — HIT/MISS, source (memory/db/live), TTL, age.
meta.authAuth mode — public or api_key.
meta.quotaQuota state (API-key requests only) — plan, limit, used, remaining, state.
meta.response_time_msTotal server processing time for the request.
7. Example Response
Compact example for GET /api/report?query=Berlin&mode=standard:
{
"query": "Berlin",
"location": {
"name": "Berlin",
"country": "Germany",
"country_code": "DE",
"admin1": "Berlin",
"latitude": 52.5201,
"longitude": 13.4049,
"timezone": "Europe/Berlin"
},
"field_assessment": {
"readiness": "READY",
"overall_risk": "LOW",
"confidence": "HIGH",
"warnings": [],
"recommended_use": ["General location analysis", "Urban field planning"]
},
"coastal_context": {
"available": true,
"classification": "INLAND",
"confidence": "MEDIUM",
"evidence": ["Available signals suggest the target is inland."],
"note": "Marine layer not applicable for inland target."
},
"translation": {
"plain_language": {
"main_risk_driver": "Risk appears low across available core signals.",
"operational_readout": "Conditions are within normal ranges for all configured standard layers.",
"key_caveats": ["Open-Meteo weather is model-derived, not a physical station reading."]
},
"translated_signals": {
"weather": {
"label": "Modeled Weather",
"status": "normal",
"severity": "low",
"summary": "Current modeled weather indicates manageable conditions.",
"confidence": "HIGH"
}
}
},
"report_profile": {
"mode": "standard",
"profile_label": "STANDARD REPORT",
"estimated_report_tier": "STANDARD",
"enabled_layers": ["geocoding", "weather", "terrain", "air_quality", "seismic",
"infrastructure", "official_alerts", "country_context", "correlation"],
"disabled_layers": ["fire", "flood", "population_exposure", "marine", "land_cover",
"esa_worldcover", "baseline_hazards", "earth_observation",
"humanitarian_context", "weather_baseline", "nasa_power", "volcano"]
},
"data_quality": {
"overall": "HIGH",
"core_layers": { "available": 6, "total": 6 },
"optional_layers": { "available": 2, "total": 12, "unavailable": [], "degraded": [] }
},
"sources": ["Open-Meteo Geocoding API", "Open-Meteo Forecast API",
"Open-Meteo Elevation API", "Open-Meteo Air Quality API",
"USGS Earthquake Catalog", "OpenStreetMap / Overpass API", "GDACS"],
"meta": {
"cache": { "status": "MISS", "source": "live", "served_at": "2026-05-15T12:00:00.000Z" },
"auth": { "mode": "api_key" },
"quota": { "plan": "FREE", "limit": 100, "used": 12, "remaining": 88, "state": "OK" },
"response_time_ms": 1240,
"version": "v0.7"
}
}8. Errors
All errors return a normalized JSON object. Stack traces, SQL errors, env var names, and table names are never exposed.
{ "error": { "code": "INVALID_COORDINATES", "message": "..." } } // 400
{ "error": { "code": "MISSING_QUERY", "message": "..." } } // 400
{ "error": { "code": "LOCATION_NOT_FOUND", "message": "..." } } // 404
{ "error": { "code": "INVALID_MODE", "message": "..." } } // 400
{ "error": { "code": "INVALID_LAYER", "message": "..." } } // 400
{ "error": { "code": "MISSING_LAYERS_FOR_CUSTOM", "message": "..." } } // 400
{ "error": { "code": "CUSTOM_LAYER_LIMIT_EXCEEDED", "message": "..." }} // 400
{ "error": { "code": "INVALID_API_KEY", "message": "..." } } // 401
{ "error": { "code": "API_KEY_REQUIRED", "message": "..." } } // 401
{ "error": { "code": "SIGN_IN_REQUIRED", "message": "..." } } // 401
{ "error": "PLAN_PROFILE_NOT_ALLOWED", "plan": "FREE", ... } // 403
{ "error": "PLAN_REQUIRES_UPGRADE", "message": "..." } // 403
{ "error": "ANONYMOUS_PROFILE_RESTRICTED", "message": "..." } // 403
{ "error": "MONTHLY_QUOTA_EXCEEDED", "limit": 100, "used": 100, ... } // 429
{ "error": "PLAYGROUND_DAILY_LIMIT_REACHED", "message": "..." } // 429
{ "error": "PUBLIC_RATE_LIMITED", "message": "...", "retry_after_seconds": 240 } // 429
{ "error": "API_KEY_RATE_LIMITED", "message": "...", "retry_after_seconds": 240 } // 429
{ "error": "PLAYGROUND_RATE_LIMITED", "message": "...", "retry_after_seconds": 240 } // 429
{ "error": "UPSTREAM_API_FAILURE", "message": "..." } // 502API_KEY_REQUIRED — direct API access requires an API key on this deployment. Use the Playground or include Authorization: Bearer <your_api_key>.
SIGN_IN_REQUIRED — Playground report generation requires a free account. Anonymous visitors can preview the interface but must sign in to generate reports.
PLAN_REQUIRES_UPGRADE — FULL reports require a Pro subscription. Upgrade via the pricing page or Dashboard.
PLAN_PROFILE_NOT_ALLOWED — FREE plan requested mode=full via API key. Use basic or standard instead.
ANONYMOUS_PROFILE_RESTRICTED — anonymous Playground use is limited to BASIC reports with a small daily limit. Sign in for full access.
MONTHLY_QUOTA_EXCEEDED — monthly API-key limit reached. Quota resets at the start of the next calendar month.
PLAYGROUND_DAILY_LIMIT_REACHED — daily Playground report limit reached. Limits reset at midnight UTC. Upgrade to Pro for higher limits.
PUBLIC_RATE_LIMITED / API_KEY_RATE_LIMITED / PLAYGROUND_RATE_LIMITED — burst limiter exceeded. The response includes a Retry-After header and retry_after_seconds field. Wait that duration before retrying.
UPSTREAM_API_FAILURE — critical failure in an upstream open-data source. Core layers only.
9. Quotas, Limits, and Cache
API Quota (Monthly)
| Plan | API Requests/Month | Playground/Day | FULL Access |
|---|---|---|---|
| FREE | 100 | 10 | — |
| PRO | 2,500 | 100 | Yes |
| BUSINESS | 10,000 | 300 | Yes |
| ENTERPRISE | Custom | Custom | Yes |
- At 80% used:
meta.quota.state: "WARNING"in responses. - Over API quota:
429 MONTHLY_QUOTA_EXCEEDED. - Over daily Playground limit:
429 PLAYGROUND_DAILY_LIMIT_REACHED. - Limits are enforced server-side. Playground limits reset daily at midnight UTC. API quotas reset on the 1st of each month.
Cache States
meta.cache.status: "MISS"Report generated live from upstream sources. Freshest possible data.
meta.cache.status: "HIT"Served from cache within the layer TTL. Source calls not made. age_seconds shows how old.
stale in reliabilityA layer returned stale data because its live source was unavailable. Shown in reliability.stale_layers.
Cache is partitioned by mode and coordinate. meta.cache shows whether a report is fresh or cached. Cached reports do not contain user-specific authorization data. meta.auth always reflects the current requester.
10. Source States and Trust
Archivist labels source state so developers can see exactly what ran, what was cached, what was skipped, and what failed. It does not hide or normalize failures into misleading success signals.
Layer fetched from upstream during this request.
Layer served from in-TTL cache. No upstream call.
Live source unavailable; usable stale data served. Layer marked degraded.
Layer disabled by profile or not applicable for this target. Not a failure.
No usable live or cached data. Shown as available: false in response.
Layer intentionally skipped — e.g. marine for inland targets. Not a data gap.
Layer returned data but with reduced confidence, coverage, or freshness.
Official alerts vs model-derived signals
Archivist separates official alert sources (GDACS global, NOAA/NWS US-only, MeteoAlarm deferred) from model-derived signals (Open-Meteo weather/flood/marine, USGS catalog, NASA FIRMS satellite detections). CLEAR means configured official alert feeds returned no nearby active events — it does not prove there is no local hazard. A model signal without official alert confirmation is context, not a warning.
The official_alerts.provider_status object shows per-provider status (available / unavailable / skipped / not_applicable / deferred) so callers can see exactly which feeds were checked. Region-skipped providers are not failures.
11. Layer Reference
Each layer is fetched, cached, and labeled independently. Layers included in a profile appear in report_profile.enabled_layers; skipped layers appear in report_profile.disabled_layers with available: false.
Core Layers (BASIC / STANDARD / FULL)
Location resolution, coordinate input, ambiguity scoring, curated alias boosts for famous cities, reverse geocode for coordinates.
Modeled temperature, wind speed/direction, weather code. Model-derived, not a physical station reading.
Elevation in meters, terrain band (LOWLAND / HIGHLAND / MOUNTAINOUS / etc.).
PM2.5, PM10, ozone. Model-derived atmospheric data. Signal: GOOD / MODERATE / POOR / HAZARDOUS.
Recent cataloged seismic events within 100km. Does not predict future activity.
Mapped hospitals, clinics, pharmacies, emergency services, mobility nodes. Volunteer coverage varies by region.
GDACS: global disaster event catalog. NOAA/NWS: US-only weather alerts. MeteoAlarm: deferred (European aggregator, adapter pending). provider_status shows per-source state. CLEAR = configured sources checked, no nearby events — not proof of safety.
National metadata and available World Bank indicators. Background context only — not local live intelligence.
Rule-based compound signal analysis. Explains how individual signals interact without adding new data.
Plain-language readout, per-signal explanations, source notes, operational caveats.
Extended Layers (FULL / CUSTOM)
Satellite-derived active fire and thermal anomaly detections within 25km over 72 hours. Urban detections without corroborating evidence are downgraded to VERIFY status. Requires FIRMS_MAP_KEY server-side.
layers=fireLocal modeled population exposure within a ~10 km radius around the target coordinate. Not total city, admin, or census population. Optional admin_context provides broader administrative population context. Signals: VERY_LOW / LOW / MODERATE / HIGH / VERY_HIGH.
layers=populationModel-derived river discharge vs. historical median baseline. Signals: NORMAL / WATCH / ELEVATED / ALERT / NO_RIVER_DATA. Not an official flood warning. Low-baseline ratio artifacts are flagged for review.
layers=floodModeled wave height, swell, sea surface temperature, ocean current. Signals: CALM / MODERATE / ROUGH / HAZARDOUS / NO_MARINE_DATA. Includes coastal_context classification (COASTAL / NEAR_COASTAL / RIVER_OR_WATER_ADJACENT / INLAND / UNKNOWN). Not a buoy, port authority feed, or storm surge forecast.
layers=marineSatellite-derived land-cover classification at 10 m resolution. Sampled at the representative coordinate. Static 2021 product — not live hazard detection. Renders separately from OSM Mapped Surface Context.
layers=esa_worldcoverMapped surface context inferred from OSM features within 1km. Shown as Mapped Surface Context when ESA WorldCover is available. URBAN_SURFACE / VEGETATED / WATER_OR_WETLAND / etc.
layers=land_coverCurrent temperature, wind, and precipitation vs. 4-year seasonal averages. Signals: NEAR_BASELINE / SLIGHTLY_ABOVE / EXTREME_ABOVE / etc.
layers=weather_baselineCountry-level humanitarian dataset catalog context. Includes relevance scoring. CONTEXT_AVAILABLE / BACKGROUND_DATA_ONLY / NO_RECENT_CONTEXT / UNAVAILABLE. Does not confirm local danger.
layers=humanitarian_contextSlow-changing hazard exposure context derived from available signal layers. Coastal flood gated on coastal_context classification. Not an authoritative hazard map. Levels: LOW / MEDIUM / HIGH / VERY_HIGH.
layers=baseline_hazardsVisual satellite preview URL (MODIS True Color). No numeric analysis computed. Preview URL generated locally — availability not remotely confirmed.
layers=earth_observation7-day modeled environmental summary: temperature, precipitation, wind, humidity. Signals: CLEAR_CONTEXT / HOT_CONTEXT / WET_CONTEXT / DRY_CONTEXT / WINDY_CONTEXT / MIXED_CONTEXT. Not an official warning. No API key required.
layers=nasa_powerProximity context from a static catalog of ~120 globally active Holocene volcanoes. Signals: CLEAR / NEARBY_VOLCANO / WATCH / ACTIVE_NEARBY. Pure in-memory computation.
layers=volcanoLayer Cost Tiers
| Tier | Examples | Notes |
|---|---|---|
| LOW | geocoding, weather, terrain, air quality, seismic, country context, esa_worldcover, nasa_power, volcano | Cached open APIs, static data, or in-memory — minimal upstream cost |
| MEDIUM | infrastructure, official alerts, flood, land cover | OpenStreetMap/Overpass can be slow; cached aggressively |
| HIGH | weather baseline, marine, baseline hazards | Multi-variable or multi-year fetches; higher expected latency |
| PROTECTED | fire, population, humanitarian context, earth observation | Require external API keys or plan access; limited in custom mode for FREE/public |
12. Accounts, Dashboard, and Saved Reports
Free accounts provide API key management, usage tracking, and saved report sync. Pro subscriptions unlock FULL report access and higher limits.
- API Keys. Create up to 3 keys from the Dashboard. Keys are shown once at creation. Revoke and regenerate at any time.
- Usage Dashboard. Track monthly API requests, cache hit ratios, Playground usage, and quota state per plan.
- Saved Reports. Save GeoBrief snapshots for later review. Snapshots capture conditions at generation time — they are not live re-checks. Export as JSON or re-run in the Playground.
- Account sync. Signed-in users can access saved reports across devices. Playground saves locally without an account but generation requires sign-in.
- Privacy. Saved reports, API keys, and usage data are scoped to the account that created them.
13. Billing and Plan Access
FREE tier is available now. Pro and Business are available via self-serve checkout. Enterprise is custom/manual. Plan activation happens via verified webhook — never from the client or redirect URL.
- Pro subscriptions are fulfilled by verified webhook events only — the checkout redirect is informational.
- Subscription cancellation or expiry downgrades the account to FREE automatically. INTERNAL/manual plans are protected from automated downgrade.
- Unknown variant/price IDs never trigger plan changes.
- Enterprise access is custom/manual. Submit a request at /request-access.
- Manage billing from the Dashboard when you have an active subscription.
Production Notes
- Open public data services can return partial coverage or temporary errors. Archivist reports those states per-layer rather than failing the whole report.
- Source protection and caching keep upstream data access reliable. Production deployments may benefit from provider-level or edge rate limits.
- In-memory rate limiters provide burst protection. Persistent daily and monthly limits are enforced server-side against usage logs.
- Always follow local official guidance during active incidents. Use API keys for quota tracking and dashboard diagnostics.
- Static demo reports are available at
/demo/istanbul,/demo/tokyo, etc. — these are pre-built samples, not live data. - An open-source reference implementation of the Archivist report engine is planned for GitHub. Example API clients are already available at github.com/Sabbath-0/archivist-examples.