cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Tagging Folder

Tagging Folder

prabhat1999
Explorer | Level 3

I have manually added the tags to a folder.
now I want to search the folders with the given tag.
is there a way to get only folders not files?

PS:- I am aware of 2/files/search_v2 API but I want to search folders from their tags not with the folder name

7 Replies 7

Greg-DB
Dropbox Staff

You can use /2/files/search_v2 to search for items, and set options.file_categories to "folder" to restrict the results to folders only. Refer to the documentation for more information. You can also try out calls using the API v2 Explorer.

prabhat1999
Explorer | Level 3

how to seach with tag name

prabhat1999_1-1720527789488.png

 

as shown in the image the tag in "testingTag"

I want to search for folders with this tag

 

Rich
Super User II

@prabhat1999 wrote:

how to seach with tag name


Just to be clear, are you asking how to perform this search on the Dropbox website in your browser, or are you using an app or other programing to do the search? I ask because you've posted this in the API section, which is for people that are programming their own application to connect to Dropbox.

Здравко
Legendary | Level 20

@prabhat1999 wrote:

how to seach with tag name

...
I want to search for folders with this tag


@prabhat1999, It's impossible, unfortunately. Dropbox API (including Python SDK, you are using) doesn't provide such a feature.

prabhat1999
Explorer | Level 3

I am creating a custom program to search the folder with specific tags

Здравко
Legendary | Level 20

If you want, once listing folders as denoted by Greg, you may check all folders for available tags and filter them accordingly (on your own).

 

@prabhat1999, There is a way. 😉 In your case, try search with query "#testingtag". It's something undocumented.

Hope this helps.

Greg-DB
Dropbox Staff

That's correct, while this is not officially documented, you can put a tag as the search query for /2/files/search_v2 to search for the tag.

 

For example, in the Python SDK, along with setting the "folder" category, that would look like this:

result = dbx.files_search_v2(query="#testingtag", options=dropbox.files.SearchOptions(file_categories=[dropbox.files.FileCategory.folder]))

 

Need more support?