GET https://contrails.googleapis.com/v2/detections/masks: Get contrail
detection masks in NetCDF4 format.
If successful, the response will be a NetCDF of contrail detection masks.
Query parameters
| Parameters | |
|---|---|
start_time |
Required. Start time of request. Format: ISO 8601 datetime string Example: |
end_time |
Required. End time of request (inclusive). Note that Format: ISO 8601 datetime string Example: |
satellite_origin |
Optional. Valid values are Format: string Example: |
Examples
To retrieve detection masks from a satellite for a specific point of time:
response = requests.get( url="https://contrails.googleapis.com/v2/detections/masks", params={"start_time": "2026-04-10T00:00:00Z", "end_time": "2026-04-10T01:00:00Z", "satellite_origin": "MTG-000-FULL-DISK"}, headers={"x-goog-api-key": API_KEY}, )or in CURL:
curl "https://contrails.sandbox.googleapis.com/v2/detections/masks?\ key=API_KEY&\ start_time=2026-04-10T00:00:00Z&\ end_time=2026-04-10T01:00:00Z&\ satellite_origin=MTG-000-FULL-DISK"When loaded with xarray, this request returns the following dataset:
Dimensions: (time: 6, y: 5568, x: 5568) Coordinates Name Dimensions Data Type Values time (time) datetime64[ns] 2026-04-10T00:00:07 ... 2026-04-10T00:50:07 y (y) float32 5.569e+06 5.567e+06 ... -5.569e+06 x (x) float32 -5.569e+06 -5.567e+06 ... 5.569e+06 Data variables mask (time, y, x) float32 0.0 0.0 0.0 0.0 ... 0.0 ... projection () DataArray +proj=geos +lon_0=0 +h=35786400 +x_0=0 +y_0=0 +a=6378137 +b=6356752.3 +units=m +no_defs Note that
projectionis formatted as the string form of a pyproj.Proj object.projectioncan be used to convert between map x, y coordinates and longitude, latitude coordinates.