GET /search API supports a variety of
different ways to filter the results returned by the API.
Filter by content type
By default, a search returns items for which either the name, description, file content, tags, or comments match the query provided. By setting thecontent_types parameter the search can be narrowed down to only the items that
match the query for the content type defined.
| Content type | |
|---|---|
name | The name of the item, as defined by its name field. |
description | The description of the item, as defined by its description field. |
file_content | The actual content of the file. |
comments | The content of any of the comments on a file or folder. |
tags | Any tags that are applied to an item, as defined by its tags field. |
Filter by date
By default, search returns files created at any time, and updated at any time. It is possible to filter results by both the date the file or folder was last updated or when it was created.| Query parameter | |
|---|---|
created_at_range | Defines a range of created_at dates for which to return results. The upper or lower bound can be left empty to create an open-ended range. |
updated_at_range | Defines a range of updated_at dates for which to return results. The upper or lower bound can be left empty to create an open-ended range. |
Filter by file extension
By default, a search returns items with any kind of file extension. It is possible to filter search results to only files with one or more specific file extensions using thefile_extensions query parameter.
Filter by file size
By default, a search returns items of any file size. It is possible to filter search results to only files within a specific file size using thesize_range query parameter.
Filter by file type
By default, a search returns both files, folders, and web links. To narrow down the results to only one of these, atype query parameter can be set to either
file, folder or web_link.
Filter by metadata
It is possible to filter search results by their associated metadata, or even perform entire searches based on only the metadata, all using themdfilters
query parameter.
Learn more about metadata filters
Filter by owner
By default, a search returns all the items the authenticated user has access to, regardless of who owns the items. To narrow down to only items owned by specific users, use theowner_user_ids query parameter.
Filter by parent folder
By default, a search returns all the items in any folder the user has access to. To narrow down the results to only items in specific folders, use theancestor_folder_ids query parameter.
