API Bouncer

Buy me a coffee

Sunrise and Sunset

Sunset and sunrise times for a given latitude and longitude

Science & MathAuth: NoneHTTPS: YesCORS: noStatus: unknown

Getting Started

This API requires no authentication — you can start making requests immediately with no sign-up or API key needed.

  1. Find the endpoint — Check the API's documentation for available endpoints and what data they return.
  2. Make a request — Use fetch() in JavaScript, curl in your terminal, or any HTTP client to call the API.
  3. Use the data — The API will return data (usually JSON) that you can parse and use in your application.

No-auth APIs are the easiest to get started with — perfect for learning, prototyping, and building side projects.

CORS Support

This API does not support CORS, so you'll need to call it from a server-side application or use a proxy. Direct browser requests will be blocked by the browser's same-origin policy.

Quick Example

// Using cURL curl https://sunrise-sunset.org/api
// Using JavaScript fetch() const response = await fetch(apiUrl); const data = await response.json();

About Sunrise and Sunset

Sunrise and Sunset is a free, no-authentication API in the Science & Math category. You can start using it immediately without creating an account or obtaining an API key — just send an HTTP request and receive data back. This API supports HTTPS for secure connections and does not support CORS — you will need to call it from a server-side application.

Frequently Asked Questions

Is Sunrise and Sunset free to use?

Yes, Sunrise and Sunset is listed as a free public API. It requires no sign-up or API key. Some APIs have rate limits on their free tier, so check the official documentation for current limits.

Can I use Sunrise and Sunset in my web app?

Not directly from the browser — this API does not support CORS. You will need to set up a backend proxy server (using Node.js, Python, etc.) that calls the API and forwards the response to your frontend.

What format does Sunrise and Sunset return data in?

Most free APIs return data in JSON (JavaScript Object Notation) format. JSON is supported by every major programming language and is easy to parse. Check the API's documentation for the exact response format and available fields.

Is Sunrise and Sunset still working?

We have not recently verified the status of this API. Try visiting the API URL directly or making a test request to check if it is currently online.

Are there alternatives to Sunrise and Sunset?

Yes! Browse our Science & Math category to see all available APIs in the same category. Having alternatives is recommended in case this API goes offline or changes its terms.