Precise Solar Position Data for Any Location

Sun Position API.

Calculate the precise position of the sun in the sky for any location and time. Get altitude (elevation angle), azimuth (compass direction), and other solar geometry data essential for solar energy calculations, shadow analysis, photography planning, and architectural design.

Free tier, no card< 200ms responses99.9% uptime SLA
GET/v1/sunpositionlive
Response200 OK · sample
{
  "status": "ok",
  "error": null,
  "data": {
    "date": "01-22-2026",
    "time": "14:30",
    "coordinates": {
      "latitude": 37.7749,
      "longitude": -122.4194
    },
    "sun": {
      "altitude": 0.13571365568367633,
      "azimuth": 0.9137156885643708
    }
  }
}
Sample response · verify to run one live call, no signup
Integrates with your favorite tools
LangChainn8nZapierMakePipedreamPower AutomatePostman

Sun Position API

Calculate the precise position of the sun in the sky for any location and time. Get altitude (elevation angle), azimuth (compass direction), and other solar geometry data essential for solar energy calculations, shadow analysis, photography planning, and architectural design.

  • Real-time sun altitude and azimuth for any coordinates
  • Precise solar geometry calculations with millisecond accuracy
  • Solar noon, day length, and twilight timing data
  • Works worldwide with any latitude and longitude
  1. 1

    Send one request

    A single authenticated GET with the location you care about — no SDK required.

    GET /v1/sunposition?query=
    x-api-key: your_key
  2. 2

    We do the aggregation

    Each request pulls from multiple upstream sources and computes the derived fields for you.

  3. 3

    Get clean JSON back

    One structured object, typically under 200 ms — ready to render.

    { date, time, coordinates, }

Everything in a single call.

/v1/sunpositionapplication/json
date"01-22-2026"
time"14:30"
coordinateslatitude, longitude
sunaltitude, azimuth

What developers build with it.

Real applications shipping on this endpoint today — each with the numbers that made it worth wiring up.

See every use case

Call it in your language.

Copy a working request, or install a typed SDK. Same endpoint, same key.

const res = await fetch("https://api.apiverve.com/v1/sunposition?lat=37.7749&lon=-122.4194&date=01-16-2026&time=14%3A30", {
  headers: { "x-api-key": "YOUR_API_KEY" },
});
const { data } = await res.json();
console.log(data);

One subscription, the whole precise solar position data for any location stack.

Every related API ships with your key — no separate plans, no extra keys, one bill.

See pricing
8APIs in this bundle
99.9%uptime SLA

Wire it into the tools you already run.

Ready-made recipes for Zapier, Make, and n8n — trigger on an event, and the data lands where your team works.

Google Sheets
Log sun position for a location hourly
WhenScheduled hourly
ThenGet sun position → append row
Slack
Morning sun position briefing
WhenScheduled daily (morning)
ThenGet sun position → post to channel
Airtable
Build a sun position log for multiple sites
WhenScheduled hourly
ThenGet sun position → create record
Notion
Log daily sun data to a Notion database
WhenScheduled daily
ThenGet sun position → create database item
Salesforce
Add sun position data to solar opportunity records
WhenNew opportunity created
ThenGet sun position → update custom field
GitHub
Add sun position data to new issues
WhenNew issue opened
ThenGet sun position → add comment
Browse all integrations

Questions about the API

How accurate is the sun position data?
Our calculations are based on established astronomical algorithms and are accurate to within 0.01 degrees. This precision is suitable for professional applications like solar panel optimization and architectural shadow analysis.
What coordinates format do you accept?
We accept decimal degrees for latitude (-90 to 90) and longitude (-180 to 180). For example, New York City is lat=40.7128, lon=-74.0060.
Can I get sun position for a specific date and time?
Yes, you can pass an optional datetime parameter to get the sun position for any date and time, past or future. If not specified, we return the current sun position.
What is the difference between altitude and azimuth?
Altitude is the angle of the sun above the horizon (0° at horizon, 90° directly overhead). Azimuth is the compass direction to the sun (0° north, 90° east, 180° south, 270° west).
Do you provide sunrise and sunset times?
The Sun Position API focuses on the current position. For sunrise/sunset times, use our dedicated Sunrise/Sunset API which provides detailed twilight data including civil, nautical, and astronomical twilight times.
Is the API suitable for solar energy calculations?
Absolutely. Our sun position data is used by solar energy companies to optimize panel angles, predict energy generation, and plan installations. The altitude and azimuth data is perfect for these calculations.
How do I calculate shadow length?
We provide a shadowLength field which gives the relative shadow multiplier based on sun altitude. Multiply an object's height by this value to get its shadow length. When the sun is at 45°, shadows equal object height.
Does the API account for atmospheric refraction?
Yes, our calculations include standard atmospheric refraction corrections, which is why the sun appears slightly higher near the horizon than its geometric position.

Start building with the Sun Position API. Free tier, no card required — your key is live in minutes.

Bonus: 300+ more APIs

The same key unlocks every other APIVerve endpoint — reach for them when you need them.

Browse the catalog