Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
jermaine-floyd
2 months agoNew member | Level 2
Search API not returning deleted files
Hi everyone,
I'm using the Search API files/search_v2 and wanted to search for deleted files. The documentation claims that `file_status` can be used to restrict the search to the given file status. I'm doing a simple search as below, but I don't get the expected results:
{
"options": {
"file_status": "deleted"
},
"query": "deleted_file"
}I've tried all kinds of combinations, but I'm still not getting correct results. Has anyone been able to make this work, or am I doing something wrong?
1 Reply
- Spencer H2 months ago
Dropbox Staff
Hi there,
Thanks for bringing this up, it looks like this behavior may be an issue on our side and we’ll take a closer look. In the meantime, you can use the following API endpoints as an alternative approach to locate deleted items.
We recommend using the /files/list_folder and /files/list_folder/continue endpoints with the `include_deleted` parameter set to `true`. These endpoints allow you to retrieve metadata for both active and deleted entries within a specified folder. Additionally, you can set the recursive parameter to `true` to search through all subfolders.
Once you retrieve the results, look for entries with `".tag": "deleted"`. You can then cross-check these entries against the result's file name with the file name you’re searching for to confirm whether that file has been deleted.
About Discuss Dropbox Developer and API
Explore Dropbox Developer & API discussions with developers like you.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!