Call it
curl https://api.peume.com/v1/call/find-nearby-stations \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"locations": "your locations"
}
}'const res = await fetch("https://api.peume.com/v1/call/find-nearby-stations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"locations": "your locations"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/find-nearby-stations",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"locations": "your locations"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: find-nearby-stations.
Parameters
radius_kmnumberSearch radius in kilometres. Stations beyond this distance are excluded.
locationsRequiredstringJSON array of input location objects. Each object has either lat/lon (e.g. {"lat":51.5,"lon":-0.12}) or station_id (e.g. {"station_id":"KJFK"}). ICAO codes and PWS IDs are supported.
station_typestringFilter by station type. Set to 'official' to return only professionally operated stations (airport, METAR, SYNOP). When omitted, all station types are returned including personal weather stations.
