OpenET API
AccountUser Interface
  • Welcome
  • Quick Start
  • Retrieve API Key
  • Reference
    • API Reference
      • Account
      • Geodatabase
      • Raster
  • Additional Resources
    • Quota
    • Earth Engine
    • Data Availability
    • FARMS
    • Change Log
    • FAQ
    • Tutorial Videos
  • Contact
  • TERMS OF SERVICE
Powered by GitBook
On this page
  • Create an API Key
  • Make Your First Request (Programmatically)
  • Make Your First Request (GUI)

Quick Start

Last updated 1 year ago

Create an API Key

Your API requests are authenticated using API keys. Keys can be created, retrieved, and deleted from your . Under the tab you can generate multiple keys for a single account, however they will all be tied to the same quota.

Make Your First Request (Programmatically)

In this example to make your first query, send an authenticated request to the raster/timeseries/point endpoint. The following code snippet will retrieve OpenET timeseries data from a single longitude, latitude point in a json format.

curl -X 'POST' \
  'https://openet-api.org/raster/timeseries/point' \
  -H 'accept: application/json' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "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"
}'
import requests

# set your API key before making the request
header = {"Authorization": YOUR_API_KEY}

# endpoint arguments
args = {
  "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())

Make Your First Request (GUI)

If you are less comfortable around a computer terminal and excel is more your pace, you may find our graphical user interface (GUI) useful. Visiting directly will take you to the public API server. When you visit the page for the first time you will need to click thebutton and add your API key. The browser will remember the API key and you won't need to do this step again until your browser cache has been cleared.

Scroll down a little to the raster/timeseries/point tab and expand it. All fields will be prefilled, but you can manually change them if you like. Click thebutton to run the query. A few seconds later you should see the return result just below.

Account Dashboard
API Keys
https://openet-api.org
Page cover image