<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Conducting Open Source Satellite Analysis

## Copernicus Open Access Hub

| Endpoint | Description |
|---|---|
| `GET /search?q=<query>` | Search products by footprint, date, cloud |
| `GET /odata/v1/Products('<id>')/$value` | Download product |

### Query Parameters

| Parameter | Example |
|---|---|
| `footprint` | `"Intersects(48.5,2.0,49.0,2.5)"` |
| `beginPosition` | `[2026-01-01T00:00:00Z TO 2026-03-01T23:59:59Z]` |
| `cloudcoverpercentage` | `[0 TO 20]` |
| `platformname` | `Sentinel-2` |
| `producttype` | `S2MSI2A` (L2A atmospherically corrected) |

## Sentinel Hub API

| Endpoint | Description |
|---|---|
| `POST /api/v1/process` | Process and download imagery |
| `GET /api/v1/catalog/search` | Search available imagery |

## GDAL/Rasterio

| Command | Description |
|---|---|
| `gdalinfo image.tif` | Image metadata and statistics |
| `gdal_translate -of GTiff input.jp2 output.tif` | Format conversion |
| `gdalwarp -t_srs EPSG:4326 input.tif output.tif` | Reproject |

## Agent Script

```bash
node agent.js search-imagery --bbox "2.0,48.5,2.5,49.0" --date-range 2026-01-01:2026-03-01
node agent.js download-tile --tile-id S2A_MSIL2A_20260315 --bands B04,B03,B02
node agent.js change-detect --before jan.tif --after mar.tif --threshold 0.3
node agent.js ndvi --red band04.tif --nir band08.tif --output ndvi.tif
node agent.js --self-test
```
