Sunrise Sunset API
Sunrise Sunset is a simple tool for getting the sunrise and sunset times. It returns the sunrise and sunset times for a given location and date.
Live Test API
Try out the Sunrise Sunset with a live request and see the response in real-time.
API Request
API Response
12345678910111213141516171819{ "status": "ok", "error": null, "data": { "solarNoon": "2025-12-16T12:14:40.51Z", "sunrise": "2025-12-16T07:24:56.165Z", "sunset": "2025-12-16T17:04:24.854Z", "sunriseEnd": "2025-12-16T07:27:58.828Z", "sunsetStart": "2025-12-16T17:01:22.192Z", "dawn": "2025-12-16T06:56:02.774Z", "dusk": "2025-12-16T17:33:18.245Z", "nauticalDawn": "2025-12-16T06:23:38.134Z", "nauticalDusk": "2025-12-16T18:05:42.886Z", "nightEnd": "2025-12-16T05:52:07.048Z", "night": "2025-12-16T18:37:13.971Z", "goldenHourEnd": "2025-12-16T08:05:08.406Z", "goldenHour": "2025-12-16T16:24:12.613Z" } }
Multiple Access Methods
REST API with multiple response formats, GraphQL, and MCP for AI agents
View all integrationsJSON
JavaScript Object Notation
XML
Extensible Markup Language
YAML
Human-readable data format
CSV
Comma-separated values
GraphQL
Query language for APIs
MCP
AI agent integration
Skip the HTTP calls. Use our official packages
Integrate faster with type-safe SDKs and comprehensive documentation
View all integrationsRelated APIs
Explore other weather APIs that complement the Sunrise Sunset
Frequently Asked Questions
Get answers to common questions about the Sunrise Sunset API
What does the Sunrise Sunset API do?
Sunrise Sunset is a simple tool for getting the sunrise and sunset times. It returns the sunrise and sunset times for a given location and date. The API returns structured data in JSON, XML, or YAML format, making it easy to integrate into any application or workflow.
How fast is the Sunrise Sunset API?
The Sunrise Sunset API has an average response time of 730ms, with a median (p50) of 682ms and 99th percentile of 1051ms. Our infrastructure maintains 99.9% uptime with servers distributed globally for low latency.
How much does the Sunrise Sunset API cost?
Each call to the Sunrise Sunset API uses 1 credit. The free tier includes 100 credits per month. Paid plans start at $29.99/month with higher limits, and enterprise plans offer custom pricing with priority support.
How do I authenticate Sunrise Sunset API requests?
Include your API key in the request header as X-API-Key: your_key_here. All requests are made over HTTPS for security. You can get your API key by signing up for a free account.
What HTTP methods does Sunrise Sunset support?
The Sunrise Sunset API supports GET requests. Simply pass your parameters as query strings in the URL. Check our documentation for detailed parameter specifications.
Ready to integrate Sunrise Sunset API?
Join thousands of developers building amazing applications with reliable API data. Get started with your free API key today.