Sunrise Sunset · Example Payload

Get Solar Times Formatted

Example request for Malaga, Spain using default formatted=1 output. Times returned in 12-hour clock format in UTC.

SunriseSunsetSolarAstronomyTwilightWeatherGeolocationFree

Get Solar Times Formatted 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 Malaga, Spain (formatted output)",
  "description": "Example request for Malaga, Spain using default formatted=1 output. Times returned in 12-hour clock format in UTC.",
  "request": {
    "method": "GET",
    "url": "https://api.sunrise-sunset.org/json",
    "parameters": {
      "lat": 36.7201600,
      "lng": -4.4203400,
      "date": "2024-06-15"
    }
  },
  "response": {
    "status": 200,
    "body": {
      "results": {
        "sunrise": "5:28:25 AM",
        "sunset": "6:49:44 PM",
        "solar_noon": "12:09:04 PM",
        "day_length": "13:21:19",
        "civil_twilight_begin": "5:05:39 AM",
        "civil_twilight_end": "7:12:30 PM",
        "nautical_twilight_begin": "4:38:23 AM",
        "nautical_twilight_end": "7:39:46 PM",
        "astronomical_twilight_begin": "4:11:03 AM",
        "astronomical_twilight_end": "8:07:05 PM"
      },
      "status": "OK"
    }
  }
}

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-formatted"
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.