Date Filtering

Available operators for date filtering are:

  • gt greater than

  • gte greater than or equal to

  • lt less than

  • lte less than or equal to

Multiple Operators

Multiple operators can be combined to create date range filters. However gt and gte cannot be used together, and the same applies to lt and lte.

Date Formats

You can use either of the following formats for date filtering:

  • ISO 8601 format: Dates provided in the ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ) will be correctly interpreted and compared by the API.

  • Unix timestamp: Unix timestamps (seconds since January 1, 1970) can also be used for date filtering. These timestamps are represented as integers.

Example Usage

To get results that start after a specific date:

GET /api/data?startDate[gt]=2023-07-20T00:00:00Z
GET /api/data?startDate[gt]=1679798400

Combine operators to create date range filters

GET /api/data?startDate[gt]=2023-01-20T00:00:00Z&startDate[lt]=2023-07-20T00:00:00Z