Date & Time
Unix timestamp <-> ISO API
Converts between Unix epoch timestamps (seconds or milliseconds) and ISO-8601 datetimes in both directions, returning both unit forms and the weekday. Answers 'What is this ISO time as a Unix timestamp?', 'Convert epoch 1780531200 to a date.'.
Price$0.02per request
MethodPOST
Route/v1/datetime/unix-convert
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
datetimeunixepochtimestampiso-8601convertmillisecondsposix
API URL
Integration docshttps://x402.hexl.dev/v1/datetime/unix-convertExample request
{
"op": "to-unix",
"datetime": "2026-06-04T00:00:00Z"
}Example response
{
"op": "to-unix",
"datetime": "2026-06-04T00:00:00.000Z",
"unixSeconds": 1780531200,
"unixMillis": 1780531200000,
"unit": "s",
"timestamp": 1780531200,
"interpretation": "2026-06-04T00:00:00.000Z = 1780531200 s since the Unix epoch."
}Input schema
{
"type": "object",
"required": [
"op"
],
"properties": {
"op": {
"type": "string",
"enum": [
"to-unix",
"from-unix"
],
"examples": [
"to-unix"
]
},
"datetime": {
"type": "string",
"examples": [
"2026-06-04T00:00:00Z"
]
},
"timestamp": {
"type": "number",
"examples": [
1780531200
]
},
"unit": {
"type": "string",
"enum": [
"s",
"ms"
],
"examples": [
"s"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}