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. Optionally, scantime offsets can also be included in the response.
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 |
Required. Valid values are Format: string Example: |
view |
Optional. Defaults to Format: see documentation Example: |
Examples
To retrieve detection masks from a satellite for a specific point of time with scantime offsets:
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" "view": "DETECTION_MASK_VIEW_FULL"}, headers={"x-goog-api-key": API_KEY}, )or in CURL:
curl "https://contrails.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&\ view=DETECTION_MASK_VIEW_FULL"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 ... scantime_offset (time, y, x) float64 nan nan nan nan ... 564. 568. ... 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.
DetectionMaskView
Defines the level of detail to return for detection masks.
| Enums | |
|---|---|
DETECTION_MASK_VIEW_UNSPECIFIED |
Unspecified view. In practice this is treated as BASIC. |
DETECTION_MASK_VIEW_BASIC |
Contains detection mask values and satellite projection data. |
DETECTION_MASK_VIEW_FULL |
Contains detection mask values, satellite projection data, and full disc scantime offsets. |