{"openapi":"3.1.0","info":{"title":"Earth to Date API","description":"Satellite imagery API with clean subprocess architecture.\n\n## View names (the `view` path parameter)\n\nShared across every endpoint that takes `view` (`/v2/download_aoi`, `/download_shapefile`, tile endpoints, …).\n\n## ⚠️ Coordinate order — latitude first\n\n`/v2/download_aoi/{lat_min,lon_min,lat_max,lon_max}/{date}/{days_back}/{max_clouds}/{view}?apikey=…`\n\nThe bbox is **latitude first**: `lat_min,lon_min,lat_max,lon_max` — NOT lon-first.\n`lat` ∈ [-90, 90], `lon` ∈ [-180, 180], and each `min` ≤ its `max`.\n\n- Examples: N. China `34,113,40,120`; Morges (CH) `46.42,6.60,46.46,6.66`.\n- If a latitude is out of [-90, 90] but valid as a longitude, the request is rejected with **HTTP 400** (\"coordinates look reversed\"). Out-of-range or min>max coords also give 400.\n- A **404** means no data for that date/area — usually a date/coverage gap, so the body suggests trying another date or a larger `days_back`. Only when a lat/lon swap can't be ruled out by range (both longitudes also ≤ 90) does it additionally suggest checking coordinate order.\n\n## Request size limits\n\nTo keep each request fast, `/v2/download_aoi` caps the area per call (over the limit → **HTTP 413**). Split larger jobs into tiles.\n\n- **Super-res / FR views** (`sr`, `s2rr`, `s2fr`, `s2gt`, `s2r5m`, `s2r2m`, all `*fr` reconstructions incl. thermal/SAR/Landsat FR, **pollution** and **night-light** FR): limited to **50 megapixels of output** — cost scales with output pixels, not ground area. The equivalent max AOI by output resolution:\n\n  | Output res | Max AOI |\n  |------------|---------|\n  | 50 cm (`sr`)            | ~12 km²       |\n  | 1 m (`s2rr`, `s2fr`, `s2gt`) | 50 km²        |\n  | 2 m (`s2r2m`)           | 200 km²       |\n  | 5 m (`s2r5m`)           | 1250 km²      |\n  | 7.5 m (thermal FR)      | ~2800 km²     |\n  | 500 m (night-light)     | ~12,000,000 km²   |\n  | 1.4 km (pollution)      | ~98,000,000 km²   |\n\n  So the coarse FR layers (pollution / night-light) allow whole continents but reject a single whole-world request.\n\n- **Coarse sensors** (thermal `lsthb10/11_tci`, CBERS, Landsat `ls15/ls5`, DEM, GLO-30): limited to **1000 km²** per request.\n- **Sentinel-2 10 m and spectral indices**: no size limit.\n\n### Sentinel-2 sensors (grammar: `{sensor}_{suffix}`)\n\n`suffix` is either `tci` (true-color RGB) or a band visualization / spectral index — see the two lists below.\n**GSD** (ground sample distance) is the sensor's: every suffix keeps it (`s2_ndvi` 10 m, `s2r2m_ndvi` 2 m, `sr_ndvi` 50 cm).\n\n| Sensor   | GSD        | Notes                                       |\n|----------|------------|---------------------------------------------|\n| `s2`     | 10m        | Sentinel-2 native L2A                       |\n| `s2r2m`  | 2m         | Reconstructed (fused + deterministic 2× upscale) |\n| `sr`     | 50cm       | Super-resolution                            |\n| `s2dr`   | 2m         | Derived-Resolution (spectral only)          |\n| `s2rr`   | 1m         | Refined Reality (visual only)               |\n| `s2fr`   | 1m         | Fidelity Reconstruction (faithful, visual only for now: `s2fr_tci`) |\n| `s2gt`   | 1m         | S2 1m Grounded (ground-truth-trained, visual only: `s2gt_tci`) |\n| `s2r5m`  | 5m         | Derived 5m (non-linear gamma/sat TCI)       |\n| `s2nar5m`| 5m         | Derived 5m, Non-Adaptive Reconstruction (linear ESA TCI) |\n\nExamples: `s2_tci`, `s2_ndvi`, `s2r2m_tci`, `s2r2m_ndvi`, `sr_tci`, `sr_ndvi`.\n\n### Band visualizations (RGB combinations)\n\nGSD = the sensor's (see above), e.g. `s2_veganalysis` 10 m, `s2r2m_veganalysis` 2 m.\n\n| Suffix          | Bands                  | Purpose                   |\n|-----------------|------------------------|---------------------------|\n| `_natural`      | Red-Green-Blue         | True color                |\n| `_veganalysis`  | NIR-Red-Green          | Vegetation / false-color  |\n| `_cropsoil`     | NIR-SWIR-Red           | Crop / soil moisture      |\n| `_vegstress`    | SWIR-NIR-Red           | Vegetation stress         |\n| `_vegmoisture`  | SWIR-NIR-Green         | Vegetation + moisture     |\n| `_geology`      | SWIR-NIR-Blue          | Geological features       |\n| `_urban`        | NIR-SWIR-Blue          | Urban / rock              |\n| `_water`        | NIR-Red-Blue           | Water bodies              |\n| `_watercontent` | SWIR-Red-Green         | Water content             |\n| `_atmosphere`   | NIR-Green-Blue         | Atmospheric haze          |\n| `_burnscar`     | SWIR2-NIR-Red          | Burn scars                |\n| `_snow`         | SWIR-Red-Green         | Snow / ice                |\n| `_bathymetric`  | Red-Green-Blue         | Bathymetric (shallow water)|\n| `_drought`      | SWIR2-SWIR1-Red        | Drought                   |\n\n### Spectral indices (single-band scalar maps)\n\nGSD = the sensor's (see above), e.g. `s2_ndvi` 10 m, `s2r2m_ndvi` 2 m, `sr_ndvi` 50 cm.\n\n| Suffix     | Name / Description                              |\n|------------|--------------------------------------------------|\n| `_ndvi`    | NDVI — Vegetation health                        |\n| `_ndwi`    | NDWI — Surface water content                    |\n| `_ndmi`    | NDMI — Canopy moisture                          |\n| `_savi`    | SAVI — Soil-adjusted vegetation                 |\n| `_msavi`   | MSAVI — Modified SAVI                           |\n| `_msavi2`  | MSAVI2 — Second-order MSAVI                     |\n| `_osavi`   | OSAVI — Optimized SAVI                          |\n| `_tsavi`   | TSAVI — Transformed SAVI                        |\n| `_evi`     | EVI — Enhanced vegetation                       |\n| `_evi2`    | EVI2 — Two-band EVI                             |\n| `_nbr`     | NBR — Burn ratio                                |\n| `_nbr2`    | NBR2 — Alternative burn ratio                   |\n| `_ndre`    | NDRE — Red-edge NDVI                            |\n| `_ndre2`   | NDRE variant (different red-edge band)          |\n| `_ndre3`   | NDRE variant (different red-edge band)          |\n| `_rendvi`  | RENDVI — Red-edge normalized difference         |\n| `_cire`    | CIRE — Chlorophyll index, red-edge              |\n| `_cire2`   | CIRE variant                                    |\n| `_cire3`   | CIRE variant                                    |\n| `_cig`     | CIG — Chlorophyll index, green                  |\n| `_gndvi`   | GNDVI — Green NDVI                              |\n| `_rvi`     | RVI — Ratio VI (NIR/Red)                        |\n| `_dvi`     | DVI — Difference VI                             |\n| `_rdvi`    | RDVI — Renormalized DVI                         |\n| `_pvi`     | PVI — Perpendicular VI                          |\n| `_ipvi`    | IPVI — Infrared percentage VI                   |\n| `_grvi`    | GRVI — Green-Red VI                             |\n| `_sr`      | SR — Simple ratio                               |\n| `_sr2`     | SR2 — Simple ratio variant                      |\n| `_sipi`    | SIPI — Structure-insensitive pigment            |\n| `_ari`     | ARI — Anthocyanin reflectance                   |\n| `_cri1`    | CRI1 — Carotenoid reflectance                   |\n| `_cri2`    | CRI2 — Carotenoid reflectance variant           |\n| `_mcari`   | MCARI — Modified chlorophyll absorption         |\n| `_tcari`   | TCARI — Transformed chlorophyll absorption      |\n| `_mre`     | MRE — Modified red edge                         |\n| `_tre`     | TRE — Transformed red edge                      |\n| `_mtvi`    | MTVI — Modified triangular VI                   |\n| `_mtvi2`   | MTVI2 — Modified triangular VI 2                |\n| `_tvi`     | TVI — Triangular VI                             |\n| `_ndsi`    | NDSI — Normalized difference soil               |\n| `_bsi`     | BSI — Bare soil                                 |\n| `_lai`     | LAI — Leaf area index                           |\n| `_cwc`     | CWC — Canopy water content (g/m²)               |\n| `_mineralclass` | Mineral classification (permission-gated)  |\n\n### Landsat\n\n| View          | GSD        | Notes                                                                         |\n|---------------|------------|-------------------------------------------------------------------------------|\n| `ls15_tci`    | 15m        | Pansharpened Landsat (L7/L8/L9 real pan; L4/L5 native 30m)                    |\n| `ls5_tci`     | 5m         | Upscaled from 15m                                                             |\n| `ls15fr_tci`  | 7.5m       | Fidelity Reconstruction ×2 of 15m pansharpened Landsat 8/9 (all bands, real pan) |\n| `ls30fr_tci`  | 15m        | Fidelity Reconstruction ×2 of native 30m Landsat 4/5/7 (deep archive)         |\n\n### Landsat thermal (TIRS, L8/L9)\n\nBrightness temperature, colorized (local temperature stretch). TIRS is natively ~100m.\n\n| View             | GSD        | Notes                                           |\n|------------------|------------|-------------------------------------------------|\n| `lsthb10_tci`    | 30m grid   | Band 10 (10.9µm), NASA 30m resampling of ~100m  |\n| `lsthb11_tci`    | 30m grid   | Band 11 (12.0µm)                                |\n| `lsthb10fr_tci`  | 25m        | Fidelity Reconstruction ×4 of true 100m B10     |\n| `lsthb11fr_tci`  | 25m        | Fidelity Reconstruction ×4 of true 100m B11     |\n\n### ASTER (Terra) — mineral / geology bands\nValues via `download_aoi/.../<view>_geotiff` (float32, native UTM grid); `_tci` = false-colour image. FR = SSR ×4.\nVNIR/SWIR reflectance exist only 2000 – 2008-04 (SWIR detector failure); TIR emissivity is current. First request for a\nnew place can take minutes (NASA catalogue search + band downloads); repeats are fast.\n\n| View                    | GSD        | Notes                                                    |\n|-------------------------|------------|----------------------------------------------------------|\n| `astervnir[_tci]`       | 15m        | B01 B02 B03N reflectance; `_tci` = B3N/B2/B1             |\n| `asterswir[_tci]`       | 30m        | B04–B09 reflectance; `_tci` = B4/B6/B8                   |\n| `astertir[_tci]`        | 90m        | B10–B14 emissivity; `_tci` = B13/B12/B10                 |\n| `astervnirfr[_tci]`     | 3.75m      | Fidelity Reconstruction ×4 of VNIR                       |\n| `asterswirfr[_tci]`     | 7.5m       | Fidelity Reconstruction ×4 of SWIR                       |\n| `astertirfr[_tci]`      | 22.5m      | Fidelity Reconstruction ×4 of TIR                        |\n\n### EMIT (ISS imaging spectrometer)\n| View               | GSD        | Notes                                                                   |\n|--------------------|------------|-------------------------------------------------------------------------|\n| `emit[_tci]`       | 60m        | L2A reflectance, 285 bands 381–2493 nm (water bands NaN); `_tci` = 663/559/492 nm |\n| `emitfr[_tci]`     | 15m        | Fidelity Reconstruction ×4 on the raw swath, 242 bands (v6: absorption-depth loss)  |\n\n### Combined Sentinel-2 + Landsat\n\n| View        | GSD        | Notes                                                                           |\n|-------------|------------|---------------------------------------------------------------------------------|\n| `r5m_tci`   | 5m         | Auto-selects S2 (5m derived) or Landsat (5m) per date for best temporal coverage |\n\n### PlanetScope\n\n| View        | GSD        | Notes                        |\n|-------------|------------|------------------------------|\n| `ps_tci`    | 3m         | Native PlanetScope tile      |\n| `psrr_tci`  | 1.9m       | Refined Reality super-res x2 |\n\n### Sentinel-1 SAR\n\nBackscatter intensity (logarithmic, colorized). The `tci` suffix produces an\n8-bit display-ready PNG. SAR penetrates clouds and works day/night.\n\n| View          | GSD        | Polarization | Notes                 |\n|---------------|------------|--------------|-----------------------|\n| `s1vv_tci`    | 10m        | VV           | Native raw Sentinel-1 |\n| `s1vh_tci`    | 10m        | VH           | Native raw Sentinel-1 |\n| `s1vvfr_tci`  | 2.5m       | VV           | Fidelity Reconstruction (fp32 x4) |\n| `s1vhfr_tci`  | 2.5m       | VH           | Fidelity Reconstruction (fp32 x4) |\n\n`?relorbit=N` (download_aoi) pins S1 to one relative orbit (one look direction), e.g. for multi-date medians.\n\n### Night light (VIIRS Black Marble)\n\nThe `nightlight125m_*` views are the Fidelity Reconstruction ×4 of the 500m VIIRS data (125m).\n\n| View                       | GSD        | Visualization                                           |\n|----------------------------|------------|---------------------------------------------------------|\n| `nightlight125m_tci`       | 125m (FR ×4) | Grayscale light intensity                             |\n| `nightlight125m_darkened`  | 125m (FR ×4) | Grayscale terrain, darkened where no light            |\n| `nightlight125m_lighted`   | 125m (FR ×4) | Grayscale terrain, golden highlights where lights are |\n| `nightlight500m_tci`       | 500m       | Grayscale light intensity                               |\n| `nightlight500m_darkened`  | 500m       | Grayscale terrain, darkened where no light              |\n| `nightlight500m_lighted`   | 500m       | Grayscale terrain, golden highlights where lights are   |\n\n### Air pollution (Sentinel-5P)\n\nGases: `no2`, `so2`, `co`, `ch4`, `hcho`, `aer_ai` (aerosol index); omit the gas for the combined view.\nNative data is ~5.5km; the Fidelity Reconstruction ×4 gives ~1.4km.\n\n| View                          | GSD      | Endpoint                                 | Notes                                                    |\n|-------------------------------|----------|------------------------------------------|----------------------------------------------------------|\n| `pollution_{gas}_overlay`     | ~5.5 km  | `/pollution/{view}/{zoom}/{x}/{y}`       | Native-resolution colorized overlay (RGBA PNG tiles)      |\n| `pollution_overlay`           | ~5.5 km  | `/pollution/{view}/{zoom}/{x}/{y}`       | Combined (all gases) native overlay                       |\n| `pollution_{gas}_geotiff`     | ~5.5 km  | `/pollution/{view}/{zoom}/{x}/{y}`       | Real values, float32 GeoTIFF (no reconstruction)          |\n| `pollutionfr_{gas}`           | ~1.4 km  | `/v2/download_aoi`, `/v2/{view}/…`       | Fidelity Reconstruction ×4 overlay (display only)         |\n| `pollutionfr`                 | ~1.4 km  | `/v2/download_aoi`, `/v2/{view}/…`       | Combined FR ×4 overlay                                    |\n\nPoint values: `/pollution_value?lat=…&lon=…&gas=…` (native, never reconstructed).\n\n### High-value analytics & composite indexes (2m reconstructed)\n\nEach of these is a complete high-value analytics product or a complex\ncomposite index built on top of `s2r2m` — not a plain single-band index.\n\n| View                              | GSD | Description                                                     |\n|-----------------------------------|-----|-----------------------------------------------------------------|\n| `s2r2m_soilsalinity`              | 2 m | Soil salinity score (0–100)                                     |\n| `s2r2m_soilsalinityclass`         | 2 m | Soil salinity categorical classes                               |\n| `s2r2m_soilsalinityconfidence`    | 2 m | Model confidence for the soil-salinity estimate                 |\n| `s2r2m_biomassgrassland`          | 2 m | Grassland biomass (kg/ha) — pasture / rangeland focus           |\n| `s2r2m_soilmoisture`              | 2 m | Surface soil-moisture estimate                                  |\n| `s2r2m_bgwaterleak`               | 2 m | Water-leak warnings over a grayscale image (display; needs `prior_date`) |\n| `s2r2m_waterleak_geotiff`         | 2 m | Water-leak warning values, 1-band float32 (0 = none, 0.05–1.7)  |\n| `s2r2m_waterleak_shp` / `_gpkg`   | 2 m source | Water-leak warnings as polygons (zipped Shapefile / GeoPackage): max, mean, area, color |\n| `s2r2m_fieldanomaly`              | 2 m | In-field NDVI-change anomaly (needs `prior_date`; `_geotiff` = signed float32 score) |\n| `s2r2m_mineralmap`                | 2 m | Mineral map (permission-gated)                                  |\n| `s2r2m_mineralclass`              | 2 m | Mineral classification (permission-gated)                       |\n\n### More analytics (forest, land cover, change)\n\n| View                    | GSD | Description                                                                                   |\n|-------------------------|-----|-----------------------------------------------------------------------------------------------|\n| `forest_tci`            | 5 m | Forest map (from 5 m reconstructed Sentinel-2)                                                |\n| `deforestation_tci`     | 5 m | Forest loss since `prior_date` (e.g. `?prior_date=2020-12-31`)                                 |\n| `eudr_tci`              | 5 m | EUDR check: forest loss since the end-2020 baseline (no extra parameter)                      |\n| `landcover_tci`         | 1 m | Land-cover classification (built-up, roads, water, forest, crops, bare soil, ...), from `s2rr` |\n| `newconstruction_tci`   | 1 m output (2 m analysis) | New construction since a baseline: needs `?months=12` (months back) or `?prior_date=` |\n| `cim_tci`               | 1 m output (2 m analysis) | Critical Infrastructure Monitoring (beta): changes since a baseline, needs `?months=` or `?prior_date=` |\n| `worldcover`            | 10 m | ESA WorldCover 2021 land cover — tiles only: `/v2/worldcover/{z}/{x}/{y}`                     |\n\n### Elevation\n\n| View    | GSD        | Notes                                                                        |\n|---------|------------|------------------------------------------------------------------------------|\n| `glo30` | 30 m       | Copernicus GLO-30 DSM, metres above the EGM2008 geoid (append `_geotiff` for float32 values) |\n\n### Other views\n\n| View            | GSD                         | Description                                              |\n|-----------------|-----------------------------|----------------------------------------------------------|\n| `flood`         | 1 m image, GLO-30 / 3 m DSM | Flood simulation                                         |\n| `s2_scl`        | 20 m (on the 10 m grid)     | Sentinel-2 Scene Classification Layer (cloud/shadow/etc) |\n| `changes_tci`   | 2 m                         | Change detection between two dates (from `s2r2m`)        |\n\n## Bulk AOIs — many shapes, long-running jobs\n\nFor hundreds to thousands of fields: upload one shapes file, poll, then download one zip. Sample client (Python,\ndoes all three steps incl. resume): [bulk_aois_client.py](https://app.earthtodate.com/static/bulk_aois_client.py)\n— `python3 bulk_aois_client.py --apikey KEY --shapes fields.kml --end_date 2026-10-20 --days_back 90`. Or use the web page\n[app.earthtodate.com/bulk_aoi](https://app.earthtodate.com/bulk_aoi): upload, see the shapes on the map, choose the dates\nand views, follow the progress and download. The job runs on the\nserver (hours to days for thousands of shapes and long date ranges) and shares it with interactive users.\n\n    # 1. start: body = zipped shapefile, KMZ, KML or GeoJSON (<= 1 GB). Polygons and closed lines are used.\n    curl -X POST --data-binary @fields.kml       \"https://app.earthtodate.com/v2/bulk_aois?end_date=2026-10-20&days_back=90&views=s2r2m_ms,s2r2m_ndvi,s2rr_tci&apikey=KEY\"\n    # -> {\"request_id\": \"...\", \"state\": \"running\", \"status_url\": \"...\", \"download_url\": \"...\", ...}\n\n    # 2. poll until \"state\" is \"done\" (or \"failed\": \"error\" says why; POST again to restart)\n    curl \"https://app.earthtodate.com/v2/bulk_aois/REQUEST_ID?apikey=KEY\"\n\n    # 3. download; -C - resumes an interrupted download (HTTP Range)\n    curl -C - -o result.zip \"https://app.earthtodate.com/v2/bulk_aois/REQUEST_ID/download?apikey=KEY\"\n\n- **Dates:** `days_back` → each shape gets its newest cloud-free date in `[end_date - days_back, end_date]` (shapes not\n  clear on the newest capture are filled from older ones). `start_date` instead → every cloud-free date in\n  `[start_date, end_date]`.\n- **Cloud-free** = no cloud, cloud shadow, cirrus or no-data pixel inside the shape in the Sentinel-2 scene\n  classification (captures with ≥ 95 % scene clouds are skipped). `max_cloud_pct=N` relaxes it: up to N % of the\n  shape's pixels may be cloud, shadow or cirrus (still no no-data pixel).\n- **Views:** Sentinel-2 views (`s2`, `s2r2m`, `s2rr`, `s2fr`, `s2gt`, `s2r5m`, `s2nar5m`, `s2dr`, `sr` sensors),\n  comma-separated, each delivered as a GeoTIFF.\n- **Zip layout:** `<root>/<date>/<id>_<view>.tif`, cut to the shape's polygon (nodata outside), plus\n  `<root>/summary.csv` (`id,date,status,cloud_pct`: `ok`, `cloudy`, `nodata`, `no_capture`, `too_large`, `error: …`).\n  The id is `id_field`'s value (default: an `id` attribute), else the shape's centroid `lat_lon`.\n  Shapes under 100 m² get a 20 m buffer.\n- **Same request again** (same file and parameters) while it runs or waits for download → the same `request_id`.\n- **Retention:** the result is removed once fully downloaded, or after 1 hour without any status / download\n  request once the job has ended. A job without progress for 30 minutes is stopped (`failed`).\n- **Usage** is recorded when the download completes: total km² = shape area × dates delivered × views.\n\n## Cloudless basemap — integration guide\n\nQuarterly, worldwide, cloudless Sentinel-2 mosaic, served from\n`https://basemap.earthtodate.com`. Web Mercator (EPSG:3857), JPEG tiles on the\nstandard `{z}/{x}/{y}` grid. **CORS:** every response (including 404s) sends\n`Access-Control-Allow-Origin: *`.\n\n**Layers**\n\n| Layer        | GSD        | Zoom levels | Notes                       |\n|--------------|------------|-------------|-----------------------------|\n| `tci_clean`  | 10m        | 14          | Native true-color; single zoom |\n| `sr5m_clean` | 5m         | 14–16       | Derived resolution          |\n| `sr_clean`   | 2.5m       | 14–16       | Super-resolution            |\n\nTiles are 256×256 (`tci_clean` renders ~194px, scaled onto the 256 grid). For a\nsmooth multi-zoom basemap use `sr5m_clean` or `sr_clean`; `tci_clean` is z14 only.\n\nPick ONE of the three integration methods below.\n\n### 1. XYZ / WebTileLayer (simplest — recommended)\n\nTemplate (standard Google/OSM XYZ scheme):\n\n    https://basemap.earthtodate.com/tiles/s2/{layer}/{z}/{x}/{y}.jpg\n\n`{layer}` = `tci_clean` | `sr5m_clean` | `sr_clean`. Example tile:\n`https://basemap.earthtodate.com/tiles/s2/sr5m_clean/14/2617/6329.jpg`\n\n- **Leaflet:** `L.tileLayer('https://basemap.earthtodate.com/tiles/s2/sr5m_clean/{z}/{x}/{y}.jpg', {minZoom:14, maxZoom:16, maxNativeZoom:16, tileSize:256})`\n- **OpenLayers:** `new ol.source.XYZ({url:'https://basemap.earthtodate.com/tiles/s2/sr_clean/{z}/{x}/{y}.jpg', minZoom:14, maxZoom:16})`\n- **MapLibre / Mapbox (raster source):** `{type:'raster', tiles:['https://basemap.earthtodate.com/tiles/s2/sr_clean/{z}/{x}/{y}.jpg'], tileSize:256, minzoom:14, maxzoom:16}`\n- **ArcGIS JS API (WebTileLayer):** `new WebTileLayer({urlTemplate:'https://basemap.earthtodate.com/tiles/s2/sr5m_clean/{level}/{col}/{row}.jpg'})` — ArcGIS `{level}/{col}/{row}` = `z/x/y`.\n\nDo **not** add this URL as an \"ArcGIS tiled map **service**\" — it is XYZ, not a REST service (that triggers a `?f=json` probe). Use WebTileLayer/XYZ here, or method 2.\n\n### 2. ArcGIS tiled MapServer (for Esri \"Add layer from URL\")\n\nA tiled-`MapServer` facade is exposed per layer:\n\n    https://basemap.earthtodate.com/tiles/s2/tci_clean/MapServer\n    https://basemap.earthtodate.com/tiles/s2/sr5m_clean/MapServer\n    https://basemap.earthtodate.com/tiles/s2/sr_clean/MapServer\n\n- **Service metadata:** `…/MapServer?f=json` → ArcGIS tiled-service descriptor\n  (WebMercator `wkid 102100`/`3857`, 256×256, JPEG, `singleFusedMapCache:true`,\n  LODs 14–16; `tci_clean` LOD 14 only).\n- **Tiles:** `…/MapServer/tile/{level}/{row}/{col}` (Esri order: level=z, row=y, col=x).\n  Example: `https://basemap.earthtodate.com/tiles/s2/sr_clean/MapServer/tile/14/6329/2617`\n- **Usage:** in ArcGIS Online / Pro / JS API, *Add layer from URL* → paste a\n  `…/MapServer` URL → add as an ArcGIS Server (tiled) web service.\n\nPrefer `sr5m_clean` or `sr_clean` (zoom 14–16); `tci_clean` is single-zoom.\n\n### 3. Embed the interactive viewer (no GIS integration)\n\nDrop the ready-made viewer into an `<iframe>` (tiles load internally as images —\nno CORS or tile wiring needed on your page; the host sets no `X-Frame-Options`):\n\n    <iframe src=\"https://basemap.earthtodate.com/?lat=37.82&lon=-122.48&zoom=13\"\n            style=\"width:100%;height:100%;border:0\"></iframe>\n\nOptional query params: `lat`, `lon`, `zoom`. The in-page button cycles 10m → 5m → 2.5m.\n","version":"3.1.0"},"paths":{"/pollution_geocode":{"get":{"summary":"Pollution Geocode","description":"Incremental place-name search -> top 10 [{name,lat,lon}]. Uses Photon (komoot, OSM-based)\nwhich is built for autocomplete; Nominatim public forbids autocomplete use and rate-limits.","operationId":"pollution_geocode_pollution_geocode_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","title":"Q"},"examples":{"example":{"summary":"San Francisco","value":"San Francisco"}}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pollution_value":{"get":{"summary":"Pollution Value","description":"Current S5P reading(s) + units at a point. gas omitted/'combined' -> all 6 gases.","operationId":"pollution_value_pollution_value_get","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","title":"Lat"},"examples":{"example":{"summary":"37.77","value":37.77}}},{"name":"lon","in":"query","required":true,"schema":{"type":"number","title":"Lon"},"examples":{"example":{"summary":"-122.42","value":-122.42}}},{"name":"gas","in":"query","required":false,"schema":{"type":"string","title":"Gas"},"examples":{"example":{"summary":"no2","value":"no2"}}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/pollution/{view}/{zoom}/{tile_x}/{tile_y}":{"get":{"summary":"Get Pollution Overlay","description":"Low-zoom transparent RGBA pollution OVERLAY tiles (S5P global store).\nSeparate from /v2 (which stays S2 z12-21). Continental scale: zoom 1-9.","operationId":"get_pollution_overlay_pollution__view___zoom___tile_x___tile_y__get","parameters":[{"name":"view","in":"path","required":true,"schema":{"type":"string","title":"View"},"examples":{"example":{"summary":"pollution_no2_overlay","value":"pollution_no2_overlay"}}},{"name":"zoom","in":"path","required":true,"schema":{"type":"integer","title":"Zoom"},"examples":{"example":{"summary":"6","value":6}}},{"name":"tile_x","in":"path","required":true,"schema":{"type":"integer","title":"Tile X"},"examples":{"example":{"summary":"10","value":10}}},{"name":"tile_y","in":"path","required":true,"schema":{"type":"integer","title":"Tile Y"},"examples":{"example":{"summary":"24","value":24}}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/{view}/{zoom}/{tile_x}/{tile_y}":{"get":{"summary":"Get Tile V2","description":"Get satellite tile using tile.py - Main API endpoint\n\nArgs:\n    view: Product view type (s2_tci, sr_tci, etc.)\n    zoom: Tile zoom level (14-18 only)\n    tile_x: Tile X coordinate\n    tile_y: Tile Y coordinate\n    end_date: Target date in YYYY-MM-DD format\n    days_back: Days to search backwards\n    max_clouds: Maximum cloud coverage percentage\n    before: Before date for change detection","operationId":"get_tile_v2_v2__view___zoom___tile_x___tile_y__get","parameters":[{"name":"view","in":"path","required":true,"schema":{"type":"string","title":"View"},"examples":{"s2rr_tci":{"summary":"s2rr_tci — 1 m Refined Reality (true color)","value":"s2rr_tci"},"s2r5m_tci":{"summary":"s2r5m_tci — 5 m true color","value":"s2r5m_tci"},"s2r5m_ndvi":{"summary":"s2r5m_ndvi — 5 m NDVI","value":"s2r5m_ndvi"}}},{"name":"zoom","in":"path","required":true,"schema":{"type":"integer","title":"Zoom"},"examples":{"example":{"summary":"16","value":16}}},{"name":"tile_x","in":"path","required":true,"schema":{"type":"integer","title":"Tile X"},"examples":{"example":{"summary":"10473","value":10473}}},{"name":"tile_y","in":"path","required":true,"schema":{"type":"integer","title":"Tile Y"},"examples":{"example":{"summary":"25325","value":25325}}},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","title":"End Date"},"examples":{"example":{"summary":"2026-11-07","value":"2026-11-07"}}},{"name":"days_back","in":"query","required":false,"schema":{"type":"integer","title":"Days Back"},"description":"(default: 15)","examples":{"example":{"summary":"30","value":30}}},{"name":"max_clouds","in":"query","required":false,"schema":{"type":"integer","title":"Max Clouds"},"description":"(default: 20)","examples":{"example":{"summary":"20","value":20}}},{"name":"months","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Months"}},{"name":"prior_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prior Date"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"file","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File"}},{"name":"planet_apikey","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Planet Apikey"}},{"name":"apikey","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apikey"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dem_at_lat_lon":{"get":{"summary":"Dem At Lat Lon","description":"Get DEM elevation at a specific lat/lon point.\nReturns elevation from all 5 free DEM sources plus the fused result.","operationId":"dem_at_lat_lon_dem_at_lat_lon_get","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","description":"Latitude","title":"Lat"},"description":"Latitude","examples":{"example":{"summary":"37.9235","value":37.9235}}},{"name":"lon","in":"query","required":true,"schema":{"type":"number","description":"Longitude","title":"Lon"},"description":"Longitude","examples":{"example":{"summary":"-122.5965","value":-122.5965}}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/los":{"get":{"summary":"Line Of Sight","description":"Terrain line-of-sight over the BaseDEM2 DSM.\n\nWalks the sight line between two points (each lifted `height` m above the DSM\nsurface at its location) and returns the first terrain blockage, accounting\nfor Earth curvature. Returns {\"blocked\": bool, \"blocked_at\": {lat,lon,elevation}|null}.","operationId":"line_of_sight_los_get","parameters":[{"name":"from_lat","in":"query","required":true,"schema":{"type":"number","description":"Observer latitude","title":"From Lat"},"description":"Observer latitude","examples":{"example":{"summary":"37.9235","value":37.9235}}},{"name":"from_lon","in":"query","required":true,"schema":{"type":"number","description":"Observer longitude","title":"From Lon"},"description":"Observer longitude","examples":{"example":{"summary":"-122.5965","value":-122.5965}}},{"name":"from_height","in":"query","required":true,"schema":{"type":"number","description":"Observer height above ground surface (m)","title":"From Height"},"description":"Observer height above ground surface (m)","examples":{"example":{"summary":"2","value":2}}},{"name":"to_lat","in":"query","required":true,"schema":{"type":"number","description":"Target latitude","title":"To Lat"},"description":"Target latitude","examples":{"example":{"summary":"37.7552","value":37.7552}}},{"name":"to_lon","in":"query","required":true,"schema":{"type":"number","description":"Target longitude","title":"To Lon"},"description":"Target longitude","examples":{"example":{"summary":"-122.4528","value":-122.4528}}},{"name":"to_height","in":"query","required":true,"schema":{"type":"number","description":"Target height above ground surface (m)","title":"To Height"},"description":"Target height above ground surface (m)","examples":{"example":{"summary":"10","value":10}}},{"name":"curvature","in":"query","required":false,"schema":{"type":"string","description":"'refraction' (4/3 Earth), 'sphere', or 'flat'","title":"Curvature"},"description":"'refraction' (4/3 Earth), 'sphere', or 'flat' (default: refraction)","examples":{"example":{"summary":"refraction","value":"refraction"}}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/history_snapshot":{"get":{"summary":"History Snapshot","description":"Generate agricultural field history snapshot or serve the HTML interface\n\nArgs:\n    title: Title for the snapshot (required for image generation)\n    bbox: Bounding box as min_lat,min_lon,max_lat,max_lon (required for image generation)\n    unit: Time unit (week|month|quarter|year), defaults to quarter\n    start: Start date as yyyy-mm-dd, defaults to today\n    count: Number of time periods, defaults to 12, max 25\n    views: Comma-separated list of views (up to 3), defaults to s2rr_tci","operationId":"history_snapshot_history_snapshot_get","parameters":[{"name":"title","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"examples":{"example":{"summary":"Presidio","value":"Presidio"}}},{"name":"bbox","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bbox"},"examples":{"example":{"summary":"37.792,-122.482,37.810,-122.448","value":"37.792,-122.482,37.810,-122.448"}}},{"name":"unit","in":"query","required":false,"schema":{"type":"string","pattern":"^(week|month|quarter|year)$","title":"Unit"},"description":"(default: quarter)","examples":{"example":{"summary":"quarter","value":"quarter"}}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Start"}},{"name":"count","in":"query","required":false,"schema":{"type":"integer","maximum":25,"minimum":1,"title":"Count"},"description":"(default: 12)","examples":{"example":{"summary":"4","value":4}}},{"name":"views","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Views"},"description":"(default: s2rr_tci)","examples":{"example":{"summary":"s2rr_tci","value":"s2rr_tci"}}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/download_aoi/{bbox_lat_lon}/{date_str}/{days_back}/{max_clouds}/{view}":{"get":{"summary":"Download Aoi V2","description":"Download Area of Interest - V2 API format\n\nArgs:\n    bbox_lat_lon: Bounding box as \"lat_min,lon_min,lat_max,lon_max\" (LATITUDE FIRST)\n    date_str: Target date in YYYY-MM-DD format\n    days_back: Days to search backwards\n    max_clouds: Maximum cloud coverage percentage\n    view: Product view type","operationId":"download_aoi_v2_v2_download_aoi__bbox_lat_lon___date_str___days_back___max_clouds___view__get","parameters":[{"name":"bbox_lat_lon","in":"path","required":true,"schema":{"type":"string","title":"Bbox Lat Lon"},"examples":{"example":{"summary":"37.792,-122.482,37.810,-122.448","value":"37.792,-122.482,37.810,-122.448"}}},{"name":"date_str","in":"path","required":true,"schema":{"type":"string","title":"Date Str"},"examples":{"example":{"summary":"2026-11-07","value":"2026-11-07"}}},{"name":"days_back","in":"path","required":true,"schema":{"type":"integer","title":"Days Back"},"examples":{"example":{"summary":"30","value":30}}},{"name":"max_clouds","in":"path","required":true,"schema":{"type":"integer","title":"Max Clouds"},"examples":{"example":{"summary":"20","value":20}}},{"name":"view","in":"path","required":true,"schema":{"type":"string","title":"View"},"examples":{"s2rr_tci":{"summary":"s2rr_tci — 1 m Refined Reality (true color)","value":"s2rr_tci"},"s2r5m_tci":{"summary":"s2r5m_tci — 5 m true color","value":"s2r5m_tci"},"s2r5m_ndvi":{"summary":"s2r5m_ndvi — 5 m NDVI","value":"s2r5m_ndvi"}}},{"name":"months","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Months"}},{"name":"prior_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prior Date"}},{"name":"caption","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caption"}},{"name":"relorbit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Relorbit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dates/{lat_lon}/{view}/{date_str}/{days_back}/{max_clouds}":{"get":{"summary":"Get Available Dates","description":"Get list of available satellite imagery dates for a specific location.\n\nArgs:\n    lat_lon: Location as 'latitude,longitude'\n    view: Product name (e.g., s2_tci, sr_tci)\n    date_str: End date in YYYY-MM-DD format\n    days_back: Days to search back from end date\n    max_clouds: Maximum cloud coverage percentage (0-100)\n    source: Data source - \"s2\" for Sentinel-2 (default) or \"ps\" for PlanetScope\n\nReturns:\n    JSON array of available dates","operationId":"get_available_dates_dates__lat_lon___view___date_str___days_back___max_clouds__get","parameters":[{"name":"lat_lon","in":"path","required":true,"schema":{"type":"string","title":"Lat Lon"},"examples":{"example":{"summary":"37.80,-122.47","value":"37.80,-122.47"}}},{"name":"view","in":"path","required":true,"schema":{"type":"string","title":"View"},"examples":{"example":{"summary":"s2_tci","value":"s2_tci"}}},{"name":"date_str","in":"path","required":true,"schema":{"type":"string","title":"Date Str"},"examples":{"example":{"summary":"2026-11-07","value":"2026-11-07"}}},{"name":"days_back","in":"path","required":true,"schema":{"type":"integer","title":"Days Back"},"examples":{"example":{"summary":"365","value":365}}},{"name":"max_clouds","in":"path","required":true,"schema":{"type":"integer","title":"Max Clouds"},"examples":{"example":{"summary":"20","value":20}}},{"name":"source","in":"query","required":false,"schema":{"type":"string","default":"s2","title":"Source"}},{"name":"planet_apikey","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Planet Apikey"}},{"name":"include_safe","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Safe"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/bulk_aois":{"post":{"summary":"Bulk Aois Start","description":"Start a bulk job: Sentinel-2 views for every closed shape of an uploaded file, as one zip.\n\n**Body:** a zipped shapefile, KMZ, KML or GeoJSON (raw bytes, up to 1 GB). Polygons and closed lines are used;\nshapes under 100 m² get a 20 m buffer.\n\nFor each shape the job keeps only dates whose Sentinel-2 scene classification shows **no no-data pixel and at\nmost `max_cloud_pct` % cloud, cloud shadow or cirrus pixels inside the shape** (default 0: none), then cuts\nevery view to the shape's polygon. `summary.csv` gives each shape-date's cloud %.\nWith `days_back` each shape gets its newest such date; with `start_date` every such date in the window.\n\nReturns `request_id`, `status_url` and `download_url`. Sending the identical request again while the job\nruns (or its result waits) returns the same `request_id`. The job can take hours to days for thousands of\nshapes; it shares the server with interactive users. See **Bulk AOIs** in the reference below for the\nfull workflow.","operationId":"bulk_aois_start_v2_bulk_aois_post","parameters":[{"name":"end_date","in":"query","required":true,"schema":{"type":"string","description":"Last date of the window, YYYY-MM-DD","title":"End Date"},"description":"Last date of the window, YYYY-MM-DD","examples":{"example":{"summary":"2026-11-07","value":"2026-11-07"}}},{"name":"days_back","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Latest cloud-free date per shape in [end_date - days_back, end_date]","title":"Days Back"},"description":"Latest cloud-free date per shape in [end_date - days_back, end_date]","examples":{"example":{"summary":"90","value":90}}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Instead of days_back: EVERY cloud-free date in [start_date, end_date]","title":"Start Date"},"description":"Instead of days_back: EVERY cloud-free date in [start_date, end_date]"},{"name":"views","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated Sentinel-2 views, e.g. s2_ms,s2r2m_ndvi,s2rr_tci","title":"Views"},"description":"Comma-separated Sentinel-2 views, e.g. s2_ms,s2r2m_ndvi,s2rr_tci (default: s2_ms)","examples":{"example":{"summary":"s2r2m_ndvi,s2rr_tci","value":"s2r2m_ndvi,s2rr_tci"}}},{"name":"id_field","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Attribute naming each shape (default: an `id` attribute, else lat_lon)","title":"Id Field"},"description":"Attribute naming each shape (default: an `id` attribute, else lat_lon)"},{"name":"name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Name for the result's root folder (default: the uploaded file's name inside a zip, else 'input')","title":"Name"},"description":"Name for the result's root folder (default: the uploaded file's name inside a zip, else 'input')"},{"name":"max_cloud_pct","in":"query","required":false,"schema":{"type":"number","maximum":100,"minimum":0,"description":"Per shape: max % of its pixels that may be cloud, cloud shadow or cirrus (0 = none)","default":0.0,"title":"Max Cloud Pct"},"description":"Per shape: max % of its pixels that may be cloud, cloud shadow or cirrus (0 = none)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"get":{"summary":"Bulk Aois List","description":"The caller's bulk jobs (running, done = ready to download, failed), newest first.","operationId":"bulk_aois_list_v2_bulk_aois_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v2/bulk_aois/{request_id}":{"delete":{"summary":"Bulk Aois Delete","description":"Trash a bulk job: stop it if running and remove its files (result zip included).","operationId":"bulk_aois_delete_v2_bulk_aois__request_id__delete","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Bulk Aois Status","description":"Progress of a bulk job. `state`: `running` | `done` (download it) | `failed` (`error` says why; send the\nPOST again to restart). `progress` holds the phase, dates and parents processed and shapes delivered.","operationId":"bulk_aois_status_v2_bulk_aois__request_id__get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v2/bulk_aois/{request_id}/download":{"get":{"summary":"Bulk Aois Download","description":"The finished job's zip: `<root>/<date>/<shape id or lat_lon>_<view>.tif` (cut to the polygon, nodata\noutside) plus `<root>/summary.csv`. Supports HTTP `Range`, so an interrupted download resumes\n(`curl -C -`, `wget -c`). When the last byte has been sent the result is removed from the server.","operationId":"bulk_aois_download_v2_bulk_aois__request_id__download_get","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/download_shapefile/{date_str}/{days_back}/{max_clouds}/{view}":{"post":{"summary":"Download Shapefile","description":"Download a satellite image cropped to an uploaded shapefile.\n\n**Body:** raw shapefile bytes — `.shp`, `.zip` (shapefile or KMZ-as-zip),\n`.geojson`, `.kml`, or `.kmz`. LineString geometries are auto-closed\ninto polygons. Pixels outside the polygon are masked.\n\nAppend `_geotiff` to the view to get a GeoTIFF (multi-band, masked with\nnodata outside the shape); otherwise a PNG with alpha=0 outside.\n\nLogged AOI usage reflects the polygon area, not the bbox.\n\nFor the `view` parameter syntax, see the **View names** section at the\ntop of this API's documentation.","operationId":"download_shapefile_download_shapefile__date_str___days_back___max_clouds___view__post","parameters":[{"name":"date_str","in":"path","required":true,"schema":{"type":"string","title":"Date Str"},"examples":{"example":{"summary":"2026-11-07","value":"2026-11-07"}}},{"name":"days_back","in":"path","required":true,"schema":{"type":"integer","title":"Days Back"},"examples":{"example":{"summary":"30","value":30}}},{"name":"max_clouds","in":"path","required":true,"schema":{"type":"integer","title":"Max Clouds"},"examples":{"example":{"summary":"20","value":20}}},{"name":"view","in":"path","required":true,"schema":{"type":"string","title":"View"},"examples":{"example":{"summary":"s2_tci","value":"s2_tci"}}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mineralmap":{"get":{"summary":"Mineralmap Endpoint","description":"Mineral Alteration Map (mineralmap_v2) for an area of interest, as a zip of the run folder.","operationId":"mineralmap_endpoint_mineralmap_get","parameters":[{"name":"aoi","in":"query","required":true,"schema":{"type":"string","description":"Bounding box as 'lat_min,lon_min,lat_max,lon_max' (max 100 sq km)","title":"Aoi"},"description":"Bounding box as 'lat_min,lon_min,lat_max,lon_max' (max 100 sq km)","examples":{"example":{"summary":"40.505,-112.170,40.535,-112.135","value":"40.505,-112.170,40.535,-112.135"}}},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End date YYYY-MM-DD","title":"End Date"},"description":"End date YYYY-MM-DD","examples":{"example":{"summary":"2026-11-07","value":"2026-11-07"}}},{"name":"factor","in":"query","required":false,"schema":{"type":"integer","description":"5 = 2 m, 1 = 10 m","default":5,"title":"Factor"},"description":"5 = 2 m, 1 = 10 m"},{"name":"structure","in":"query","required":false,"schema":{"type":"boolean","description":"include the Geological Structure & Strata Map (in development)","default":true,"title":"Structure"},"description":"include the Geological Structure & Strata Map (in development)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"x-examples-date":"2026-11-07"}