srs
Retrieve sunrise and sunset times for Hong Kong by year, month, and day. Returns data in JSON or CSV format.
Instructions
Times of Sunrise/Sunset (SRS) API Request
Parameters:
year: 2018-2024
month: (Optional) 1-12 (requires year)
day: (Optional) 1-31 (requires year and month)
rformat: 'json' or 'csv' (Response format, default: csv)
Request Example: https://data.weather.gov.hk/weatherAPI/opendata/opendata.php?dataType=SRS&year=2025&month=1&rformat=json
Response Keys (JSON format):
type: Array with data type ["Sunrise/Sunset Times"]
fields: Array with field names ["Year", "Month", "Day", "Sunrise", "Sunset"]
data: Array of arrays with sunrise/sunset data
legend: Array with information
Response Keys (CSV format):
Type: Data type line
Header row: Year,Month,Day,Sunrise,Sunset
Data rows: Actual sunrise/sunset data
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | Year between 2018-2024 | |
| month | No | Optional month (1-12) when specific month data is needed | |
| day | No | Optional day (1-31) when specific day data is needed | |
| rformat | No | Output format: 'json' or 'csv' (default: 'csv') | csv |