Contentful logo

Contentful Community

getEntries after certain creation date

Next to passing the following options to the getEntries function { order: 'sys.createdAt' } i would like to pass additional data in order to retrieve entries not older than current Date minus N days (lets say, 180 days, approx 6 months).

How to approach this?

Hi @sanjay.valk

It should be possible by using the [gt] or [gte] operator in the search parameters. See:
https://www.contentful.com/developers/docs/references/content-delivery-api/#/reference/search-parameters/ranges