CALENDAR
Day of the Year API
/day-of-yearGet today’s ordinal day number in the UTC calendar year.
No signup or API key required.
Parameters
No endpoint-specific parameters. Use format to choose the response representation.
formatenumoptional · query- Response format. Defaults to json.
jsontext
No request body. Unknown or repeated query parameters return HTTP 400.
Returns 200 OK
A JSON object with the following fields.
dayinteger- Ordinal UTC day of the year, 1 through 365, or 366 in leap years. January 1 is day 1.
Plain text
With format=text: Only the day value, without the JSON wrapper.
Errors
Validation and service errors always return JSON, including when format=text.
errorstring- A machine-readable error code, such as invalid_parameter or rate_limited.
messagestring- A description of the problem.
400 Invalid parameters.
414 Query string exceeds 2048 characters.
429 Rate limit reached. Wait the seconds in Retry-After before retrying.
Usage notes
1..365, or 366 in a leap year. January 1 is day 1. Uses UTC.
Build a year-progress display or a daily counter. Numbering starts at 1 on January 1 and reaches 366 only in leap years.
Responses are not cached. Browser requests are supported through open CORS.
120 requests per minute per IP, with up to 30 per 10 seconds, shared across APIs. Limits are approximate per Cloudflare location. Full usage limits ↗