{"openapi":"3.1.0","info":{"title":"Environmental sensors (RealtimeAPI)","version":"cd889074","description":"Environmental sensors served through the RealtimeAPI gateway. Pay per request in USDC with x402 (no account), or send an `X-API-Key` / `Authorization: Bearer rta_live_...` key. Each operation's `x-price` is the per-request price.","x-feed-slug":"sensordata"},"servers":[{"url":"https://api.realtimeapi.ai/v1/sensordata"}],"security":[{},{"ApiKeyHeader":[]},{"BearerKey":[]}],"paths":{"/air/near":{"get":{"operationId":"air-near","summary":"Air quality near a point","description":"Air quality monitors within radius_km of a point with their latest readings (PM2.5, PM10, O3, NO2, SO2, CO as integers in the stated scale) and the US EPA AQI of the worst pollutant, nearest first. Refreshes every 60 minutes.","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","minimum":-90,"maximum":90}},{"name":"lon","in":"query","required":true,"schema":{"type":"number","minimum":-180,"maximum":180}},{"name":"radius_km","in":"query","required":false,"schema":{"type":"number","default":25,"maximum":500}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"minimum":1,"maximum":100}}],"x-price":{"price":"$0.010","price_micro":10000,"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"x-mcp-tool":"sensordata_air-near","x-cache-ttl-s":1800,"responses":{"200":{"description":"Successful response (passed through from the provider). Schema inferred from a recent live response; fields can be added or null.","headers":{"PAYMENT-RESPONSE":{"$ref":"#/components/headers/PaymentResponse"},"X-RTAPI-Price":{"$ref":"#/components/headers/Price"},"X-RTAPI-Cache":{"$ref":"#/components/headers/Cache"},"X-RTAPI-Cache-Layer":{"$ref":"#/components/headers/CacheLayer"},"X-RTAPI-Cache-TTL":{"$ref":"#/components/headers/CacheTtl"},"X-RTAPI-Data-Age":{"$ref":"#/components/headers/DataAge"},"X-RTAPI-Cached-At":{"$ref":"#/components/headers/CachedAt"},"X-RTAPI-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RTAPI-Quota-Source":{"$ref":"#/components/headers/QuotaSource"},"Server-Timing":{"$ref":"#/components/headers/ServerTiming"},"X-RTAPI-Gateway-Ms":{"$ref":"#/components/headers/GatewayMs"}},"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"},"radius_km":{"type":"integer"}},"required":["lat","lon","radius_km"]},"count":{"type":"integer"},"stations":{"type":"array","items":{"type":"object","properties":{"station_id":{"type":"string"},"network":{"type":"string"},"network_station_id":{"type":"string"},"name":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"country":{"type":"string"},"region":{"type":"string"},"parameters":{"type":"array","items":{"type":"string"}},"readings":{"type":"array","items":{"type":"object","properties":{"parameter":{"type":"string"},"value_scaled":{"type":"integer"},"scale":{"type":"integer"},"unit":{"type":"string"},"observed_at":{"type":"string","format":"date-time"},"ingested_at":{"type":"string","format":"date-time"},"quality":{"type":"string"}},"required":["parameter","value_scaled","scale","unit","observed_at","ingested_at","quality"]}},"aqi_us":{"type":["object","null"],"properties":{"value":{"type":"integer"},"category":{"type":"string"},"pollutant":{"type":"string"}},"required":["value","category","pollutant"]},"distance_m":{"type":"integer"}},"required":["station_id","network","network_station_id","name","lat","lon","country","region","parameters","readings","aqi_us","distance_m"]}},"as_of":{"type":"string","format":"date-time"},"next_update":{"type":"string","format":"date-time"},"status":{"type":"string"},"data_age_s":{"type":"integer"},"source":{"type":"array","items":{"type":"object","properties":{"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"},"retrieved_at":{}},"required":["publisher","licence","url","retrieved_at"]}}},"required":["query","count","stations","as_of","next_update","status","data_age_s","source"]},"example":{"query":{"lat":-33.87,"lon":151.21,"radius_km":25},"count":4,"stations":[{"station_id":"openaq_417","network":"openaq","network_station_id":"417","name":"Rozelle","lat":-33.8658333,"lon":151.1625,"country":"AU","region":"Sydney East","parameters":["co"],"readings":[{"parameter":"co","value_scaled":100,"scale":1000,"unit":"ppm","observed_at":"2022-11-22T23:00:00Z","ingested_at":"2026-11-11T02:07:09Z","quality":"ok"}],"aqi_us":{"value":20,"category":"good","pollutant":"o3"},"distance_m":4410}],"as_of":"2022-11-22T23:00:00Z","next_update":"2022-11-23T00:00:00Z","status":"stale","data_age_s":125207494,"source":[{"publisher":"OpenAQ","licence":"CC BY 4.0","url":"https://api.openaq.org/v3/locations/","retrieved_at":null}]}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}}}},"/air/{station_id}":{"get":{"operationId":"air-station-id","summary":"Air quality at a monitor","description":"Latest readings at one OpenAQ monitor (station_id openaq_{location_id}) with the US EPA AQI. An id that is not tracked returns status pending with known false; find ids with /stations/near. Refreshes every 60 minutes.","parameters":[{"name":"station_id","in":"path","required":true,"schema":{"type":"string"}}],"x-price":{"price":"$0.005","price_micro":5000,"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"x-mcp-tool":"sensordata_air-station-id","x-cache-ttl-s":1800,"responses":{"200":{"description":"Successful response (passed through from the provider). Schema inferred from a recent live response; fields can be added or null.","headers":{"PAYMENT-RESPONSE":{"$ref":"#/components/headers/PaymentResponse"},"X-RTAPI-Price":{"$ref":"#/components/headers/Price"},"X-RTAPI-Cache":{"$ref":"#/components/headers/Cache"},"X-RTAPI-Cache-Layer":{"$ref":"#/components/headers/CacheLayer"},"X-RTAPI-Cache-TTL":{"$ref":"#/components/headers/CacheTtl"},"X-RTAPI-Data-Age":{"$ref":"#/components/headers/DataAge"},"X-RTAPI-Cached-At":{"$ref":"#/components/headers/CachedAt"},"X-RTAPI-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RTAPI-Quota-Source":{"$ref":"#/components/headers/QuotaSource"},"Server-Timing":{"$ref":"#/components/headers/ServerTiming"},"X-RTAPI-Gateway-Ms":{"$ref":"#/components/headers/GatewayMs"}},"content":{"application/json":{"schema":{"type":"object","properties":{"station_id":{"type":"string"},"known":{"type":"boolean"},"readings":{"type":"array"},"aqi_us":{},"hint":{"type":"string"},"as_of":{},"next_update":{},"status":{"type":"string"},"data_age_s":{},"source":{"type":"array","items":{"type":"object","properties":{"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"},"retrieved_at":{}},"required":["publisher","licence","url","retrieved_at"]}}},"required":["station_id","known","readings","aqi_us","hint","as_of","next_update","status","data_age_s","source"]},"example":{"station_id":"openaq_2178","known":false,"readings":[],"aqi_us":null,"hint":"No such tracked monitor. Find ids with GET /sensors/api/v1/stations/near?network…","as_of":null,"next_update":null,"status":"pending","data_age_s":null,"source":[{"publisher":"OpenAQ","licence":"CC BY 4.0","url":"https://api.openaq.org/v3/locations/2178","retrieved_at":null}]}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}}}},"/quakes/recent":{"get":{"operationId":"quakes-recent","summary":"Recent earthquakes","description":"Earthquakes from the USGS feed in the last `hours` (1 to 720), optionally at or above `min_mag` and within radius_km of a point, newest first, with magnitude and depth as integers (milli). Refreshes every 60 seconds.","parameters":[{"name":"min_mag","in":"query","required":false,"schema":{"type":["number","null"],"minimum":-2,"maximum":10}},{"name":"hours","in":"query","required":false,"schema":{"type":"integer","default":24,"minimum":1,"maximum":720}},{"name":"lat","in":"query","required":false,"schema":{"type":["number","null"],"minimum":-90,"maximum":90}},{"name":"lon","in":"query","required":false,"schema":{"type":["number","null"],"minimum":-180,"maximum":180}},{"name":"radius_km","in":"query","required":false,"schema":{"type":["number","null"],"maximum":20000}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"minimum":1,"maximum":500}}],"x-price":{"price":"$0.005","price_micro":5000,"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"x-mcp-tool":"sensordata_quakes-recent","x-cache-ttl-s":30,"responses":{"200":{"description":"Successful response (passed through from the provider). Schema inferred from a recent live response; fields can be added or null.","headers":{"PAYMENT-RESPONSE":{"$ref":"#/components/headers/PaymentResponse"},"X-RTAPI-Price":{"$ref":"#/components/headers/Price"},"X-RTAPI-Cache":{"$ref":"#/components/headers/Cache"},"X-RTAPI-Cache-Layer":{"$ref":"#/components/headers/CacheLayer"},"X-RTAPI-Cache-TTL":{"$ref":"#/components/headers/CacheTtl"},"X-RTAPI-Data-Age":{"$ref":"#/components/headers/DataAge"},"X-RTAPI-Cached-At":{"$ref":"#/components/headers/CachedAt"},"X-RTAPI-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RTAPI-Quota-Source":{"$ref":"#/components/headers/QuotaSource"},"Server-Timing":{"$ref":"#/components/headers/ServerTiming"},"X-RTAPI-Gateway-Ms":{"$ref":"#/components/headers/GatewayMs"}},"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"object","properties":{"min_mag":{},"hours":{"type":"integer"},"lat":{},"lon":{},"radius_km":{}},"required":["min_mag","hours","lat","lon","radius_km"]},"count":{"type":"integer"},"quakes":{"type":"array","items":{"type":"object","properties":{"usgs_id":{"type":"string"},"time":{"type":"string","format":"date-time"},"lat":{"type":"number"},"lon":{"type":"number"},"depth_km_milli":{"type":"integer"},"mag_milli":{"type":"integer"},"mag_type":{"type":"string"},"place":{"type":"string"},"url":{"type":"string"},"status":{"type":"string"},"tsunami":{"type":"boolean"}},"required":["usgs_id","time","lat","lon","depth_km_milli","mag_milli","mag_type","place","url","status","tsunami"]}},"as_of":{"type":"string","format":"date-time"},"next_update":{"type":"string","format":"date-time"},"status":{"type":"string"},"data_age_s":{"type":"integer"},"source":{"type":"array","items":{"type":"object","properties":{"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"},"retrieved_at":{}},"required":["publisher","licence","url","retrieved_at"]}}},"required":["query","count","quakes","as_of","next_update","status","data_age_s","source"]},"example":{"query":{"min_mag":null,"hours":24,"lat":null,"lon":null,"radius_km":null},"count":100,"quakes":[{"usgs_id":"aka2026wieejk","time":"2026-11-11T02:40:14Z","lat":59.595,"lon":-152.993,"depth_km_milli":110600,"mag_milli":2300,"mag_type":"ml","place":"66 km ESE of Pedro Bay, Alaska","url":"https://earthquake.usgs.gov/earthquakes/eventpage/aka2026wieejk","status":"automatic","tsunami":false},{"usgs_id":"ci41360839","time":"2026-11-11T01:54:31Z","lat":34.2418333333333,"lon":-117.075333333333,"depth_km_milli":2810,"mag_milli":880,"mag_type":"ml","place":"5 km NE of Running Springs, CA","url":"https://earthquake.usgs.gov/earthquakes/eventpage/ci41360839","status":"automatic","tsunami":false}],"as_of":"2026-11-11T02:51:30Z","next_update":"2026-11-11T02:52:30Z","status":"fresh","data_age_s":3,"source":[{"publisher":"USGS Earthquake Hazards Program","licence":"US public domain","url":"https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_hour.geojson","retrieved_at":null}]}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}}}},"/stations/near":{"get":{"operationId":"stations-near","summary":"Stations near a point","description":"Stations of every network (usgs, coops, openaq) within radius_km of a point, nearest first, with the parameters each reports and the distance in metres. Refreshes every 24 hours.","parameters":[{"name":"lat","in":"query","required":true,"schema":{"type":"number","minimum":-90,"maximum":90}},{"name":"lon","in":"query","required":true,"schema":{"type":"number","minimum":-180,"maximum":180}},{"name":"radius_km","in":"query","required":false,"schema":{"type":"number","default":25,"maximum":500}},{"name":"parameter","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"network","in":"query","required":false,"schema":{"type":["string","null"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"minimum":1,"maximum":200}}],"x-price":{"price":"$0.005","price_micro":5000,"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"x-mcp-tool":"sensordata_stations-near","x-cache-ttl-s":21600,"responses":{"200":{"description":"Successful response (passed through from the provider). Schema inferred from a recent live response; fields can be added or null.","headers":{"PAYMENT-RESPONSE":{"$ref":"#/components/headers/PaymentResponse"},"X-RTAPI-Price":{"$ref":"#/components/headers/Price"},"X-RTAPI-Cache":{"$ref":"#/components/headers/Cache"},"X-RTAPI-Cache-Layer":{"$ref":"#/components/headers/CacheLayer"},"X-RTAPI-Cache-TTL":{"$ref":"#/components/headers/CacheTtl"},"X-RTAPI-Data-Age":{"$ref":"#/components/headers/DataAge"},"X-RTAPI-Cached-At":{"$ref":"#/components/headers/CachedAt"},"X-RTAPI-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RTAPI-Quota-Source":{"$ref":"#/components/headers/QuotaSource"},"Server-Timing":{"$ref":"#/components/headers/ServerTiming"},"X-RTAPI-Gateway-Ms":{"$ref":"#/components/headers/GatewayMs"}},"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"},"radius_km":{"type":"integer"},"parameter":{},"network":{}},"required":["lat","lon","radius_km","parameter","network"]},"count":{"type":"integer"},"stations":{"type":"array","items":{"type":"object","properties":{"station_id":{"type":"string"},"network":{"type":"string"},"network_station_id":{"type":"string"},"name":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"country":{"type":"string"},"region":{"type":"string"},"parameters":{"type":"array","items":{"type":"string"}},"distance_m":{"type":"integer"}},"required":["station_id","network","network_station_id","name","lat","lon","country","region","parameters","distance_m"]}},"as_of":{"type":"string","format":"date-time"},"next_update":{"type":"string","format":"date-time"},"status":{"type":"string"},"data_age_s":{"type":"integer"},"source":{"type":"array","items":{"type":"object","properties":{"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"},"retrieved_at":{}},"required":["publisher","licence","url","retrieved_at"]}}},"required":["query","count","stations","as_of","next_update","status","data_age_s","source"]},"example":{"query":{"lat":-33.87,"lon":151.21,"radius_km":25,"parameter":null,"network":null},"count":4,"stations":[{"station_id":"openaq_417","network":"openaq","network_station_id":"417","name":"Rozelle","lat":-33.8658333,"lon":151.1625,"country":"AU","region":"Sydney East","parameters":["co","no2"],"distance_m":4410},{"station_id":"openaq_912","network":"openaq","network_station_id":"912","name":"Randwick","lat":-33.9333333,"lon":151.2419444,"country":"AU","region":"Sydney East","parameters":["co","no2"],"distance_m":7635}],"as_of":"2026-11-10T23:35:00Z","next_update":"2026-11-11T23:35:00Z","status":"fresh","data_age_s":11793,"source":[{"publisher":"USGS Water Services","licence":"US public domain","url":"https://waterservices.usgs.gov/nwis/iv/?sites=&format=json","retrieved_at":null},{"publisher":"NOAA CO-OPS","licence":"US public domain","url":"https://tidesandcurrents.noaa.gov/stationhome.html?id=","retrieved_at":null}]}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}}}},"/tides/{station}":{"get":{"operationId":"tides-station","summary":"Tide station latest","description":"Latest observed water level at a NOAA CO-OPS station in metres above MLLW (milli), with the next predicted high and low and whether the tide is rising or falling. Refreshes every 6 minutes.","parameters":[{"name":"station","in":"path","required":true,"schema":{"type":"string"}}],"x-price":{"price":"$0.005","price_micro":5000,"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"x-mcp-tool":"sensordata_tides-station","x-cache-ttl-s":180,"responses":{"200":{"description":"Successful response (passed through from the provider). Schema inferred from a recent live response; fields can be added or null.","headers":{"PAYMENT-RESPONSE":{"$ref":"#/components/headers/PaymentResponse"},"X-RTAPI-Price":{"$ref":"#/components/headers/Price"},"X-RTAPI-Cache":{"$ref":"#/components/headers/Cache"},"X-RTAPI-Cache-Layer":{"$ref":"#/components/headers/CacheLayer"},"X-RTAPI-Cache-TTL":{"$ref":"#/components/headers/CacheTtl"},"X-RTAPI-Data-Age":{"$ref":"#/components/headers/DataAge"},"X-RTAPI-Cached-At":{"$ref":"#/components/headers/CachedAt"},"X-RTAPI-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RTAPI-Quota-Source":{"$ref":"#/components/headers/QuotaSource"},"Server-Timing":{"$ref":"#/components/headers/ServerTiming"},"X-RTAPI-Gateway-Ms":{"$ref":"#/components/headers/GatewayMs"}},"content":{"application/json":{"schema":{"type":"object","properties":{"station":{"type":"string"},"station_id":{"type":"string"},"name":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"known":{"type":"boolean"},"datum":{"type":"string"},"water_level_m_milli":{"type":"integer"},"observed_at":{"type":"string","format":"date-time"},"quality":{"type":"string"},"trend":{"type":"string"},"next":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"t":{"type":"string","format":"date-time"},"value_m_milli":{"type":"integer"}},"required":["kind","t","value_m_milli"]}},"as_of":{"type":"string","format":"date-time"},"next_update":{"type":"string","format":"date-time"},"status":{"type":"string"},"data_age_s":{"type":"integer"},"source":{"type":"array","items":{"type":"object","properties":{"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"},"retrieved_at":{}},"required":["publisher","licence","url","retrieved_at"]}}},"required":["station","station_id","name","lat","lon","known","datum","water_level_m_milli","observed_at","quality","trend","next","as_of","next_update","status","data_age_s","source"]},"example":{"station":"8518750","station_id":"coops_8518750","name":"The Battery","lat":40.700554,"lon":-74.01417,"known":true,"datum":"MLLW","water_level_m_milli":1362,"observed_at":"2026-11-11T02:42:00Z","quality":"provisional","trend":"falling","next":[{"kind":"L","t":"2026-11-11T07:57:00Z","value_m_milli":153},{"kind":"H","t":"2026-11-11T13:58:00Z","value_m_milli":1604}],"as_of":"2026-11-11T02:42:00Z","next_update":"2026-11-11T02:48:00Z","status":"fresh","data_age_s":574,"source":[{"publisher":"NOAA CO-OPS","licence":"US public domain","url":"https://tidesandcurrents.noaa.gov/stationhome.html?id=8518750","retrieved_at":null}]}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}}}},"/tides/{station}/predictions":{"get":{"operationId":"tides-station-predictions","summary":"Tide predictions for a day","description":"Predicted high and low tides (metres above MLLW, UTC) at a NOAA CO-OPS station for one UTC date, today by default, up to 7 days ahead. Refreshes every 24 hours.","parameters":[{"name":"station","in":"path","required":true,"schema":{"type":"string"}},{"name":"date","in":"query","required":false,"schema":{"type":["string","null"],"format":"date"}}],"x-price":{"price":"$0.005","price_micro":5000,"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"x-mcp-tool":"sensordata_tides-station-predictions","x-cache-ttl-s":21600,"responses":{"200":{"description":"Successful response (passed through from the provider). Schema inferred from a recent live response; fields can be added or null.","headers":{"PAYMENT-RESPONSE":{"$ref":"#/components/headers/PaymentResponse"},"X-RTAPI-Price":{"$ref":"#/components/headers/Price"},"X-RTAPI-Cache":{"$ref":"#/components/headers/Cache"},"X-RTAPI-Cache-Layer":{"$ref":"#/components/headers/CacheLayer"},"X-RTAPI-Cache-TTL":{"$ref":"#/components/headers/CacheTtl"},"X-RTAPI-Data-Age":{"$ref":"#/components/headers/DataAge"},"X-RTAPI-Cached-At":{"$ref":"#/components/headers/CachedAt"},"X-RTAPI-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RTAPI-Quota-Source":{"$ref":"#/components/headers/QuotaSource"},"Server-Timing":{"$ref":"#/components/headers/ServerTiming"},"X-RTAPI-Gateway-Ms":{"$ref":"#/components/headers/GatewayMs"}},"content":{"application/json":{"schema":{"type":"object","properties":{"station":{"type":"string"},"station_id":{"type":"string"},"name":{"type":"string"},"known":{"type":"boolean"},"date":{"type":"string","format":"date"},"datum":{"type":"string"},"count":{"type":"integer"},"predictions":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"t":{"type":"string","format":"date-time"},"value_m_milli":{"type":"integer"}},"required":["kind","t","value_m_milli"]}},"as_of":{"type":"string","format":"date-time"},"next_update":{"type":"string","format":"date-time"},"status":{"type":"string"},"data_age_s":{"type":"integer"},"source":{"type":"array","items":{"type":"object","properties":{"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"},"retrieved_at":{}},"required":["publisher","licence","url","retrieved_at"]}}},"required":["station","station_id","name","known","date","datum","count","predictions","as_of","next_update","status","data_age_s","source"]},"example":{"station":"8518750","station_id":"coops_8518750","name":"The Battery","known":true,"date":"2026-11-11","datum":"MLLW","count":4,"predictions":[{"kind":"H","t":"2026-11-11T01:47:00Z","value_m_milli":1330},{"kind":"L","t":"2026-11-11T07:57:00Z","value_m_milli":153}],"as_of":"2026-11-11T02:38:06Z","next_update":"2026-11-12T02:38:06Z","status":"fresh","data_age_s":808,"source":[{"publisher":"NOAA CO-OPS","licence":"US public domain","url":"https://tidesandcurrents.noaa.gov/stationhome.html?id=8518750","retrieved_at":null}]}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}}}},"/water/gauge/{site}":{"get":{"operationId":"water-gauge-site","summary":"River gauge latest","description":"Latest gage height (feet), discharge (cubic feet per second) and water temperature at a USGS site, with the NWS flood categories and the current flood status. Refreshes every 15 minutes.","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"}}],"x-price":{"price":"$0.005","price_micro":5000,"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"x-mcp-tool":"sensordata_water-gauge-site","x-cache-ttl-s":300,"responses":{"200":{"description":"Successful response (passed through from the provider). Schema inferred from a recent live response; fields can be added or null.","headers":{"PAYMENT-RESPONSE":{"$ref":"#/components/headers/PaymentResponse"},"X-RTAPI-Price":{"$ref":"#/components/headers/Price"},"X-RTAPI-Cache":{"$ref":"#/components/headers/Cache"},"X-RTAPI-Cache-Layer":{"$ref":"#/components/headers/CacheLayer"},"X-RTAPI-Cache-TTL":{"$ref":"#/components/headers/CacheTtl"},"X-RTAPI-Data-Age":{"$ref":"#/components/headers/DataAge"},"X-RTAPI-Cached-At":{"$ref":"#/components/headers/CachedAt"},"X-RTAPI-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RTAPI-Quota-Source":{"$ref":"#/components/headers/QuotaSource"},"Server-Timing":{"$ref":"#/components/headers/ServerTiming"},"X-RTAPI-Gateway-Ms":{"$ref":"#/components/headers/GatewayMs"}},"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string"},"station_id":{"type":"string"},"name":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"state":{"type":"string"},"known":{"type":"boolean"},"readings":{"type":"object","properties":{"gage_height_ft_milli":{"type":"integer"},"discharge_cfs_milli":{"type":"integer"},"water_temp_c_milli":{"type":"integer"},"observed_at":{"type":"string","format":"date-time"},"quality":{"type":"array","items":{"type":"string"}}},"required":["gage_height_ft_milli","discharge_cfs_milli","water_temp_c_milli","observed_at","quality"]},"flood":{"type":"object","properties":{"nws_lid":{"type":"string"},"action_ft_milli":{"type":"integer"},"minor_ft_milli":{"type":"integer"},"moderate_ft_milli":{"type":"integer"},"major_ft_milli":{"type":"integer"},"status":{"type":"string"}},"required":["nws_lid","action_ft_milli","minor_ft_milli","moderate_ft_milli","major_ft_milli","status"]},"as_of":{"type":"string","format":"date-time"},"next_update":{"type":"string","format":"date-time"},"status":{"type":"string"},"data_age_s":{"type":"integer"},"source":{"type":"array","items":{"type":"object","properties":{"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"},"retrieved_at":{}},"required":["publisher","licence","url","retrieved_at"]}}},"required":["site","station_id","name","lat","lon","state","known","readings","flood","as_of","next_update","status","data_age_s","source"]},"example":{"site":"01646500","station_id":"usgs_01646500","name":"Potomac River Near Wash, Dc Little Falls Pump Sta","lat":38.94977778,"lon":-77.12763889,"state":"MD","known":true,"readings":{"gage_height_ft_milli":2810,"discharge_cfs_milli":1940000,"water_temp_c_milli":24300,"observed_at":"2026-11-11T01:50:00Z","quality":["ok","provisional"]},"flood":{"nws_lid":"BRKM2","action_ft_milli":5000,"minor_ft_milli":10000,"moderate_ft_milli":12000,"major_ft_milli":14000,"status":"below_action"},"as_of":"2026-11-11T01:50:00Z","next_update":"2026-11-11T02:05:00Z","status":"stale","data_age_s":3695,"source":[{"publisher":"USGS Water Services","licence":"US public domain","url":"https://waterservices.usgs.gov/nwis/iv/?sites=01646500&format=json","retrieved_at":null},{"publisher":"NOAA National Water Prediction Service","licence":"US public domain","url":"https://api.water.noaa.gov/nwps/v1/gauges/01646500","retrieved_at":null}]}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}}}},"/water/gauge/{site}/history":{"get":{"operationId":"water-gauge-site-history","summary":"River gauge history (Pro)","description":"Readings for the last 7 days at a USGS site, newest first, every parameter, with observed_at and ingested_at so a backtest can select what was known at a time. Refreshes every 15 minutes.","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":["string","null"],"format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":["string","null"],"format":"date-time"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":500,"minimum":1,"maximum":2000}}],"x-price":{"price":"$0.020","price_micro":20000,"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"x-mcp-tool":"sensordata_water-gauge-site-history","x-cache-ttl-s":1800,"responses":{"200":{"description":"Successful response (passed through from the provider). Schema inferred from a recent live response; fields can be added or null.","headers":{"PAYMENT-RESPONSE":{"$ref":"#/components/headers/PaymentResponse"},"X-RTAPI-Price":{"$ref":"#/components/headers/Price"},"X-RTAPI-Cache":{"$ref":"#/components/headers/Cache"},"X-RTAPI-Cache-Layer":{"$ref":"#/components/headers/CacheLayer"},"X-RTAPI-Cache-TTL":{"$ref":"#/components/headers/CacheTtl"},"X-RTAPI-Data-Age":{"$ref":"#/components/headers/DataAge"},"X-RTAPI-Cached-At":{"$ref":"#/components/headers/CachedAt"},"X-RTAPI-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/Remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"X-RTAPI-Quota-Source":{"$ref":"#/components/headers/QuotaSource"},"Server-Timing":{"$ref":"#/components/headers/ServerTiming"},"X-RTAPI-Gateway-Ms":{"$ref":"#/components/headers/GatewayMs"}},"content":{"application/json":{"schema":{"type":"object","properties":{"site":{"type":"string"},"station_id":{"type":"string"},"known":{"type":"boolean"},"from":{},"to":{},"count":{"type":"integer"},"readings":{"type":"array","items":{"type":"object","properties":{"parameter":{"type":"string"},"value_scaled":{"type":"integer"},"scale":{"type":"integer"},"unit":{"type":"string"},"observed_at":{"type":"string","format":"date-time"},"ingested_at":{"type":"string","format":"date-time"},"quality":{"type":"string"}},"required":["parameter","value_scaled","scale","unit","observed_at","ingested_at","quality"]}},"retention_days":{"type":"integer"},"as_of":{"type":"string","format":"date-time"},"next_update":{"type":"string","format":"date-time"},"status":{"type":"string"},"data_age_s":{"type":"integer"},"source":{"type":"array","items":{"type":"object","properties":{"publisher":{"type":"string"},"licence":{"type":"string"},"url":{"type":"string"},"retrieved_at":{}},"required":["publisher","licence","url","retrieved_at"]}}},"required":["site","station_id","known","from","to","count","readings","retention_days","as_of","next_update","status","data_age_s","source"]},"example":{"site":"01646500","station_id":"usgs_01646500","known":true,"from":null,"to":null,"count":9,"readings":[{"parameter":"discharge","value_scaled":1940000,"scale":1000,"unit":"cfs","observed_at":"2026-11-11T01:50:00Z","ingested_at":"2026-11-11T01:59:49Z","quality":"provisional"},{"parameter":"gage_height","value_scaled":2810,"scale":1000,"unit":"ft","observed_at":"2026-11-11T01:50:00Z","ingested_at":"2026-11-11T01:59:49Z","quality":"provisional"}],"retention_days":7,"as_of":"2026-11-11T01:50:00Z","next_update":"2026-11-11T02:05:00Z","status":"stale","data_age_s":3695,"source":[{"publisher":"USGS Water Services","licence":"US public domain","url":"https://waterservices.usgs.gov/nwis/iv/?sites=01646500&format=json","retrieved_at":null}]}}}},"402":{"$ref":"#/components/responses/PaymentRequired"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerKey":{"type":"http","scheme":"bearer","description":"`rta_live_...` platform key"}},"headers":{"PaymentRequired":{"description":"Base64-encoded JSON x402 payment requirements (same as the body).","schema":{"type":"string"}},"PaymentResponse":{"description":"Base64-encoded JSON x402 settlement receipt (paid requests only).","schema":{"type":"string"}},"Price":{"description":"Per-request price of this endpoint, e.g. `$0.010` (charged only on a paid 2xx; covered by the key in API-key mode).","schema":{"type":"string"}},"Cache":{"description":"`HIT` or `MISS`.","schema":{"type":"string","enum":["HIT","MISS"]}},"CacheLayer":{"description":"On a hit: `edge` (this data centre's cache), `global` (the quality probe's copy) or `region` (the copy kept fresh in your region; `X-RTAPI-Data-Age` says how old).","schema":{"type":"string","enum":["edge","global","region"]}},"CacheTtl":{"description":"The endpoint's cache TTL in seconds (cacheable endpoints only).","schema":{"type":"integer"}},"DataAge":{"description":"Seconds since the gateway took its copy from the provider (0 when the answer is live). The data's own timestamp, if any, is in the body.","schema":{"type":"integer"}},"CachedAt":{"description":"Unix milliseconds the gateway's copy was taken from the provider (hits only).","schema":{"type":"integer"}},"Remaining":{"description":"API-key mode: calls left in the key's current period (also `X-RateLimit-Remaining`).","schema":{"type":"integer"}},"RateLimitLimit":{"description":"API-key mode: the key's calls per period.","schema":{"type":"integer"}},"RateLimitReset":{"description":"API-key mode: unix seconds the period resets.","schema":{"type":"integer"}},"QuotaSource":{"description":"API-key mode: `do` when the quota figures are the counter's exact answer, `memo` when a cached answer was served ahead of the count (figures then approximate by a few calls; a 429 is always exact).","schema":{"type":"string","enum":["do","memo"]}},"ServerTiming":{"description":"One entry per phase the request ran (`kv`, `auth`, `quota`, `cache`, `upstream`, `settle`) and `total`, the gateway's time to first byte; `desc` names the source (`cache;dur=3;desc=\"edge\"`).","schema":{"type":"string"}},"GatewayMs":{"description":"The gateway's own time to first byte: `total` minus `upstream` and `settle`.","schema":{"type":"integer"}}},"responses":{"PaymentRequired":{"description":"Payment required. Retry with an x402 `PAYMENT-SIGNATURE` (or `X-PAYMENT`) header for one of `accepts`, or with an API key.","headers":{"PAYMENT-REQUIRED":{"$ref":"#/components/headers/PaymentRequired"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"Error":{"description":"Error envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"PaymentRequirements":{"type":"object","required":["scheme","network","payTo","asset"],"properties":{"scheme":{"type":"string","const":"exact"},"network":{"type":"string","examples":["eip155:8453"]},"payTo":{"type":"string"},"price":{"type":"string","examples":["$0.010"]},"asset":{"type":"string"},"maxTimeoutSeconds":{"type":"integer"},"resource":{"type":"string","format":"uri"},"description":{"type":"string"},"mimeType":{"type":"string"}}},"PaymentRequired":{"type":"object","required":["x402Version","accepts","error"],"properties":{"x402Version":{"type":"integer","const":2},"accepts":{"type":"array","items":{"$ref":"#/components/schemas/PaymentRequirements"}},"error":{"type":"string"},"alternatives":{"type":"object","properties":{"api_key_purchase":{"type":"string","format":"uri"},"docs":{"type":"string","format":"uri"}}}}},"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}}}},"x-x402":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"externalDocs":{"url":"https://realtimeapi.ai/feeds/sensordata"}}