Welcome to the United Nations

UNITE-TADA is now discontinued, for any questions please reach out to oict-unite-tada@un.org

Datetime Parser

Datetime Parser documentation master file, created by sphinx-quickstart. You can adapt this file completely to your liking, but it should at least contain the root toctree directive.

Contents
Overview

The UN Date Time Parser is a web service that converts the string representation of a date and time value into a machine-readable date-time format. This is useful for applications trying to ingest date-time values in human-readable formats (like "yesterday" or "tomorrow") that a machine may not readily interpret.

You can try out our OpenAPI UI for this service to understand user input time expressions and translate them into a formatted datetime.

Note: Current version 1.0 only supports English. Therefore, if the input text is written in an unsupported language, it will return an error as a response.

Data limits

The maximum size of each request body is 1,000 characters. If your input text is larger than this, please consider shortening it.

API request fields

A body in JSON format is required to send a request to the API to get the formatted datetime. To validate your input, here's an external online web tool that can help: JSON validator.

This JSON object should contain two fields: api_key and input_text. Please check the constraints for each field displayed in the table below. It will throw an error if any field in the request body does not meet the requirements.

KeyDescription
api_keyThe string of the unique API key to authorize requests. If this field is missing or does not match the real key, it will fail to access the API and return an error message.
input_textThe string of a date or time written in natural language or any format.

Note: A string is a sequence of characters quoted by " ". It cannot take a newline as a character in it; instead, use the newline character \n to represent it. To include special characters such as the quotation mark or non-printable characters, prefix them with a backslash character \.

United Nations logo