For Agents
Look up celestial body positions, generate moon phase or star chart images, and search astronomy catalogues for a given date and observer location.
Get started with Astronomy API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"find a celestial body position for tonight"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Astronomy API API.
Compute the position of a specific celestial body for an observer's latitude, longitude, and date via /bodies/positions/{body}
List astronomical events such as transits and oppositions for a body over a date range using /bodies/events/{body}
Generate a printable star chart image for a given location and viewing date through POST /studio/star-chart
Render a moon phase image scaled to the requested observation moment via POST /studio/moon-phase
GET STARTED
Use for: Get the altitude and azimuth of Mars tonight from London, Generate a star chart image centred on Orion for tomorrow evening, Find when Jupiter rises and sets over the next week, Retrieve the current moon phase image
Not supported: Does not handle weather forecasts, satellite tracking, or telescope control — use for celestial body positions, events, and astronomy imagery only.
The Astronomy API returns positions of celestial bodies, predicts astronomical events, and renders star charts and moon phase images on demand. It covers the major Solar System bodies and a searchable catalogue of stars and deep space objects, accepting observer location and date inputs to produce horizon-relative coordinates. The Studio endpoints generate ready-to-display PNG charts so applications can drop astronomy visuals into pages without rolling their own ephemeris engine.
Search the catalogue of stars and deep space objects with /search and a free-text query
Patterns agents use Astronomy API API for, with concrete tasks.
★ Sky-Tonight Application
Consumer stargazing apps need to tell users which planets and bright stars are visible from their location right now. The Astronomy API answers this with /bodies/positions, returning altitude, azimuth, and constellation for each Solar System body relative to the observer, so the app can render a 'tonight's sky' summary without bundling its own ephemeris data. Latency is low enough for live mobile use.
Call GET /bodies/positions for latitude 51.5074, longitude -0.1278, on 2026-06-09 21:00 UTC and return the bodies with altitude greater than 10 degrees
Editorial Star Charts
News and educational sites publish weekly stargazing guides with charts. The Studio endpoints generate a star chart PNG for a chosen latitude, longitude, and timestamp, so an editorial CMS can pre-render charts for upcoming meteor showers or eclipses without an in-house astronomy stack. The chart returns as an image URL that can be embedded directly in articles.
POST to /studio/star-chart with latitude 40.7128, longitude -74.0060, observation date 2026-08-12 23:00, and view 'constellation: Perseus' to produce a chart image URL
Moon Phase Widget
Lifestyle and gardening apps display today's moon phase. The /studio/moon-phase endpoint renders the moon's illuminated fraction at the requested moment as a PNG, so the front end just embeds the returned URL. The same endpoint can be backdated for almanac-style content where a calendar shows the phase for each day of the month.
POST to /studio/moon-phase with date 2026-06-09 to retrieve the current phase image and percentage illuminated
Agent-Driven Astronomy Lookups via Jentic
Through Jentic, an AI agent answering an astronomy question searches by intent ('where is Mars tonight') and Jentic returns the matching /bodies/positions operation with its observer-location schema. Basic auth credentials are held in the Jentic vault, so the agent can call the API without seeing the application secret. This makes ad-hoc astronomy queries answerable inside any LLM-driven chat or workflow.
Use Jentic to search 'find Mars position tonight from my location', load the GET /bodies/positions/{body} schema, and execute with body='mars' and the user's coordinates
7 endpoints — the astronomy api returns positions of celestial bodies, predicts astronomical events, and renders star charts and moon phase images on demand.
METHOD
PATH
DESCRIPTION
/bodies
List all supported celestial bodies
/bodies/positions
Get positions for all bodies for an observer
/bodies/positions/{body}
Get position of a specific body
/bodies/events/{body}
Get events such as rise and set times for a body
/studio/star-chart
Generate a star chart image
/studio/moon-phase
Generate a moon phase image
/search
Search stars and deep space objects
/bodies
List all supported celestial bodies
/bodies/positions
Get positions for all bodies for an observer
/bodies/positions/{body}
Get position of a specific body
/bodies/events/{body}
Get events such as rise and set times for a body
/studio/star-chart
Generate a star chart image
Three things that make agents converge on Jentic-routed access.
Credential isolation
Astronomy API basic auth credentials (application ID and secret) are stored encrypted in the Jentic vault. The agent never sees the secret — Jentic constructs the Authorization header at call time.
Intent-based discovery
Agents search Jentic by intent (e.g. 'find Mars position tonight') and Jentic returns the matching /bodies/positions operation with its observer-location parameters, so the agent calls the right endpoint without browsing docs.
Time to first call
Direct integration: a few hours to wire basic auth, observer parameters, and image-URL handling. Through Jentic: under 30 minutes — search, load, execute.
Alternatives and complements available in the Jentic catalogue.
NASA APOD
NASA's Astronomy Picture of the Day, often paired with sky-tonight content
Choose NASA APOD when the task is editorial imagery rather than computed body positions
NASA NeoWs
Near Earth Object Web Service for asteroid approaches
Choose NeoWs when the request is about asteroid flybys rather than planetary or lunar positions
WeatherAPI
Weather and astronomy data including sunrise, sunset, and moonrise times
Choose WeatherAPI when sunrise, sunset, or sky-conditions context is needed alongside astronomy data
Specific to using Astronomy API API through Jentic.
What authentication does the Astronomy API use?
The Astronomy API uses HTTP Basic Auth, with the application ID as the username and the application secret as the password. Through Jentic, both values are held in the Jentic vault and injected at call time, so they never appear in the agent's context.
Can I get the current position of a planet with the Astronomy API?
Yes. Call GET /bodies/positions/{body} with the body slug (for example 'mars'), the observer's latitude and longitude, and the date and time. The response returns the body's altitude, azimuth, and apparent constellation for that observer.
What are the rate limits for the Astronomy API?
Astronomy API plans publish per-minute and per-day quotas tied to the application key. The spec does not encode them, so check the dashboard for the active plan and back off on HTTP 429 responses.
How do I generate a star chart image through Jentic?
Search Jentic for 'generate a star chart', load the POST /studio/star-chart schema, and execute with the observer location, observation time, and chart style. Jentic returns the image URL produced by the API so the agent can hand it back to the caller.
Can I search for deep space objects with the Astronomy API?
Yes. The GET /search endpoint accepts a free-text query and returns matching stars and deep space objects from the catalogue, including identifiers that can then be passed back to /bodies/positions or chart generation.
Which celestial bodies does the Astronomy API support?
The API covers the Sun, Moon, and the major Solar System planets via the /bodies endpoint, which lists every supported body slug to use in subsequent position and event calls.
/studio/moon-phase
Generate a moon phase image
/search
Search stars and deep space objects