Dropbox

Links

    Dropbox API

    Getting access, Developing, Testing

    Back to Dropbox

    Files - Search

    Searches for files and folders. Note: Recent changes may not immediately be reflected in search results due to a short delay in indexing.

    Input

    type: object properties: data: type: object description: > path: The path in the user's Dropbox to search. Should probably be a folder. query: The string to search for. The search string is split on spaces into multiple tokens. For file name searching, the last token is used for prefix matching (i.e. "bat c" matches "bat cave" but not "batman car"). start: The starting index within the search results (used for paging). max_results: The maximum number of search results to return. mode: The search mode (filename, filename_and_content, or deleted_filename). Note that searching file content is only available for Dropbox Business accounts. properties: start: type: number description: The starting index within the search results (used for paging). max_results: type: number description: The maximum number of search results to return. path: type: string description: The path in the user's Dropbox to search. Should probably be a folder. mode: type: object description: > filename: Search file and folder names. filename_and_content: Search file and folder names as well as file contents. deleted_filename: Search for deleted file and folder names. properties: .tag: title: Choice of SearchMode type: string enum: - filename - filename_and_content - deleted_filename query: type: string description: >- The string to search for. The search string is split on spaces into multiple tokens. For file name searching, the last token is used for prefix matching (i.e. "bat c" matches "bat cave" but not "batman car"). title: Data

    Output

    type: object description: > matches: A list (possibly empty) of matches for the query. more: Used for paging. If true, indicates there is another page of results available that can be fetched by calling :route:`search` again. start: Used for paging. Value to set the start argument to when calling :route:`search` to fetch the next page of results. properties: matches: type: array description: A list (possibly empty) of matches for the query. items: type: object description: | match_type: The type of the match. metadata: The metadata for the matched file or folder. properties: match_type: type: object description: > Indicates what type of match was found for a given item. filename: This item was matched on its file or folder name. content: This item was matched based on its file contents. both: This item was matched based on both its contents and its file name. properties: .tag: title: Choice of SearchMatchType type: string enum: - filename - content - both metadata: type: object description: > Metadata for a file or folder. name: The last component of the path (including extension). This never contains a slash. path_lower: The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted. path_display: The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user's filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won't be returned by :route:`list_folder/continue`. This field will be null if the file or folder is not mounted. parent_shared_folder_id: Please use :field:`FileSharingInfo.parent_shared_folder_id` or :field:`FolderSharingInfo.parent_shared_folder_id` instead. properties: parent_shared_folder_id: type: string description: >- Please use :field:`FileSharingInfo.parent_shared_folder_id` or :field:`FolderSharingInfo.parent_shared_folder_id` instead. name: type: string description: >- The last component of the path (including extension). This never contains a slash. path_display: type: string description: >- The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user's filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won't be returned by :route:`list_folder/continue`. This field will be null if the file or folder is not mounted. path_lower: type: string description: >- The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted. start: type: number description: >- Used for paging. Value to set the start argument to when calling :route:`search` to fetch the next page of results. more: type: boolean description: >- Used for paging. If true, indicates there is another page of results available that can be fetched by calling :route:`search` again.