We're making changes to the Community, so you may have received some notifications - thanks for your patience and welcome back. Learn more here.

Forum Discussion

demiurg's avatar
demiurg
Explorer | Level 3
3 months ago

Strange work of API method /files/search_v2

I want to search for files by name in the path `/first/folder/print` using the API `/files/search_v2`, but the API returns files from another folder `/first/folder/print-source`. Is this a bug or a feature?

  • The Dropbox API /2/files/search_v2 endpoint provides an options.path parameter which can be used to request that Dropbox restrict the search to a particular path, though there is a delay for recent changes. While Dropbox will restrict the search to a path if supplied, if a file (or parent folder) was recently moved out of that path but the search call takes place before the search index is updated, the search results may still include the file. The returned results would show the updated metadata however as the current metadata is retrieved when the result is returned.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    The Dropbox API /2/files/search_v2 endpoint provides an options.path parameter which can be used to request that Dropbox restrict the search to a particular path, though there is a delay for recent changes. While Dropbox will restrict the search to a path if supplied, if a file (or parent folder) was recently moved out of that path but the search call takes place before the search index is updated, the search results may still include the file. The returned results would show the updated metadata however as the current metadata is retrieved when the result is returned.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,875 PostsLatest Activity: 2 months ago
325 Following

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 or Facebook.

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!