import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"date_range": ["2020-01-01","2020-12-31" ],"interval":"monthly","geometry": [-121.36322,38.87626 ],"model":"Ensemble","variable":"ET","reference_et":"gridMET","units":"mm","file_format":"JSON"}# query the api resp = requests.post( headers=header, json=args, url="https://openet-api.org/raster/timeseries/point")print(resp.json())
Timeseries Polygon
Note: daily data is limited to 10 year retrievals for this endpoint.
Provides support for queries against OpenET's raster datasets summarized for a polygon specified by a list of longitude latitude pairs.
import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"date_range": ["2021-01-01","2021-12-31" ],"interval":"monthly","geometry": [-121.00747,44.2442,-121.00747,44.24742,-121.00295,44.24742,-121.00295,44.24422 ],"model":"SIMS","variable":"ETo","reference_et":"gridMET","reducer":"mean","units":"mm","file_format":"JSON"}# query the api resp = requests.post( headers=header, json=args, url="https://openet-api.org/raster/timeseries/polygon")print(resp.json())
Timeseries Multipolygon
Note: daily data is limited to 1 year retrievals for this endpoint.
Provides support timeseries queries against OpenET's raster datasets summarized for multiple polygons specified by an Earth Engine asset ID or temporary uploaded GeoJSON file. For more information on Earth Engine assets, see the Earth Engine page.
The results of this endpoint will generate a 5 minute retrieval link for a .CSVfile. Each request will include the spatial aggregation of your choice with the area and volume of each polygon. See FAQ for requirements for an asset ID.
import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"date_range": ["2019-01-01","2019-12-31" ],"interval":"monthly","asset_id":"projects/openet/api_demo_features","attributes": ["id" ],"reducer":"mean","model":"ptJPL","variable":"ET","reference_et":"gridMET","units":"mm"}# query the api resp = requests.post( headers=header, json=args, url="https://openet-api.org/raster/timeseries/multipolygon")print(resp.json())
GeoTIFF Composite
Allows the user to define a region of interest and request a subset of OpenET's monthly raster datasets as a single temporal aggregated composite raster GeoTIFF. Each image will be clipped to the geometry provided and have a maximum return size of 32 MB. Note, asset_id can be used in place of geometry. See FAQ for requirements for an asset ID.
The results of this endpoint will generate a 5 minute retrieval link for a .TIFFfile. Data return is in a JSON format.
import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"date_range": ["2018-01-01","2018-06-30" ],"geometry": [-121.00747,44.2442,-121.00747,44.24742,-121.00295,44.24742,-121.00295,44.24422 ],"model":"PTJPL","variable":"ET","reference_et":"gridMET","reducer":"mean","units":"mm"}# query the api resp = requests.post( headers=header, json=args, url="https://openet-api.org/raster/geotiff/composite")print(resp.json())
GeoTIFF Stack
Note: retrieval is limited to 31 time steps per request. Each file counts as an individual request.
Allows the user to define a region of interest and request a subset of OpenET's raster datasets as multiple stacks of raster GeoTIFFs. Each image will be clipped to the geometry provided and have a maximum return size of 32 MB. Note: asset_id can be used in place of geometry. See FAQ for requirements for an asset ID.
The results of this endpoint will generate 5 minute retrieval links for a list of .TIFFfiles. Data return is in a JSON format.
import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"date_range": ["2020-01-01","2020-03-31" ],"interval":"monthly","geometry": [-121.00747,44.2442,-121.00747,44.24742,-121.00295,44.24742,-121.00295,44.24422 ],"model":"EEmetric","variable":"ET","reference_et":"gridMET","units":"mm"}# query the api resp = requests.post( headers=header, json=args, url="https://openet-api.org/raster/geotiff/stack")print(resp.json())
Export Composite
Allows the user to define a region of interest and export a subset of OpenET's monthly raster datasets as a single temporal aggregated composite raster GeoTIFF. Each image will be clipped to the geometry provided. Note, asset_id can be used in place of geometry. See FAQ for requirements for an asset ID.
import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"date_range": ["2018-01-01","2018-06-30" ],"geometry": [-121.00747,44.2442,-121.00747,44.24742,-121.00295,44.24742,-121.00295,44.24422 ],"model":"DisALEXI","variable":"ET","reference_et":"gridMET","reducer":"mean","units":"mm","encrypt":False}# query the api resp = requests.post( headers=header, json=args, url="https://openet-api.org/raster/export/composite")print(resp.json())
Export Stack
Note: retrieval is limited to 31 time steps per request. Each file counts as an individual request.
Allows the user to define a region of interest and export a subset of OpenET's raster datasets as multiple stacks of raster GeoTIFFs. Each image will be clipped to the geometry provided. Note, asset_id can be used in place of geometry. See FAQ for requirements for an asset ID.
import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"date_range": ["2020-01-01","2020-03-31" ],"interval":"monthly","geometry": [-121.00747,44.2442,-121.00747,44.24742,-121.00295,44.24742,-121.00295,44.24422 ],"model":"EEmetric","variable":"ET","reference_et":"gridMET","units":"mm","encrypt":False}# query the api resp = requests.post( headers=header, json=args, url="https://openet-api.org/raster/export/stack")print(resp.json())
Export Multipolygon
Note: Daily data is limited to 1 year retrievals for this endpoint.
Provides support for large timeseries queries against OpenET's raster datasets summarized for multiple polygons specified by an Earth Engine asset ID or temporary uploaded GeoJSON file. For more information on Earth Engine assets, see the Earth Engine page and see FAQ for requirements for an asset ID.
import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"date_range": ["2019-01-01","2019-12-31" ],"interval":"monthly","asset_id":"projects/openet/api_demo_features","attributes": ["id" ],"model":"ptJPL","variable":"ET","reference_et":"gridMET","reducer":"mean","units":"mm","encrypt":False}# query the api resp = requests.post( headers=header, json=args, url="https://openet-api.org/raster/export/multipolygon")print(resp.json())
Export File Tracking
Provides support for tracking OpenET export queries. If the job is found it will return one of four states, the export type, and attempt number:
UNSUBMITTED
RUNNING
SUCCEEDED
FAILED
If a job has FAILED you will see the error field in the return with details. If you are using a custom bucket to override the default export location, you must set the IAM permission of the bucket correctly or the job will fail to write (see the FAQ). If you experience continued failed requests contact OpenET support.
Note: it is not unusual to see a job in the PENDING state for long periods. It just means there is high traffic to the API during this time.
import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"tracking_id": YOUR_TRACKING_ID}# query the api resp = requests.get( headers=header, params=args, url="https://openet-api.org/raster/export/track")print(resp.json())
Raster Metadata
Exposes metadata as a JSON from an OpenET raster dataset summarized for a region specified by the user. Results will vary based on the collection being queried. An example set is shown below:
Response Fields:
model_name: Name of the OpenET model used, e.g., "openet-geesebal".
model_version: Version of the OpenET model, e.g., "0.2.2".
tool_name: Name of the tool used for data processing, e.g., "scene_interpolate_mgrs_export".
tool_version: Version of the tool used, e.g., "0.2.1".
core_version: Core version of the OpenET system, e.g., "0.1.2".
start_date, end_date: Date range for the dataset period.
interp_days: Number of days for interpolation, e.g., 32.
cloud_cover_max: Maximum cloud cover percentage allowed in the dataset, e.g., 70.
scale_factor_et, scale_factor_count: Scaling factors used for evapotranspiration (ET) and other counts.
et_reference_band: Reference band used for ET calculation, e.g., "eto".
et_reference_resample: Resampling method used for ET reference, e.g., "nearest".
et_reference_factor: Scaling factor for ET reference.
build_date: The date on which the data was ingested into the system, in YYYY-MM-DD format.
mgrs_tile: MGRS tile code for the region queried.
Special: The build_date result will be the date of the most recent update from OpenET to the source collection. Note, this may be called date_ingested for older collections.
import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"interval":"monthly","geometry": [-121.00747,44.2442,-121.00747,44.24742,-121.00295,44.24742,-121.00295,44.24422 ],"model":"geeSEBAL","variable":"ET","reference_et":"gridMET"}# query the api resp = requests.post( headers=header, json=args, url="https://openet-api.org/raster/metadata")print(resp.json())
Tile Cache
Returns a map id and token in JSON format, suitable for generating a map overlay from an OpenET raster dataset. Generated cache will expire after 2 hours. Supports super sampling of ET data up to 10x10m pixels.
import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"date_range": ["2021-10-01","2021-11-05" ],"geometry": [-121.00747,44.2442,-121.00747,44.24742,-121.00295,44.24742,-121.00295,44.24422 ],"model":"Ensemble","variable":"ET","reference_et":"gridMET","reducer":"sum","units":"mm","resample":0,"gradient":{"min":0,"max":100,"palette": ["#9e6212","#dcdd45","#44b36c","#2a3f65" ]}}# query the api resp = requests.post( headers=header, json=args, url="https://openet-api.org/raster/visual/tile_cache")print(resp.json())
Animation
Use an OpenET raster dataset to create an 900x900px.gif animation and film strip of corresponding images accessible by temporary url for 2 hours. Supports super sampling of data in 10 meter intervals up to 10x10m pixels.
import requests# set your API key before making the requestheader ={"Authorization": YOUR_API_KEY}# endpoint argumentsargs ={"date_range": ["2021-01-01","2021-12-31" ],"interval":"monthly","geometry": [-121.00747,44.2442,-121.00747,44.24742,-121.00295,44.24742,-121.00295,44.24422 ],"model":"Ensemble","variable":"ET","reference_et":"gridMET","units":"mm","resample":0,"gradient":{"min":0,"max":100,"palette": ["#9e6212","#dcdd45","#44b36c","#2a3f65" ]}}# query the api resp = requests.post( headers=header, json=args, url="https://openet-api.org/raster/visual/animate")print(resp.json())
Last updated
To track your file, see the Export File Tracking endpoint. To retrieve your exported files, use the endpoint. If your account is linked with Earth Engine, the exported files by default will be found in the OpenET Exports folder in the root of your Google Drive. If the bucket parameter is passed to override the export location to a private bucket, the export will go their instead if it is shared properly. For more detailed information on data exporting, see the FAQ.
To track your file, see the Export File Tracking endpoint. To retrieve your exported files, use the endpoint. If your account is linked with Earth Engine, the exported files by default will be found in the OpenET Exports folder in the root of your Google Drive. If the bucket parameter is passed to override the export location to a private bucket, the export will go their instead if it is shared properly. For more detailed information on data exporting, see the FAQ.
To track your file, see the Export File Tracking endpoint. To retrieve your exported files, use the endpoint. If your account is linked with Earth Engine, the exported files by default will be found in the OpenET Exports folder in the root of your Google Drive. If the bucket parameter is passed to override the export location to a private bucket, the export will go their instead if it is shared properly. For more detailed information on data exporting, see the FAQ.
Once an export state returns SUCCEEDED you may use the endpoint to retrieve the link within 7 days. If your account is linked with Earth Engine the export will be found in the OpenET Exports folder in the root of your Google Drive.