Skip to main content
Question

Date Range Filter for Files and Folders Without Search Keyword

  • November 10, 2025
  • 0 replies
  • 16 views

Forum|alt.badge.img

Dear Box Developer Support Team,

I hope you are doing well.

We are currently using the Box.V2 .NET SDK in our C# application to fetch files and folders from Box.
We have a requirement to retrieve all files and folders within a specific date range (e.g., created or modified date) without providing any keyword in the search query.

Our goal is to filter Box content by date range only — for example, all items modified between 2025-01-01 and 2025-01-31without specifying a search term.

Below is the code snippet we are currently using:

 

var searchParams = new BoxSearchRequest()
{
    Query = "", // No keyword
    ContentTypes = new List<string> { "name", "description", "file_content" },
    FileExtensions = null,
    CreatedAtRangeFromDate = new DateTime(2025, 01, 01),
    CreatedAtRangeToDate = new DateTime(2025, 01, 31),
    Limit = 1000,
    Offset = 0
};

var searchResults = await client.SearchManager.SearchAsync(searchParams);

 

However, when we omit the keyword (Query = "" or null), the API either:

  • Returns no results, or

  • Requires a mandatory keyword to perform the search.

We would like to confirm:

  1. Is it possible to perform a date range–based search without a keyword using the Box API or Box.V2 SDK?

  2. If not, is there any alternative method or endpoint to efficiently fetch files and folders between specific dates (e.g., via metadata filters, folder iteration, or another API pattern)?

Any documentation links or best practices you can share would be highly appreciated.

Thank you for your time and support.

0 replies

Be the first to reply!