
Astronomy API
Sun and moon, computed for any point on Earth and any date: sunrise, sunset, solar noon, day length, civil/nautical/astronomical twilight, the golden-hour window photographers plan around, live solar position (azimuth and elevation), moonrise and moonset, moon phase with its name and illumination percentage, lunar distance, and the dates of the next full and new moon. Pure computation with the standard astronomical algorithms β no upstream services, no rate-limited providers, answers in milliseconds at the lowest token cost. Accuracy is almanac-grade: New York''s 2026 summer-solstice sunrise lands within a minute of the published time, the equator gets its 12.1-hour equinox day, Tromso correctly reports polar night in January and midnight sun in June, and the computed next new and full moons match the real 2026 lunar calendar to the day. The almanac endpoint returns up to 31 days of combined sun and moon data in one call. Built for photography and drone apps (golden hour), fitness and outdoor products, agriculture, astronomy and stargazing tools, religious observance apps, and smart-home automations.
{
"ok": true,
"lat": 40.7128,
"lon": -74.006,
"date": "2026-06-21",
"times_utc": {
"solar_noon": "2026-06-21T16:59:03Z",
"sunrise": "2026-06-21T09:26:14Z",
"sunset": "2026-06-22T00:31:52Z",
"civil_twilight_begin": "2026-06-21T08:52:49Z",
"civil_twilight_end": "2026-06-22T01:05:18Z",
"nautical_twilight_begin": "2026-06-21T08:10:09Z",
"nautical_twilight_end": "2026-06-22T01:47:57Z",
"astronomical_twilight_begin": "2026-06-21T07:19:44Z",
"astronomical_twilight_end": "2026-06-22T02:38:22Z",
"golden_hour_morning_end": "2026-06-21T10:07:34Z",
"golden_hour_evening_begin": "2026-06-21T23:50:33Z",
"day_length_seconds": 54338,
"polar": null
},
"position_now": {
"at": "2026-06-21T12:00:00Z",
"azimuth_deg": 80.9,
"elevation_deg": 26.44
}
}Why developers pick this API
Production-ready
Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 20+ APIs
Your DataAndAPIs subscription unlocks every API on the platform β anime, finance, sports, and more.
Code snippets
One install. Every endpoint.
No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.
- Fully typed responses β auto-completion in your IDE
- Tracks the API in lockstep β new endpoints land same day
- One key works across 20+ APIs on the platform
import axios from 'axios';
const { data } = await axios.get(
'{API_URL}',
{ headers: { 'X-Api-Key': process.env.API_KEY } }
);π Subscribe to unlock the live API URL
Developer playground
Explore the endpoints
Browse request parameters and inspect live example responses.
Available Endpoints
Request Parameters
API URL
Please subscribe to see the API URL
Headers
Query Parameters
Please subscribe to see the actual API URL
import axios from 'axios';
const url = '{API_URL}';
const { data } = await axios.get(url, {
headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});Pricing
One subscription. Every API.
Tokens unlock this API and 20+ others on DataAndAPIs. Switch APIs any time β we promote.
STARTER
25,000 tokens / month
- Access to all APIs
- Tokens reset monthly
- Email support
PRO
100,000 tokens / month
- Access to all APIs
- Tokens reset monthly
- Priority email support
ULTRA
1,000,000 tokens / month
- Access to all APIs
- Tokens reset monthly
- Priority support
Need higher volume, dedicated infra, or a custom contract? Talk to sales β
Common questions
The things that actually block the upgrade.
Ship Astronomy API this afternoon.
500 free tokens. No card. Plus 20+ other APIs on the same key.
