Our June 2020 release is a hotfix to address the inability to filter sneakers based on date. In this new release consumers of our API can filter sneakers by release date and release year.

Date Filtering Syntax

Our initial implementation of date filtering provides users with the ability to use two operators.

  1. Greater than and equal to (gte)
  2. Less than and equal to (lte)

To use these operators you can prefix your release date and/or release year query parameter with “gte:” or “lte:”. When the request is received the API will parse these specified query parameters and determine if filtering operators exists. An example of date filtering can be found below.

Date Filtering Examples

The first request below retrieves all Jordan sneakers that include the name travis scott and were released before or on October 11th, 2019. https://api.thesneakerdatabase.com/v1/sneakers?limit=10&brand=jordan&releaseDate=lte:2019-10-11&name=travis scott

Our next example retrieves all Jordan sneakers that were released in 2019 or after.


Date Filtering Considerations

When filtering on date and using the less than and equal to operator, please be aware that sneakers missing a release date may be returned in the results. Currently, these sneakers have a release year of 0. This may require you to add some additional logic to filter out these sneakers.Please remember that dates must be in the YYYY-MM-DD format.

To learn more about our API, check out our swagger documentation.

About the author