DatesAPI

Date values, just a GET away

GET today's date or the next month's name. In your local language. In a format you specify. For free. Integrate it with your Zapier or Make scenario without having to deal with their obscure date modules.

Screenshot of a HTTP GET request to DatesAPI

Languages

Speaks your language

This applies only to month and weekday names. You can GET the result in your language. Just supply a query parameter lang, i.e. ?lang=fr.

Use Go's formatting layout in your request to the DatesAPI webservice

Formats

Define the format

DatesAPI uses the Go date and time formatting layouts. Learn them here and get used to January 2006. Combine it with the lang parameter to get dates in any possible format.

Use cases

Automation services

DatesAPI was invented to be integrated with services like Zapier or Make. We needed a simple way to create new tickets in a ticket system where each ticket was named like "Project X April 2024". Doing date math like this and returning the month name in a non-English language was not easily done within those services.


Days

Today, tomorrow, yesterday.


Months

The current month, the next month and the previous month.


Years

This year, the following year and – you gessed it – the previous year.

Free forever

$0

Get all what you need. Start immediately without registering. No API key or email address needed.

  • All endpoints

  • Unlimited requests

  • Rate limited to 1 request per second

Thank you!

We promise: we won't spam you or sell your address.

DatesAPI

API documentation

This is the API documentation for the DatesAPI webservice.



Base URL

The base URL of the DatesAPI webservice is https://api.datesapi.net. All request have to use the encrypted URL (https).


HTTP request type

The DatesAPI webservice accepts only GET requests.

Response

The webservice returns a JSON object with a single key result. The value of result is a string.


No auth – no headers

You don't have to supply any authentication or headers. Just a plain HTTP GET request.


List of all endpoints

All example responses are given relative to the date written (2024-03-16).

NameEndpointResponse
TodayGET /today{"result": "2024-03-16"}
TomorrowGET /tomorrow{"result": "2024-03-17"}
YesterdayGET /yesterday{"result": "2024-03-15"}
This monthGET /this-month{"result": "March 2024"}
Next monthGET /next-month{"result": "April 2024"}
Last monthGET /last-month{"result": "February 2024"}
This yearGET /this-year{"result": "2024"}
Next yearGET /next-year{"result": "2025"}
Last yearGET /last-year{"result": "2023"}

Languages

We use the golang-module/carbon for translating return values. As of today the following languages are supported.

NameLanguage code
Germande
Englishen
Spanishes
Farsifa
Frenchfr
Hindihi
Indonesianid
Italianit
Japanesejp
Koreankr
Bahasa Malaysianms-MY
Dutchnl
Polishpl
Portuguesept
Romanianro
Russianru
Swedishse
Thaith
Turkishtr
Ukrainianuk
Vietnamesevi
Simplified Chinesezh-CN
Traditional Chinesezh-TW

Supply the given language code as a query parameter lang:

GET /this-month?lang=es


Formatting

Since DatesAPI is written in Go we use the Go date and time formatting layouts.These are a bit unusual since January 1st 2006 is the reference date. You don't supply formatting like i.e. "YYYY-MM-DD". Instead you supply parts of the reference date as formatting instructions.

All example responses are given relative to the date written (2024-03-16).

MeaningFormatting layoutResult
year2006 or 062024 or 24
month01 or 103 or 3
day02 or 216
weekdayMondaySaturday
month nameJanuaryMarch

Supply the given language code as a query parameter format:

GET /this-month?format=2006-January


Examples

Since DatesAPI is written in Go we use the Go date and time formatting layouts.These are a bit unusual since January 1st 2006 is the reference date. You don't supply formatting like i.e. "YYYY-MM-DD". Instead you supply parts of the reference date as formatting instructions.