dotCMS logodotCMS logo
OverviewAuthorBuildManageReference
dotCMS Github RepodotCMS Github RepodotCMS Discourse CommunityChat With Us
Overview
ReleasesIntroductionGuides and Tutorials
No Overview side nav found for /docs/content-by-date-range-rest-api.

dotCMS

Universal content management, made simple.

GitHubTwitterLinkedIndotCMS Discourse Community
dotDev HomeBlogChangelogsCurrent releasesAboutContactPrivacy PolicyTrust Center

© 2026 dotCMS. All rights reserved.

    Assistant

    Responses are generated using AI and may contain mistakes.

    Hi, I'm an AI assistant with access to documentation and other content.

    Tip: You can toggle this pane with ⌘/ or ⌘K.

    Try asking

    Enter to send · Shift+Enter for newline

    Content by Date Range

    Any Date field on content can be searched via RESTful webservices for a specific date range.  Here is the proper API call format:

    /api/content/render/false/query/+contentType:[ContentTypeVariable] +[ContentTypeVariable.DateField]:[ [year][month][day][time]to[year][month][day][time] ]

    The following example filters the demo site content API for Blog content where the Publish Date field on the Blog Content falls between 01/01/2010 to 01/01/2025. URL encoding needs to be added between the parameters to test via URL as shown below:

    https://demo.dotcms.com/api/content/render/false/query/+contentType:Blog%20+Blog.sysPublishDate:%5B20100101140000%20to%2020250101160000%5D%20

    The next example filters the demo site for News Content where:

    1. the Publish Date field on the News Content falls between 01/01/2010 to 01/01/2025
      +News.sysPublishDate:[20100101140000to2025101160000]
    2. The language is set to default language 1
      +languageId:1
    3. Archived content is excluded and working content is included
      +deleted:false+working:true
    4. The News Content is ordered by the latest Publish Date descending
      /orderby/News.sysPublishDate desc

    The URL encoded example below uses all of the listed filters above to query for News Content via API Call:

    https://demo.dotcms.com/api/content/render/false/query/+contentType:News%20+News.sysPublishDate:%5B20100101140000%20to%202025101160000%5D%20+languageId:1%20+deleted:false%20+working:true/orderby/News.sysPublishDate%20desc