Sunrise Sunset · Example Payload

Get Solar Times Iso8601

Example request for New York City using formatted=0 to get ISO 8601 times and tzid to return times in Eastern Time.

SunriseSunsetSolarAstronomyTwilightWeatherGeolocationFree

Get Solar Times Iso8601 is an example object payload from Sunrise Sunset, with 4 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

summarydescriptionrequestresponse

Example Payload

Raw ↑
{
  "summary": "Get solar times for New York City with ISO 8601 output and timezone",
  "description": "Example request for New York City using formatted=0 to get ISO 8601 times and tzid to return times in Eastern Time.",
  "request": {
    "method": "GET",
    "url": "https://api.sunrise-sunset.org/json",
    "parameters": {
      "lat": 40.7128,
      "lng": -74.0060,
      "date": "2024-06-15",
      "formatted": 0,
      "tzid": "America/New_York"
    }
  },
  "response": {
    "status": 200,
    "body": {
      "results": {
        "sunrise": "2024-06-15T05:25:00-04:00",
        "sunset": "2024-06-15T20:30:00-04:00",
        "solar_noon": "2024-06-15T12:57:00-04:00",
        "day_length": 54300,
        "civil_twilight_begin": "2024-06-15T04:57:00-04:00",
        "civil_twilight_end": "2024-06-15T20:58:00-04:00",
        "nautical_twilight_begin": "2024-06-15T04:21:00-04:00",
        "nautical_twilight_end": "2024-06-15T21:34:00-04:00",
        "astronomical_twilight_begin": "2024-06-15T03:36:00-04:00",
        "astronomical_twilight_end": "2024-06-15T22:19:00-04:00"
      },
      "status": "OK",
      "tzid": "America/New_York"
    }
  }
}

Work with this as data

Every example here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This example
curl "https://apis.io/api/v1/examples/get-solar-times-iso8601"
All examples
curl "https://apis.io/api/v1/examples?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.