Skip to main content
Question

Search API does not return any files

  • May 22, 2025
  • 4 replies
  • 37 views

Forum|alt.badge.img

I finally was able to generate a User Access token so I can call the API.

 

I call the following API endpoint using the User Access Token

 

 

https://api.box.com/2.0/search?query=myfile
Authorization: Bearer 

I have a single PDF file in my Box.com account named "myfile.pdf"

 

When I call the API endpoint using postman I get back an HTTP 200 with the following.

 

{
"total_count": 0,
"entries": [],
"limit": 30,
"offset": 0
}

 

I am getting an HTTP 200 so I know the API is being called OK but why isn't the file being listed? 

4 replies

Forum|alt.badge.img

Search indexing takes about 10-15min after you upload.

Assuming you just uploaded the file, maybe wait a bit and try?


Forum|alt.badge.img

The file has been in my account since the day I signed up. Thanks for the suggestion though.


Forum|alt.badge.img

Priyajeet wrote: "Search indexing takes about 10-15min after you upload."

 

Is this documented somewhere? Is there a way to force the index to update immediately?

 

Scenario: one program creates a new folder, another program wants to find it using the new folder's name.

 

Workaround 1: have the first program remember the folder ID that was created and inform the second program.

 

Workaround 2: second program lists out all folders and looks for a matching name

 

Workaround 3: second program waits 15 minutes before searching

 

Thoughts?


Forum|alt.badge.img

 The 10-minute delay is documented as part of the Search API endpoint reference. There is no option to force the index as this is a backend service that runs across all content stored in Box. The solutions you've suggested are feasible to workaround this limitation.