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.
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
.
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).
Name | Endpoint | Response |
---|---|---|
Today | GET /today | {"result": "2024-03-16"} |
Tomorrow | GET /tomorrow | {"result": "2024-03-17"} |
Yesterday | GET /yesterday | {"result": "2024-03-15"} |
This month | GET /this-month | {"result": "March 2024"} |
Next month | GET /next-month | {"result": "April 2024"} |
Last month | GET /last-month | {"result": "February 2024"} |
This year | GET /this-year | {"result": "2024"} |
Next year | GET /next-year | {"result": "2025"} |
Last year | GET /last-year | {"result": "2023"} |
Languages
We use the golang-module/carbon for translating return values. As of today the following languages are supported.
Name | Language code |
---|---|
German | de |
English | en |
Spanish | es |
Farsi | fa |
French | fr |
Hindi | hi |
Indonesian | id |
Italian | it |
Japanese | jp |
Korean | kr |
Bahasa Malaysian | ms-MY |
Dutch | nl |
Polish | pl |
Portuguese | pt |
Romanian | ro |
Russian | ru |
Swedish | se |
Thai | th |
Turkish | tr |
Ukrainian | uk |
Vietnamese | vi |
Simplified Chinese | zh-CN |
Traditional Chinese | zh-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).
Meaning | Formatting layout | Result |
---|---|---|
year | 2006 or 06 | 2024 or 24 |
month | 01 or 1 | 03 or 3 |
day | 02 or 2 | 16 |
weekday | Monday | Saturday |
month name | January | March |
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.