Astronomy Weather API
Clear skies, in one call.
The Pxie astronomy weather API gives you cloud cover, transparency, seeing, darkness and moonlight for any place on Earth, 72 hours ahead, rolled into one 0 to 100 observing score.
- Anywhere on Earth
- 72 hours, 3-hour steps
- About 15 km grid
Jasper, Alberta · tonight
Best window 00:00 to 06:00: clear, steady, moon down.
What the astronomy weather API returns.
Cloud cover
Total cloud in percent every 3 hours to 72 hours, with a 1 to 5 scale from Clear to Overcast. Cloud cover API →
total_pct 8 · Clear
Sky transparency API
How clear the air is for faint galaxies and nebulae, from the water vapour above you.
pwat_mm 6.2 · Good
Seeing forecast API
How steady the air is for planets and double stars, in arcseconds, plus r0_cm.
seeing_arcsec 1.12 · Good
Observing score
Cloud, transparency, seeing, darkness and moonlight combined into one number per time step.
observing_score 82 / 100
Darkness and moon
Sun-based darkness, the twilight stage, moon illumination, phase and how much it brightens the sky.
twilight_stage night
Sky chart image
A ready-made 72-hour colour strip chart as a PNG, in local time, to drop straight into a page.
image/png · 400 to 1800 px
Seeing, transparency and cloud on one 1 to 5 scale
Every metric comes back as a real measurement and a 1 to 5 label, so you can show a plain word to users and keep the number for your own logic.
Seeing
- 1 Excellentunder 0.8"
- 2 Good0.8 to 1.5"
- 3 Average1.5 to 2.5"
- 4 Poor2.5 to 4"
- 5 Badover 4"
Transparency
- 1 Exceptionalunder 5 mm
- 2 Good5 to 15 mm
- 3 Average15 to 30 mm
- 4 Poor30 to 50 mm
- 5 Very poorover 50 mm
Cloud
- 1 Clear
- 2 Mostly clear
- 3 Partly cloudy
- 4 Mostly cloudy
- 5 Overcast
Built for astronomy, not adapted from a weather app.
Real units
Percent cloud, millimetres of water vapour and arcseconds of seeing, not coarse 1 to 8 buckets.
One call per night
Cloud, air, darkness and moonlight for the same hour, so you never stitch three APIs together.
Never silently old
Each response names its forecast run and age, and sets stale once it passes 20 hours.
Ready for AI assistants
The same data answers questions in Claude and other assistants through the Pxie MCP server.
Tonight's sky in a minute.
- 1Get a keySign up and copy your API key from the dashboard.
- 2Make one callSend a latitude and longitude to the conditions endpoint.
- 3Show the answerTurn the response into a score, labels and a best time.
curl -s "https://api.pxie.ai/v1/sky/conditions?lat=52.87&lon=-118.08&hours=24" \ -H "X-API-Key: YOUR_KEY"
const res = await fetch( "https://api.pxie.ai/v1/sky/conditions?lat=52.87&lon=-118.08&hours=24", { headers: { "X-API-Key": "YOUR_KEY" } } ); const { forecast } = await res.json(); // Best hour tonight const best = forecast.reduce((a, b) => b.observing_score > a.observing_score ? b : a);
import requests r = requests.get( "https://api.pxie.ai/v1/sky/conditions", params={"lat": 52.87, "lon": -118.08, "hours": 24}, headers={"X-API-Key": "YOUR_KEY"}, ) best = max(r.json()["forecast"], key=lambda f: f["observing_score"])
{
"model_run": "20261018/12Z",
"stale": false,
"forecast": [{
"hour": 15,
"cloud": { "total_pct": 8, "label": "Clear" },
"transparency": { "pwat_mm": 6.2, "label": "Good" },
"seeing": { "seeing_arcsec": 1.12, "label": "Good" },
"twilight_stage": "night",
"moon": { "illumination_pct": 12.4, "phase_name": "Waxing Crescent" },
"observing_score": 82
}]
}Jasper · tonight
- Cloud8% · Clear
- Seeing1.12″ · Good
- Transparency6.2 mm · Good
- Moon12% · Crescent
- DarknessFull night
- ForecastFresh
Hover a value to see the field it comes from.
Astronomy weather endpoints.
| Endpoint | What it returns | Credits per call | Plan |
|---|---|---|---|
GET /v1/sky/conditions | Cloud, transparency, seeing, darkness, moon and the observing score for each time step. | 5 | Builder |
GET /v1/sky/cloud-cover | Total cloud in percent with a 1 to 5 scale. | 3 | Builder |
GET /v1/sky/transparency | Water vapour, extinction and a 1 to 5 transparency scale. | 3 | Builder |
GET /v1/sky/seeing | Seeing in arcseconds and a 1 to 5 seeing scale. | 3 | Builder |
GET /v1/sky/chart | 72-hour colour strip chart as a PNG image, in local time. | 5 | Builder |
Every endpoint takes lat, lon and an optional hours (1 to 72). Credits are charged only for successful calls and cost the same over REST or MCP. Rate limits: 300 requests per minute on Builder, 1,200 on Scale.
"Will the sky be clear and steady near Jasper tonight?"
Pxie answers with the get_sky_conditions tool. MCP access is included from the Builder plan. Environmental data MCP server →
What to keep in mind
- A forecast, not a sky camera. A grid about 15 km across can miss small or fast-moving clouds, and mountains and large lakes can make local cloud it does not capture.
- Sharpest in the next two days. Accuracy falls with time, so trust the next 24 to 48 hours most and treat day three as a trend.
- Total cloud only. A thin high haze and a thick low deck can look alike, so read cloud together with transparency.
- Seeing is for the open sky. Heat from buildings, dome turbulence and ground fog at your site are not included.
Astronomy weather API FAQ.
Is there an API for astronomical seeing?
Yes. The Pxie seeing endpoint returns seeing in arcseconds and a 1 to 5 scale from Excellent to Bad, every 3 hours out to 72 hours, for any latitude and longitude on Earth.
How far ahead does the astronomy weather API forecast?
Up to 72 hours, in 3-hour steps. Trust the next 24 to 48 hours most and treat day three as a trend.
Does it work outside North America?
Yes. Every endpoint takes any latitude and longitude on Earth, on a global grid about 15 km across.
What is a good seeing value?
Under 0.8 arcseconds is excellent and 0.8 to 1.5 is good for planets and double stars. 1.5 to 2.5 is average, and above 2.5 the view starts to blur at high magnification.
What does the astronomy weather API cost?
Sky forecasts are on the Builder plan and up. Cloud cover, transparency and seeing cost 3 credits per call; the full conditions call with the observing score and the strip chart cost 5. Credits are charged only for successful calls.
Build for clear nights.
Sky forecasts, the observing score and MCP access are included from the Builder plan.
Developers: astronomy weather API docs →