Skip to main content
Question

Filter the files based on lower bound date and matching sub string

  • May 23, 2025
  • 1 reply
  • 24 views

Forum|alt.badge.img

Hi! I want to list files inside a perticular folder and filter them based on creation date. (Created after date). Also I want to search files based on given substring of file name.

Please Provide API query (or curl command) which can help me achieve above scenarios.

1 reply

Forum|alt.badge.img

Hi Dhruvin,

Here you go:

https://{{api.box.com}}/2.0/search
?query=jane
&created_at_range=2022-10-11T12:27:01-07:00,2099-05-17T13:35:01-07:00
&ancestor_folder_ids=172599089223
&content_types=name
&type=file

The above will return files that have jane on the name inside the folder 172599089223 created after Oct 11th

query: text string to look for

content: where to look for the query string

type: return only file objects

For more information please take a look at the search query parameters on our documentation.