Moon Position API

GET

Pinpoint the moon's position in the sky from any coordinates.

Moon Position calculates the moon's altitude in the sky for any latitude and longitude coordinates. Provide an optional time of day to determine lunar elevation; paid plans add custom dates, azimuth, and distance.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/moonposition?lat=37.7749&lon=-122.4194
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "date": "01-22-2026",
    "time": "14:30",
    "coordinates": {
      "latitude": 37.7749,
      "longitude": -122.4194
    },
    "moon": {
      "altitude": -0.407908976399288,
      "azimuth": 1.4720499058762104,
      "distance": 404332.6834067969
    }
  }
}

Start from a template — a working app you can deploy in a minute

About the Moon Position API

Moon Position works by analyzing the location provided and calculating moon position data. It uses advanced algorithms to calculate data such as altitude, azimuth, and distance of the moon from the location and returns the moon position data.

What people use it for

Night Photography Planning
Landscape photographers check moon altitude across evening hours to time foreground illumination and align night-sky shots.
Telescope Pointing Assistants
Amateur astronomy software plots lunar elevation by observer coordinates to guide telescope targeting during backyard stargazing sessions.
Coastal Night Navigation
When planning coastal night voyages, marine navigation tools track lunar altitude to anticipate natural visibility over open water.
Nocturnal Wildlife Research
Field biology platforms log lunar elevation against animal GPS tracks to correlate predator hunting patterns with ambient moonlight.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Moon Position

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Moon Position API.

Read the docs
Is it cheap enough to calculate the moon's position for every user request?
Yes. Each request uses 2 credits, which works out to about $0.30 per 1,000 calculations on the Starter plan. The Starter plan includes 100,000 monthly calls, while the Free plan gives you 100 calls per month to test your integration.
Are azimuth, distance, and custom dates included on the Free plan?
No. Azimuth, distance in kilometers, and the ability to query specific dates are premium features. The Free plan returns the moon's altitude for current dates, while any paid plan unlocks full directional azimuth, distance calculations, and historical or future date lookups.
Does this work for any latitude and longitude worldwide?
Yes. You can supply any valid geographic coordinates across the globe. The calculation determines the moon's altitude and position relative to that exact observer location on Earth.
What happens if I omit the time parameter?
If you do not pass a time, the calculation defaults to midnight (00:00). When you need precision for a specific moment, provide the time in standard 24-hour HH:mm format.
Can I use moon position data in a commercial photography or outdoor app?
Yes, commercial use is fully allowed on any paid plan. You can calculate and display position metrics inside your consumer or business application, as long as you do not resell or redistribute the raw API data as a standalone service.

Ready to build with Moon Position? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs