MyRadar sells to AI agents - live prices and self-serve payment

The agent storefront at https://agents.myradar.dev/llms.txt?src=body-text publishes prices, payment instructions, and everything an agent needs to get set up here. Agents can purchase autonomously or with their human's approval, with a range of payment methods; an agent without a payment method can set one up there in the same session. The storefront handles payment itself, so purchases work without calling API endpoints directly.

Browse docs

Endpoints

Nov 24, 2022

Points#

The "points" endpoint can be used for getting a single forecast cycle for one or more points. For every point that is requested, you will receive a time series for each weather variable provided. This endpoint has the following parameters:

  • latlons - 2d array of lat/lon points as JSON string
  • itime - date string in format YYYYmmdd.HHMM that will be the begining time of the forecast, can be in the past, default to current time
  • as_csv - if 'true' will return CSV data rather than JSON

The JSON response for a point request has the following structure:

Text
data : {
  valid_times:[...],
  cloud_cover:[[...]],
  t:[[...]],
  ...
}

Each weather variable below 'data' will contain a 2d array whose length on the first dimension is the number of points requested. The 'valid_times' variable is an array of epoch timestamps that matches the length of the time series data. Each point's data will be at its corresponding index in the array. See data dictionary below for description of variables and units

Alternatively, the points endpoint can be used to get a route if the latlons array provided is an array of [lat, lon, time]. Adding the time to each point will result in the response being a 1d time series for each variable where each point in the time series corresponds to each point in the route provided at the time requested. In this scenario the itime parameter is not needed and will be ignored. This will return a similar dictionary as above but each variable will be one dimension where each value is the valid time requested in the latlon array.

Routes#

The "routes" endpoint will perform a driving directions lookup between an origin and destination then provide a single time series that represents the weather forecast at each point along the route. Unlike the 'points' endpoint, the 'routes' endpoint will always return only one time series for each weather variable. This endpoint accepts the following parameters:

  • origin - lat,lon pair for the origin point (eg 41.5,-105.1)
  • destination - lat,lon pair for the destiantion point
  • itime - initial time for the forecast (aka departure time)
  • include_route - if 'true' then include the complete driving directions response from mapping engine
  • as_csv - if 'true' return results as CSV rather than JSON

The JSON response for a route request has the following structure:

Text
routes:[{
  valid_times:[...],
  points:"...",
  time_series:{
    cloud_cover:[...],
    t:[...],
    ...
  }
}]

Each weather variable below 'time_series' will contain a 1d array that is the length of the route as provided by the driving directions enging. 'valid_times' is a list of epoch timestamps that represents the time the mapping engine believes you will arrive at that waypoint. The 'points' string is an encoded polyline that contains the lat/lon points the mapping engine provided.

Historical Data#

The 'histdata' endpoint builds a continuous time series of data for one or more points between a begin time and end time. This endpoint accepts the following parameters:

  • begin_time (url path parameter) - begin time in format YYYYmmdd.HHMM
  • end_time (url path parameter) - end time in format YYYYmmdd.HHMM (max 30 days)
  • latlons - 2d array of lat/lon points as JSON string (max 50 points)

This endpoint will return a NetCDF with the following structure

Text
netcdf data {
dimensions:
        vtime_str = 99 ;
        string13 = 13 ;
        var = 17 ;
        point = 3 ;
        vtime = 108 ;
        string36 = 36 ;
        string11 = 11 ;
        string8 = 8 ;
variables:
        double vtime(vtime) ;
                vtime:_FillValue = NaN ;
        char vtime_str(vtime_str, string13) ;
                vtime_str:_Encoding = "utf-8" ;
        char var(var, string11) ;
                var:_Encoding = "utf-8" ;
        double data(var, point, vtime) ;
                data :_FillValue = NaN ;
        char run_time(string8) ;
                run_time:_Encoding = "utf-8" ;
        char point(point, string36) ;
                point:_Encoding = "utf-8" ;
data:

Time Table#

Text
POST /timetable?origin={lat1,lon1}&destination={lat2,lon2}

This endpoint will look up the driving route and provide the forecast over a period of departure times

Text
{
  "depart_times": //list of departure timestamps
  "route_forecasts": //list of route forecasts that match the depart_times
}

Data Dictionary#

The 1d time series data dictionary is as follows:

Data Dictionary#

VariableTypeDefinition
rtarrayRoad Temperature (C)
rcarrayRoad Condition (0-10)
tarrayAir Temperature (C)
wspdarrayWind Speed (m/s)
wdirarrayWind Direction (0-360)
snodarraySnow Depth (m)
pratearrayPrecip Rate (m/s)
pointsencoded strPolyline encoded string of route points
valid_timesarrayTimestamp of weather forecast, derived from DirectionsReport (seconds since epoch)
ptypearrayPrecip Type 1=Wet,2=Mix,3=Frozen
delay_riskarrayDelay risk score decimal 0-3
rc_colorsarrayColors for the road condition values that match the table below
cloud_coverarrayCloud cover 0-100
rharrayRelative Humidity 0-100
radarrayDownward Short-Wave Radiation Flux w/m^2
d_snodarrayLagged snow depth
d_pratearrayLagged precip rate
d_radarrayLagged rad

Road Condition Types#

CodeValue
DRY0
WET_SNOW1
WET_MELT2
WET_RAIN3
WET_PREV4
MIXED_FRZR5
MIXED_SNOW6
MIXED_MELT7
FRZ_SNOW8
FRZ_PREV9
FRZ_BLKICE10
CodeDefinition
WET_SNOW“Wet due to snow melting on contact”
WET_MELT“Wet due to melting snow”
WET_RAIN“Wet due to rain”
WET_PREVIOUS_RAIN“Patches of wet due to previously fallen rain”
MIXED_FREEZING_RAIN“Mixed (or slushy) conditions due to freezing rain”
MIXED_SNOW“Mixed due to snow beginning to freeze”
MIXED_MELT“Mixed due to slushy melting snow”
FROZEN_SNOW“Frozen from snow accumulating”
FROZEN_PREV_PRECIP“Patches of frozen from snow that fell previously”
FROZEN_BLKICE“Potential for patches black ice (melted snow with refreezing)
ColorCodeValue
#ffffffDRY0
#90EE90WET_SNOW1
#32CD32WET_MELT2
#008000WET_RAIN3
#006400WET_PREV4
#800080MIXED_FRZR5
#9932CCMIXED_SNOW6
#EE82EEMIXED_MELT7
#87CEFAFRZ_SNOW8
#00BFFFFRZ_PREV9
#d3d3d3FRZ_BLKICE10