API Access Instructions

Thank you for using the GridPointWeather API service. To properly use the API, important information is below. If you have any issues, email support with a detailed description of your issue.

Creating an API request

You can use the API URL Builder to automatically populate API request parameters, or you can use the information below to manually create a request to the API.

API Endpoint Parameters

All requests to the API are HTTP GET requests to http://api.gridpointweather.com/weather/getjson. Additionally there are a series of query parameters that must be appeneded to the URL to dictate what type of API request is being made.

An example of a fully-formed API Request URL could look like http://api.gridpointweather.com/weather/getjson?location=37.73%2C-119.61&model=gfs&hours=24&inunits=1&offset=0&interptype=1&api=0&token=1234567890123456

Note: you must have a valid token to make a request to the API. If you wish to simply test the API, you can sign up for the free plan.

Each parameters meaning and possible values are explained below.

location

Location is in the format LATITUDE%2cLONGITUDE, where LATITUDE and LONGITUDE are valid latitude and longitude values. These coordinates specify the location for which you are requesting model data. The %2c is present as it represents a URL-encoded comma.

Example: location=42.0%2C-72.0

model

The model represents the model for which you are requesting forecast information. The API offers access to forecast data from multiple weather and non-weather models. Only one model can be specified per request. The possible model values are enumerated below.

Weather Forecast Models

  1. gfs -- Global Forecast System
  2. nam -- North American Mesoscale Forecast System
  3. gefsm -- Global Ensemble Forecast System Mean
  4. gem -- Global Deterministic Prediction System
  5. cmcm -- Canadian Global Ensemble Prediction System Mean
  6. gemreg -- Regional Deterministic Prediction System
  7. sref -- Short-Range Ensemble Forecasting Mean
  8. conusarw -- WRF CONUS HIRES ARW
  9. conusnmm -- WRF CONUS HIRES NMM
  10. hrrr -- High-Resolution Rapid Refresh
  11. rr -- Rapid Refresh
  12. ncrr -- ESRL Rapid Refresh
  13. conus2 -- Long Range CONUS WRF

Other Non-Weather Models:

  1. wave -- Wave Watch III
  2. climate -- Climate Forecast System
  3. uv -- Ultra Violet Forecast
  4. aerosol -- NEMS GFS Aerosol Component

Example: model=gfs

api

This parameter controlls whether or not you would like to recieve the current forecast conditions, and/or the daily maxium information.

Example: api=3

inunits

Setting INUNITS to 1 will give you US units, while setting inunits to 0 gives you metric

Example: inunits=1

interptype

Setting interptype=2 causes the program to interpolate to your location while setting interptype=1 will provide the nearest gridpoint.

Example: interptype=1

offset

Set offset=0 to return UTC times, otherwise set to the hour offset for your location (Enter +/- Hours).

Example: offset=-8

hours

hours is the number of forecast hours you would like to pull. Change HOURS to 24 for a 24 hour forecast to 192 (This is model dependant).

Example: hours=24

Example Response

This response was generated using the following request: https://api.gridpointweather.com/weather/getjsondev?location=38.9%2C-119.0&model=gfs&hours=24&inunits=1&offset=0&interptype=1&api=3&token=1234567890123456

Additional: Determining a Model's Cycle

To determine the model cycle pass the following information through the API MODEL-cycle. For example to find out the current GFS cycle:

http://api.gridpointweather.com/weather/getjson?model=gfs-cycle

Please contact us for information about our API.

MESO, Inc.
185 Jordan Road
Troy, NY 12180-7611
Email: gridpointweather@gmail.com